1.0.1 • Published 3 years ago

react-scramble-text v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

react-scramble-text

Made with create-react-library

NPM JavaScript Style Guide

Demo

Install

npm install --save react-scramble-text

Usage

import React, { Component } from 'react'

import TextScrambler from 'react-scramble-text'
import 'react-scramble-text/dist/index.css'

class Example extends Component {
  render() {
    const phrases = ["The way to get started is to", "quit talking", "and", "begin doing", "-Walt Disney"]
    return <TextScrambler phrases={phrases}
                          speed={50}
                          pauseTime={800}/>
  }
}

Props

PropertyTypeDefaultDescription
phraseslist of stringsNoneThe list of phrases to be used.
speednumber80The speed of the symbol alterations in ms.
pauseTimenumber1000The length of time a phrase is shown before transition to the next.
charsstring"!<>-_\/[]{}—=+*^?#____"The symbols to be used randomly in phrase transitions.
repetitionsnumber-1The number of times the phrases should be shown (default in infinite).
symbolColorstring"rgb(143, 143, 143)"The color of the symbols used in phrase transitions.

License

MIT © crnorthc