https://github.com/charlesstover/react-rainbow-text
Generates rainbow-colored text in React.
https://github.com/charlesstover/react-rainbow-text
babel babeljs enzyme es6 javascript jest js mocha npm npm-module npm-package npmjs react react-component reactjs travis travis-ci travisci webpack
Last synced: 5 months ago
JSON representation
Generates rainbow-colored text in React.
- Host: GitHub
- URL: https://github.com/charlesstover/react-rainbow-text
- Owner: CharlesStover
- License: mit
- Archived: true
- Created: 2018-08-11T16:14:34.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-03-24T04:19:38.000Z (over 3 years ago)
- Last Synced: 2024-05-10T18:58:10.894Z (about 1 year ago)
- Topics: babel, babeljs, enzyme, es6, javascript, jest, js, mocha, npm, npm-module, npm-package, npmjs, react, react-component, reactjs, travis, travis-ci, travisci, webpack
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/react-rainbow-text
- Size: 970 KB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rainbow Text for React [](https://twitter.com/intent/tweet?text=Beautifully%20rainbowify%20your%20text%20with%20the%20%20React%20component.%20pic.twitter.com/moyzdOUjdg&url=https://github.com/CharlesStover/react-rainbow-text&via=CharlesStover&hashtags=react,reactjs,javascript,webdev,webdeveloper,webdevelopment)
Generates rainbow-colored text in React.
[](https://www.npmjs.com/package/react-rainbow-text)
[](https://www.npmjs.com/package/react-rainbow-text)
[](https://www.npmjs.com/package/react-rainbow-text)
[](https://www.npmjs.com/package/react-rainbow-text)
[](https://travis-ci.com/CharlesStover/react-rainbow-text/)[](https://charlesstover.github.io/rainbow-text/)
## Install
* `npm install react-rainbow-text --save` or
* `yarn add react-rainbow-text`## Use
```JS
import RainbowText from 'react-rainbow-text';This is an example sentence that is the color of the rainbow.
```
[](https://charlesstover.github.io/rainbow-text/)## Props
* component
A custom component used for rendering each character.
``
* lightness
A number from 0 to 1 to represent how dark or light the text is. Default: `0.5`
0 is black.
1 is white.
0.5 is full color.
**Example of 0.25 Lightness:**[](https://charlesstover.github.io/rainbow-text/)
**Example of 0.75 Lightness:**[](https://charlesstover.github.io/rainbow-text/)
* opacity
A number from 0 to 1 to represent the opacity of the text. Default: `1`
* saturation
The saturation of the colors. Default: `1`
0 is grayscale.
1 is full color.**Example of 0.5 Saturation:**
[](https://charlesstover.github.io/rainbow-text/)
**Example of 0.25 Saturation:**
[](https://charlesstover.github.io/rainbow-text/)