Radial Menu
ProNewSpring-animated radial action ring that blooms around its center trigger with Escape-to-close and selection announcements.
Installation
pnpm dlx shadcn@latest add @viewport/radial-menu
First time? Add the @viewport registry to components.json. Setup takes one minute.
Usage
The code behind the preview above comes with Truffle Pro.
Props
| Prop | Type | Default |
|---|---|---|
| actions* | RadialAction[]Actions arranged in a circle around the center trigger. | — |
| radius | numberOrbit radius in pixels. | 76 |
| onSelect | (action: RadialAction) => voidCalled when an action is selected. | — |
| className | string | — |
Accessibility
- Trigger exposes aria-expanded; items use role=menu and role=menuitem with accessible labels.
- Escape closes the ring; selections are announced through a status region.
- Orbital bloom animation snaps immediately under reduced motion.