0.0.4 • Published 6 years ago

react-bouncing-text v0.0.4

Weekly downloads
16
License
-
Repository
-
Last release
6 years ago

Bouncing Text

A styled react component. Liven your text up.

Bounce the text by clicking/hovering on it.
The animation will not be triggered until last animation has finished!

Usage

Install:

npm install --save react-bouncing-text

// or

yarn add react-bouncing-text

Example:

import BouncingText from 'react-bouncing-text';

const MyBouncingText = () => {
  <BouncingText
    className={myClassName}
    text={myTextToShow} 
    clickable
    hoverable 
    delay={ms} 
    duration={ms}
  >
};

export default MyBouncingText;

API

BouncingText

PorpertyDescriptionTypeDefault
classNamespecify class name of whole textString--
texttext to displayString--
clickablewhether triggerable by clickingBooleanfalse
hoverablewhether triggerable by hoveringBooleanfalse
delaydelay for each text. every character's delay will time the index of itself. (ms)Number--
durationduration for each text. duration start after delay for each character. (ms)Number--

You should not keep text, delay, duration empty.

Demo

Codepen