Infinite Ribbon
A dynamic and customizable sliding ribbon component that enhances UI experiences with smooth scrolling animations.
Installation
Install dependencies
npm install
Add utils file
lib/utils.ts
Add the following code in your tailwind.config.js file
tailwind.config.js
Copy the source code
infinite-ribbon.tsx
Props
Prop | Type | Description | Default |
---|---|---|---|
repeat | Number | Defines how many times the content is repeated in the sliding animation. | 5 |
duration | Number | The duration of the sliding animation in seconds. | 10 |
reverse | Boolean | Reverses the direction of the sliding animation if set to "true". | false |
rotation | Number | Rotates the entire sliding ribbon by a specified angle (in degrees). | 0 |
children | React.ReactNode | The content inside the sliding ribbon. | - |
className | String | Additional custom classes for styling the component. | - |