react-typewriting-effect
The simplest typewriter effect component in React. ( Requires react >=16.8.0 )
Updates in v1.0.4
- cursor option to add custom cursor text
- cursor css can be customised using cursorClassName
Install
npm install --save react-typewriting-effect
Usage
You can view demo here
Options
Name | Type | Default value | Description |
---|---|---|---|
string | String | String to type out | |
delay (speed in v1.0.3) | number | 100 | The delay between each key when typing. |
onComplete | Lambda/Function | () => {} | Function to execute when string is completely typed |
stopBlinkinOnComplete | Boolean | false | Whether to blink cursor after string is typed |
className | String | '' | Field to set classes for the HTML Element |
cursor | String | ' | ' |
cursorClassName | String | undefined | Field to set classes for the cursor |
License
MIT © tanmaylaud