Skip to content

Radial menu

Items fan out on damped springs from a trigger. Built as a standard menu button: roving tabindex, arrow keys walk the ring and wrap, Home and End jump, typing jumps to a label, Escape closes and returns focus to the trigger, and the chosen item is announced through a polite live region. With reduced motion the items appear instantly in place with no spring.

  • Spring Physics
  • Roving Tabindex
  • aria-live
  • prefers-reduced-motion

radial-menu

Tab to the plus, press Enter or Space. Arrow keys walk the ring, Home and End jump, type a letter to jump to a label, Escape closes and puts focus back on the plus.

Last chosen

Nothing yet

Focus order

  1. 1. Reply
  2. 2. Pin
  3. 3. Share
  4. 4. Move
  5. 5. Archive
  6. 6. Mute

Menu is closed. Only the highlighted item is a tab stop (roving tabindex).

Focus trail: none yet

Usage

Drop it in

import
import { RadialMenu } from "@/app/lib/components/radial-menu";
example 1
<RadialMenu items={[{ id: "copy", label: "Copy" }]} onSelect={(item) => run(item.id)} />

API

Props

PropTypeDefault
items*RadialMenuItem[]—
label

Accessible name for the trigger and the menu.

string"Actions"
radius

Distance from the trigger centre to each item centre, in px.

number112
startAngle

Angle of the first item in degrees. -90 is straight up.

number-90
sweep

Degrees covered by the ring. 360 closes the ring; less fans the items across an arc.

number360
stiffness

Spring stiffness (higher is snappier).

number300
damping

Spring damping (lower overshoots more).

number17
staggerMs

Delay between one item starting and the next, in ms.

number28
reducedMotion

Force reduced motion on or off. Leave undefined to follow the system setting.

boolean—
onSelect(item: RadialMenuItem, index: number) => void—
onActiveChange

Fired when keyboard or pointer focus lands on an item (the roving tab stop).

(item: RadialMenuItem, index: number) => void—
onOpenChange(open: boolean) => void—
classNamestring""

Read from the component's source at build time. * required.

Accessibility

Works with

Cursor
Reacts to where the pointer is, not just whether it's over the element.
Touch
Follows your finger while it's down, then settles a moment after you lift.
Keyboard
Focus lights it up the way the cursor does. Every action has a key.
Reduced motion
Nothing moves or springs. Colour still answers, without drifting.