1.1.10 • Published 2 years ago

react-text-animations v1.1.10

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

react-text-animations

A variety of text animations ready to be applied.

npm.io

Installation

npm i react-text-animations

Basic Usage

import TextAnimation from "react-text-animations";

const AnimatedText = () => {
    return (
        <TextAnimation.Slide target="Merciful" text={['Gracious', 'Peace', 'Knowing']}>
            Allah is The Merciful
        </TextAnimation.Slide>
    )
}

export default AnimatedText;

You can choose from a bunch of animations by typing TextAnimation.animationName, In the example above we used the Slide animation. Below is a list of the animations that can be used.

Animations List

Animations are separated to 2 types :

  1. Word

    • Push
    • Flip
    • Clip
    • Slide
    • Zoom
  2. Letter

    • Rotate1
    • Rotate2
    • Scale

Please feel free to suggest better names

Properties

For more flexibility, you can play with the animation properties, these properties are declared in the animation prop. <TextAnimation.Slide animation={{delay:1000}}>

PropDescription
animation.delayhow long to wait between transitions in millisecond
animation.durationhow long a transition will take in millisecond
animation.timingFunctionhow the animation progresses through the animation e.g(ease-in)
cnameuse this className to add your custom styling
idadding an id is also recommended for multiple text animations in a page.
loopset it to false if you want the animation to run once
<TextAnimation.Slide 
    target="Merciful" 
    text={['Gracious', 'Peace', 'Knowing']} 
    cname="textAnimation"
    id="textAnimation__slide"
    animation={{
        duration:1000,
        delay:2000,
        timingFunction:'ease-out',
    }}
    loop={false}
>
    Allah is The Merciful
</TextAnimation.Slide>
1.1.10

2 years ago

1.1.9

3 years ago

1.1.8

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.1

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago