Orbit
Server ComponentIcons or avatars revolving around a nucleus on pure-CSS rings.
Import
import { Orbit, OrbitRing, OrbitItem } from "@cooud-ui/ui";
npx cooud-ui add orbit
Examples
API Reference
Generated from the component's exported types.
OrbitProps
Extends HTMLAttributes<HTMLDivElement>
No own props — see the extended type above for available props.
OrbitRingProps
Extends HTMLAttributes<HTMLDivElement>
| Prop | Type | Default | Description |
|---|---|---|---|
radius* | number | — | Radius of the ring in pixels — the distance from the nucleus' centre to the centre of each orbiting item. The ring renders as a `2 × radius` circle absolutely centred on the stage. |
duration | number | DEFAULT_DURATION | Seconds for one full revolution. Larger is calmer; concentric rings look best with distinct durations so their items never sync up. Defaults to `24`. |
reverse | boolean | false | Revolve counter-clockwise instead of clockwise. Defaults to `false`. |
startAngle | number | 0 | Angle of the first item's slot in degrees, measured clockwise from 12 o'clock. Remaining items stay evenly distributed after the offset. Use it to de-align concentric rings' starting positions. Defaults to `0`. |
guide | boolean | true | Draw the faint circular guide (`border-border/40`). Defaults to `true`. |
OrbitItemProps
Extends HTMLAttributes<HTMLDivElement>
No own props — see the extended type above for available props.