magic-typewriter
TypeScript icon, indicating that this package has built-in type declarations

1.0.15 • Public • Published

Magic Typewriter

Demo Image

A typewriter for react that includes:

  • Emoji support (via the amazing Grapheme Splitter)
  • Smooth scrolling with CSS opacity
  • No multi line snapping

Installation

Add magic typewriter to your React project with npm

npm install --save magic-typewriter

Basic Usage

Include magic typewriter and drop into any component

import { MagicTypewriter } from 'magic-typewriter';

function App() {
  return (
    <div className="App">
     <MagicTypewriter 
     message={"Hello there 👋\nHow are you doing today?"}
     ></MagicTypewriter>
    </div>
  );
}

Options

There are several parameters you can use to customise magic typewriter

     <MagicTypewriter 
     message={"Hello there 👋\nHow are you doing today?"}
     splitLines={true}
     splitString={/\n/}
     onComplete={() => console.log('Done')}
     isLoading={false}
     charDelay={30}
     lineDelay={500}
     ></MagicTypewriter>

Readme

Keywords

Package Sidebar

Install

npm i magic-typewriter

Weekly Downloads

3

Version

1.0.15

License

ISC

Unpacked Size

386 kB

Total Files

19

Last publish

Collaborators

  • oliverrees