
Navigation · Free
Radial menu
A round menu cut like a citrus around the Bot: segments fill like jelly when pointed at and open into their own rings.
Free on Gumroad: the download arrives in your inbox.
Details
- Category
- Navigation
- Plan
- Free
- Code
- React + Tailwind, TypeScript · 397 lines
- Files
- RadialMenu.tsx
- Needs
- The Bot (installed with it)
- Agents
- MCP server and shadcn registry
About
A round menu cut like a citrus, always on screen: thick segments with soft corners around a hollow middle where the Bot sits. Each segment is a rind with a small pill of flesh inside. Point at a segment (or press it) and the pill swells until it fills the whole segment, on a loose spring, like jelly; move away and it shrinks back. A press lands with a squash and a wobble and nudges the two neighbours.
A segment with more inside opens into its own ring: the others sink and the new segments pop out of the Bot one after another. Press the Bot to go back. The Bot looks at whatever you point at.
Each segment shows a big number when it has a count (unread, drafts, items…), otherwise a filled icon, with its name underneath. Good for quick actions, a mail or files hub, a creative tool's palette, or a home screen that's more fun than a list.
React + Tailwind and the Bot, no other libraries.
Install
With the shadcn CLI:
npx shadcn@latest add https://www.stackd.codes/r/radial-menu.jsonOr let your agent add it through the StackD MCP server:
claude mcp add --transport http stackd https://www.stackd.codes/mcpPrompt for your agent
Paste it into Claude Code, Cursor, Codex or VS Code once the MCP server is connected.
Add the StackD Radial menu component to this project. Use the StackD MCP server: call get_component with { "name": "radial-menu" }, write the files at the paths it gives and install any npm packages it lists. Then use it where it fits, following its README for the props, and keep its own styles.Use
- Copy
RadialMenu.tsxandBot.tsxinto the same folder (for examplecomponents/). - Use it:
import { RadialMenu, type RadialItem } from './components/RadialMenu'
const items: RadialItem[] = [
{ id: 'inbox', label: 'Inbox', count: 12 },
{ id: 'drafts', label: 'Drafts', count: 3 },
{ id: 'edit', label: 'Edit', icon: 'M5 19h4L19 9l-4-4L5 15z' },
{
id: 'share', label: 'Share', icon: { line: 'M12 4v10M8.5 7.5 12 4l3.5 3.5' },
children: [
{ id: 'link', label: 'Copy link', icon: 'M10 14a4 4 0 0 0 6 0l3-3a4 4 0 0 0-6-6l-1 1' },
{ id: 'mail', label: 'Email', icon: { fill: 'M5 5h14a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2z', cut: 'M4 7l8 6 8-6' } },
],
},
]
<RadialMenu items={items} onSelect={(item, path) => run(item.id)} />
onSelect gets the item chosen and the path to it ([Share, Email]). Segments with children don't call it; they open their ring.
Icons
An icon lives in a 24-unit box and takes the segment's text colour. Either a path drawn as a line (icon: 'M…'), or { fill, cut, line }: fill is filled, cut is cut out of it as lines (the envelope's flap, the trash bin's stripes) and line is drawn on top. The demo's filled set is in the Figma file.
In Next.js the files already start with 'use client'. In other React setups that line does nothing.
Options
| Prop | Default | What it does |
|---|---|---|
items | The segments: { id, label, count?, icon?, children? }. Best with 4 to 8 | |
onSelect | Called with the item and the path to it | |
theme | 'dark' | 'dark' (on ink) or 'light' (on white) |
size | 320 | Diameter in px. Text and icons grow with it |
bot | true | Show the Bot in the middle |
highlight | Keep one item full, by id. For covers and mock-ups | |
className | Extra classes |
Accessibility
It's a real menu: Tab to it, the arrow keys go round (the segment gets an Ochre outline), Enter or Space chooses, Escape or Backspace goes back a ring. Each segment has its name (and count) for screen readers. On touch, a tapped segment stays full for half a second so you see what you pressed; press and slide round the ring to move between segments. With reduced motion on there are no springs: the segments fill and empty straight away.
Colours from StackD
White #FFFFFF · Ink #141310 · Wine #901919 · Olive #6C8544 · Ochre #BE9344 · Lilac #C9B8FF
Licence
You can use it in personal and commercial projects. Don't resell or share the component on its own.
Made by StackD · stackd.codes


