Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/artempchela/wpm-calculator-react
https://github.com/artempchela/wpm-calculator-react
Last synced: 11 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/artempchela/wpm-calculator-react
- Owner: ArtemPchela
- License: mit
- Created: 2023-12-20T12:49:14.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-03-05T18:42:22.000Z (11 months ago)
- Last Synced: 2025-01-26T12:08:17.440Z (11 days ago)
- Language: TypeScript
- Size: 16.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Words per minutes calculator "wpm-calculator-react" React Component
A React component for calculating estimated reading time for a given text.
## Installation
You can install the `wpm-calculator-react` package via npm or yarn:
```bash
npm i wpm-calculator-react
# OR
yarn add wpm-calculator-react
```## Usage
Import the wpm-calculator-react component and use it in your React application:
```jsx
import React from "react";
import Wpm from "wpm-calculator-react";function App() {
const text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit...";
return (
My Blog Post
{text}
);
}export default App;
```Add text after of before `Wpm`
```tsx
min read
```## Props
* **text** (required): The text content for which you want to calculate the reading time.
* **className** (optional): An optional CSS class to style the component.
you can add your own **className** and style it in your css file
```tsx```
or wrap with your own div and style it
```tsx
```
* **wpm** (optional): The reading speed in words per minute (default: 183).or add your own **wpm**
```tsx
```
## License
This project is licensed under the MIT License. See the LICENSE file for details.## Author
Created by Artsiom Pchaliankou.If you have any questions or suggestions, please feel free to open an issue or contact me at [[email protected]]([email protected]).