1.0.3 • Published 5 years ago

react-rainbow-text v1.0.3

Weekly downloads
11
License
MIT
Repository
github
Last release
5 years ago

Rainbow Text for React Tweet

Generates rainbow-colored text in React.

version minified size minzipped size downloads build

animated demo

Install

  • npm install react-rainbow-text --save or
  • yarn add react-rainbow-text

Use

import RainbowText from 'react-rainbow-text';

<RainbowText lightness={0.5} saturation={1}>
  This is an example sentence that is the color of the rainbow.
</RainbowText>

screenshot

Props

  • component

    A custom component used for rendering each character.

    <Component children={THE_CHARACTER} color={THE_COLOR} />

  • 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:

    image

    Example of 0.75 Lightness:

    image

  • 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:

    image

    Example of 0.25 Saturation:

    image

1.0.3

5 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.0.1

6 years ago