Morphing Text
Smoothly transition between words
Use the MorphingText
component to smoothly transition between words. The component creates captivating visuals that grab users attention and makes a memorable impression.
The component only expects an array of strings for the texts
prop to make it work. You can define as many words as you need.
RotatingText
component. Colors
The words are created using native HTML elements, meaning you can use CSS to style the text in any way you like. For example, to change the color of the text, you can use the className
prop to attach a class name to the element that you can target with CSS:
Animation Timing
By default, the animation plays over 1000ms. This, along with the delay between words can be configured with the animationTime
and wordDelay
props. Both props expect the time in seconds:
Sizes
Although font-size can be changed through CSS, the component has a size
prop you can use to make size adjustments quicker. Changing the size will affect the effect of the animation.
API
Prop | Default | Purpose |
---|---|---|
texts | [] | Sets the list of texts. |
size | 72pt | Sets the font size of the texts. |
animationTime | 1 | Sets the animation time in seconds. |
wordDelay | 1 | Sets the delay between words in seconds. |
className | - | Pass additional CSS classes for the component. |