0.2.5 • Published 7 years ago
react-spritz v0.2.5
React Spritz🍷
React implementation of the Spritz speed-reading technique.

Inspired by Luis Ivan's Spritzer.
Demo
Installation
npm install react-spritz --saveInclude the stylesheet as follows if needed:
import '../node_modules/react-spritz/build/main.css';Usage
<ReactSpritz
text="Hi, this is React Spritz. Let's play!"
wpm={400}
playing
/>- text - the text
- wpm - words per minute, how fast the words will be displayed
- playing - you can control the component by changing this property (
false, by default) - startTimeout - you can control the timeout on start (in ms,
1000by default)
Additional props
- normalized - pass
trueif you want longer timeouts for longer words (this will not affect short words) - stop - pass
trueif you want to restart the component - onStart - pass
callbackto do something on start - onPause - pass
callbackto do something on pause (playing=false) - onStop - pass
callbackto do something on stop (stop=true) - onDisplayNextWord - pass
callbackto do something on displaying the next word