# react-word-splitter

> This module enables devlopper to split words into word with span tag with react

Latest version **1.1.1** (published 2019-09-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-word-splitter
pnpm add react-word-splitter
yarn add react-word-splitter
bun add react-word-splitter
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2019-09-02 |
| First published | 2019-09-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 11 |
| Unpacked size | 14.9 KB |
| Known vulnerabilities | 0 (+6 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Shinyaigeek |
| Maintainers | shinyaigeek |
| Keywords | react, split, word |

## Links

- npm: https://www.npmjs.com/package/react-word-splitter
- Repository: https://github.com/Shinyaigeek/react-word-splitter
- Homepage: https://github.com/Shinyaigeek/react-word-splitter#readme
- Issues: https://github.com/Shinyaigeek/react-word-splitter/issues
- npm.io page: https://npm.io/package/react-word-splitter

## Dependencies (11)

- [react](https://npm.io/package/react.md) ^16.9.0
- [webpack](https://npm.io/package/webpack.md) ^4.39.3
- [react-dom](https://npm.io/package/react-dom.md) ^16.9.0
- [ts-loader](https://npm.io/package/ts-loader.md) ^6.0.4
- [typescript](https://npm.io/package/typescript.md) ^3.6.2
- [webpack-cli](https://npm.io/package/webpack-cli.md) ^3.3.7
- [@types/react](https://npm.io/package/@types/react.md) ^16.9.2
- [babel-loader](https://npm.io/package/babel-loader.md) ^8.0.6
- [@types/react-dom](https://npm.io/package/@types/react-dom.md) ^16.9.0
- [webpack-dev-server](https://npm.io/package/webpack-dev-server.md) ^3.8.0
- [html-webpack-plugin](https://npm.io/package/html-webpack-plugin.md) ^3.2.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.1.1 (latest) — 2019-09-02
- 1.1.0 — 2019-09-02
- 1.0.7 — 2019-09-02
- 1.0.6 — 2019-09-02
- 1.0.5 — 2019-09-02
- 1.0.4 — 2019-09-02
- 1.0.3 — 2019-09-02
- 1.0.2 — 2019-09-02
- 1.0.1 — 2019-09-02
- 1.0.0 — 2019-09-02

## README

# React-Word-Splitter

This module is React/Next Component, which makes words splitted by word or char with span tag and specific attribute.

## Installation

This module is available as an npm package.

```Console
// with npm
npm install react-word-splitter

// with yarn
yarn add react-word-splitter
```

## Usage

Here is a quick example to get you started, it's all you need:

```JSX
import React from "react";

import Splitter from "react-word-splitter";

export default function(){
    return(
        <Splitter
            rule="chars"
            eachClass="testClass"
            eachIdWithIndex="testID"
            indexOption="number"
            words="あいうえお"
        /> // <span class='testClass' id='testID__1'>あ</span><span class='testClass' id='testID__2'>い</span><span class='testClass' id='testID__3'>う</span><span class='testClass' id='testID__4'>え</span><span class='testClass' id='testID__5'>お</span>
    )
}
```

If you want to know in detail, Please check API set below.

## API

| Property | type | detail |
|:--------:|:----:|:------:|
|rule|"words" \| "chars"| set split option|
|eachClass|string|set common class each element has|
|eachIdWithIndex|string|set ID each element has with Index|
|indexOption|"number" \| string[] |set option about index|
|words|string|words which you want to split|

---
_Source: https://npm.io/package/react-word-splitter · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
