Speed reader component for React, which streams the text in chunks. Enabling the user to read long passages of text with ease.
npm install --save react-speedy-reader
or
yarn add react-speedy-reader
import React from 'react';
import { render } from 'react-dom';
import SpeedyReader from 'react-speedy-reader';
render(
(
<div className="demo">
<SpeedyReader
autoPlay
inputText={'Lorem ipsum dolor sit amet, consectetur adipiscing elit. ' +
'Fusce dignissim urna turpis, sed interdum massa tincidunt eget. ' +
'Duis leo nisl, eleifend ac turpis vitae, cursus sagittis leo. ' +
'Nullam sit amet.'}
/>
</div>
),
document.getElementById('app')
);
Name | Type | Default | Required | Description |
---|---|---|---|---|
autoPlay | bool | false | false | Indicates whether the reader starts immediately |
inputText | string | true | Input text to be sped read | |
onFinish | function | undefined | false | Callback used when finished reading passage |
speed | number | 250 | false | The speed of the reader in words per minute (WPM) |
wordChunk | number | 1 | false | The number of words to be displayed per update |
Pauses playing of the words for the speed reading.
Resumes playing of the words for the speed reading.
Resets the speedy reader to the initial state.
Please read JSDocs for more information.
- React - A JavaScript library for building user interfaces
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
- Carl Saunders - Initial work - DeadlyByte
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE file for details.