A set of components for creating animated word cycling effects with different styles.
You can customize the FlipWord components by:
words prop to change the displayed textintervals and duration props to control the timing of animationsease prop to alter the animation styleclass propHere's an example of customized FlipWord components:
FlipWordDefaultThe FlipWordDefault component creates a word cycling effect with a scrolling animation.
| Prop | Type | Default | Description |
|---|---|---|---|
class | String | none | Additional CSS classes to apply to the component. |
words | Array | ['One', 'Two', 'Three'] | An array of words to cycle through. |
intervals | Number | 2000 | The time in milliseconds between word changes. |
duration | Number | 0.6 | The duration of the animation in seconds. |
ease | String | 'power3.out' | The easing function for the animation. |
The FlipWordFaded component creates a word cycling effect with a faded scrolling animation.
| Prop | Type | Default | Description |
|---|---|---|---|
class | String | none | Additional CSS classes to apply to the component. |
words | Array | ['One', 'Two', 'Three'] | An array of words to cycle through. |
intervals | Number | 500 | The time in milliseconds between word changes. |
duration | Number | 0.6 | The duration of the animation in seconds. |
ease | String | 'power3.out' | The easing function for the animation. |
start | Boolean | true | Whether the animation should start immediately. |
intervals and duration values to ensure readability.start prop to control when the animation begins, especially in dynamic layouts.While these components add visual appeal, ensure that they don't interfere with the readability or accessibility of the content. Consider providing alternative static text for screen readers if the animated content contains important information.
Both components use GSAP (GreenSock Animation Platform) for smooth animations.
FlipWordDefault:
FlipWordFaded:
For the full implementation details, please refer to the source code of each component.