Orbiting Elements
Web (React)
Elements that mathematically orbit around a central node in circular paths.
A beautiful physics-driven layout component. It places child elements evenly around a circle and rotates them around a center point. Crucially, each item counter-rotates at the exact same speed, ensuring icons and text never end up upside down as they travel the orbit.
☀️
🌎
🌕
🚀
🛰️
☄️
Installation
CLI
npx @modus-ui/cli add orbiting-elementsManual
- Copy the code from the component tab.
- Create a file at
components/ui/orbiting-elements.tsx. - Paste the code.
Usage
tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
radius | number | 100 | Orbit radius in pixels. |
duration | number | 20 | Seconds for one full orbit. |
reverse | boolean | false | Orbits counter-clockwise. |
showPath | boolean | true | Draws the orbit path. |
startAngle | number | 0 | Starting angle in degrees. |
Comments