Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/artempchela/wpm-calculator-react


https://github.com/artempchela/wpm-calculator-react

Last synced: 11 days ago
JSON representation

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]).