1.0.6 • Published 4 years ago

@twistezo/react-text-scramble v1.0.6

Weekly downloads
9
License
MIT
Repository
github
Last release
4 years ago

React text scramble effect

  • React & TypeScript component
  • lightweight package ~7kB

Live example

Setup

npm install @twistezo/react-text-scramble
or
yarn add @twistezo/react-text-scramble

Usage

const texts: ScrambleTexts = [
  'lorem ipsum',
  'dolor sit amet',
  'consectetur adipiscing elit'
]

<TextScramble texts={texts} />

Types and props

type ScrambleText = string

type ScrambleTexts = ScrambleText[]

type TextScrambleProps = {
  texts: ScrambleTexts
  className?: string
  letterSpeed?: number // [ms]
  nextLetterSpeed?: number // [ms]
  paused?: boolean
  pauseTime?: number // [ms]
}

Defaults

letterSpeed = 5
nextLetterSpeed = 100
paused = false
pauseTime = 1500
1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago