This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

react-typer-component
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

React Typer Component

Create typewriter effect by setting up a component's children directly.

Caveat ⚠⚠⚠

This package is not production-ready, Use it with caution.

Features 🎈

  • [x] Directly set up text inside a component
  • [x] Allow nested elements
  • [x] Custom cursor
  • [x] Curstom string splitting
  • [x] Support pasting text
  • [x] Support pause
  • [x] Support backspace

Install

npm install react-typer-component
# or
yarn add react-typer-component

How to use

import Typer from 'react-typer-component';

const MyComponent = () => {
  return (
    <Typer cursor={<span className="cursor">|</span>}>
      This is a typo
      <Typer.Backspace count={4} />
      <Typer.Paste>react component</Typer.Paste>
      <Typer.Pause ms={1500} />
      <div>
        use
        <div>deeper div</div>
      </div>
    </Typer>
  );
};

The final result will look like:

<div>
  This is a react component
  <div>
    use
    <div>
      deeper div
      <span className="cursor">|</span>
    </div>
  </div>
</div>

/react-typer-component/

    Package Sidebar

    Install

    npm i react-typer-component

    Weekly Downloads

    0

    Version

    0.1.1

    License

    MIT

    Unpacked Size

    14.1 kB

    Total Files

    7

    Last publish

    Collaborators

    • yuxuan-zheng