0.1.5 • Published 1 year ago

react-writing-effect v0.1.5

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

React Writing Effect

A simple Reactjs component to make a typing effect

Installation

as simple as type a command on your project:

npm i react-writing-effect

Implementation

Here goes a simple example:

import Typing from 'react-writing-effect';

const App = () => {
  return (
    <div>
        <Typing>
            Simple typing effect component
        </Typing>
    </div>
  );
};

ReactDOM.render(<App />, document.getElementById('root'));

Documentation

React writing effect is a single component library, as you saw in the implementation example, it has no more mistery than that, if you'd like to customize it you're able to, using some props, those are:

PropDescriptionTypeDefaultAditional Information
typingSpeedDefines the speed to type each letterString100ms
cursorTimeLapseDefines the time lapse the cursor uses to know how fast it needs to blinkString1seconds
classNameA class to use in the whole componentStringundefinedN/A
styleCss styles to use in the whole componentReact.CSSPropertiesundefinedN/A
onFinishA callback used at the end of current animationFunctionundefinedN/A
cursorIf you want to use a custom blinker you're able to using this propJSX.ElementundefinedN/A
styleTextCss styles to use just in the text of the componentReact.CSSPropertiesundefinedN/A
styleCursorCss styles to use just in the cursor of the componentReact.CSSPropertiesundefinedN/A

Children prop

To pass the text to animate you have to pass it as a Children prop just like in the implementation example.

0.1.5

1 year ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago