Skip to content

A React component library that enables developers to create a slot machine-like effect for an array of strings

Notifications You must be signed in to change notification settings

olwooz/react-slot-machine-text

Repository files navigation

react-slot-machine-text

react-slot-machine-text

https://www.npmjs.com/package/react-slot-machine-text

Installation

npm i react-slot-machine-text

Usage

import { SlotMachine } from 'react-slot-machine-text';

/* ... */
<SlotMachine 
  initialText={'Click Me!'}
  textData={['Option #1', 'Option #2', ...]} // array of string
  random={true} // whether the options are displayed in a random order (true) or in sequential order (false), true by default
/>
/* ... */

Style

/* change the style of the inner text (<p>) */

.slotMachineText {
  font-size: xx-large;
  caret-color: transparent;
  cursor: pointer;
}

About

A React component library that enables developers to create a slot machine-like effect for an array of strings

Resources

Stars

Watchers

Forks

Packages

No packages published