Docs
Cloud Orbit
Cloud Orbit
This component creates a dynamic and interactive experience, where each icon orbits in a fluid motion. You can customize the speed, size, and duration of the animations for both the central element and the orbiting icons.
Loading...
Installation
Install dependencies
npm install
Add util file
lib/utils.ts
Add the following code in your tailwind.config.js file
tailwind.config.js
Copy the source code
cloud-orbit.tsx
Props
cloud-orebit props
Prop | Type | Description | Default |
---|---|---|---|
duration | number | The duration in seconds for each image to stay visible in the orbit animation | 3 |
children | React.ReactNode | Optional content to display in the center of the orbit | - |
size | number | The size of the orbit container (in pixels) | 160 |
className | string | Additional CSS classes to apply to the container | - |
images | Array<{ url: string; name: string }> | An array of image objects to display in the orbit animation | [] |
orbiting-image props
Prop | Type | Description | Default |
---|---|---|---|
speed | number | The speed of the orbit animation | 20 |
radius | number | The radius of the orbit path (in pixels) | 100 |
startAt | number | Start time offset for the orbit animation (in seconds) | 0 |
size | number | The size of each orbiting image (in pixels) | 80 |
className | string | Additional CSS classes to apply to the orbiting image container | - |
images | Array<{ url: string; name: string }> | An array of image objects to display in the orbit animation | [] |
duration | number | The duration in seconds for each image to stay visible in the orbit animation | 3 |