Xzero UI
Pro library

Orbit menuPro

Hold a button and its actions orbit out, ready to pick with a drag.

$ pnpm dlx shadcn@4.23.0 add @xzero-ui-pro/orbit-menu
Live · keyboard ready

When to use

When not to use

Installation

Register both Xzero UI namespaces in your project's components.json:

{
  "registries": {
    "@xzero-ui": "https://mcp.xzero.co.uk/r/{name}.json",
    "@xzero-ui-pro": "https://mcp.xzero.co.uk/r/pro/{name}.json"
  }
}
npx shadcn@4.23.0 add @xzero-ui-pro/orbit-menu

Install xzero-foundation once, and import @/components/xzero/foundation.css in your app root. No Xzero token is used by this snapshot. For sample portraits, photos, fonts, or logos, download https://mcp.xzero.co.uk/install-assets.mjs and run node xzero-install-assets.mjs <receiving-project>.

Usage

import { OrbitMenu } from "@/components/xzero/orbit-menu/orbit-menu";
import { Pin, Share2, Trash2 } from "lucide-react";

export function NoteActions({ onAction }: { onAction: (id: string) => void }) {
  return (
    <OrbitMenu
      label="Note actions"
      onAction={onAction}
      actions={[
        { id: "pin", label: "Pin", icon: <Pin size={18} />, done: "Pinned" },
        { id: "share", label: "Share", icon: <Share2 size={18} /> },
        { id: "delete", label: "Delete", icon: <Trash2 size={18} />, tone: "danger" },
      ]}
    />
  );
}

API reference

OrbitMenu

A round button that bursts into an arc of actions. Press, drag onto an action, and release to fire it, or tap to keep the arc open and tap again to close it.

PropTypeDefaultDescription
actions (required){ id: string; label: string; icon: ReactNode; done?: string; tone?: "neutral" | "danger" }[]–Three to six actions. done is the short confirmation shown after firing and defaults to the label.
onAction (required)(id: string) => void–Called with the fired action's id.
labelstring"Actions"Accessible name of the button and menu, also shown while the arc is open and nothing is targeted.
radiusnumber104Distance from the button center to each action, in px.
spreadnumber150Degrees the arc spans.
directionnumber-90Degrees the arc opens toward: -90 up, 0 right, 90 down, 180 left.
disabledbooleanfalseDisables the trigger and closes the arc.
announcebooleantrueAnnounces confirmations in a polite status region.
onOpenChange(open: boolean) => void–Called when the arc opens or closes.
classNamestring–Class on the root element.

Keyboard interactions

KeysAction
Arrow keysOn the trigger, open the arc and focus the first action (Arrow Up focuses the last). On an action, move around the arc.
Home / EndFocus the first or last action.
Enter / SpaceFire the focused action. On the trigger, open the arc and focus the first action, or close it if open.
EscapeClose the arc and return focus to the trigger.
TabClose the arc and move on.

Accessibility

Motion

Responsive behavior

Performance

Notes for AI

Also in docks and tabs

Guidance for AI tools

Orbit menu: Hold a button and its actions orbit out, ready to pick with a drag. Follow the declared prop types and do not invent props. Keep keyboard access, reduced motion support, and both light and dark themes intact when adapting it.

Full library index: https://ui.xzero.co.uk/llms.txt

Browse all components