Skip to content

shuding/shuffle-char

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Char Shuffling for React

npm i shuffle-char -S or yarn add shuffle-char

Usage

import Shuf from 'shuffle-char'
<h1>
  <Shuf on={running} charset='a-zA-Z_' escape='()' idle={80}>Hack(FDU)</Shuf>
</h1>
<h2>
  <Shuf on={running} charset='0-9' idle={80}>150</Shuf>+ teams,
  <Shuf on={running} charset='0-9' idle={80}>500</Shuf>+ participants
</h2>

Demo

screenshot

API

Props supported:

  • on: boolean, If true the animation will keep running, else it will display the default value.
  • charset: string, 'a-z' / 'A-Z' / '0-9' + any characters. e.g. 'a-zA-Z_' includes all alphabets and underscore.
  • escape: string, Characters excluded from the charset above. e.g. charset='a-z' and escape='x' includes all lowercase letters exclude x.
  • idle: number, The animation interval in ms.

License

The MIT license.

Releases

No releases published

Packages

No packages published