# Gooey menu

> A floating action button whose actions bud off like liquid and merge back in.

- Type: Component (special)
- Access: Arc Pro
- Page: https://uiarc.dev/components/gooey-menu
- Markdown: https://uiarc.dev/components/gooey-menu/markdown
- Source file: `registry/components/gooey-menu/gooey-menu.tsx`
- Dependencies: motion, lucide-react
- Keywords: special, motion, new, gooey menu, metaball menu, liquid button, floating action button, fab menu, speed dial, svg goo filter, blob menu

## When to use

- A floating create button on a mobile or canvas screen with a few actions.
- A map or media view that needs quick actions without a toolbar.
- A playful product where the menu itself is part of the brand.

## When not to use

- Use dropdown-menu for more than five actions or actions with descriptions.
- Use a plain button when there is only one primary action.
- Use orbit-menu for a press and drag radial picker.

## Installation

Gooey menu is part of Arc Pro. The live preview is public; the source and install command need Pro.

### CLI with a Pro token

1. Create a token in your account and set it in the environment (or `.env.local`). Never commit it.

```bash
export ARC_PRO_TOKEN=arc_pro_...
```

2. Add the Pro registry to `components.json`:

```json
{
  "registries": {
    "@uiarc": "https://uiarc.dev/r/{name}.json",
    "@uiarc-pro": {
      "url": "https://uiarc.dev/r/pro/{name}.json",
      "headers": {
        "Authorization": "Bearer ${ARC_PRO_TOKEN}"
      }
    }
  }
}
```

3. Install:

```bash
npx shadcn@latest add @uiarc-pro/gooey-menu
```

### Manual

Signed-in Pro members can copy the source from the Manual tab on the docs page.

- Plans: https://uiarc.dev/pricing
- Create a Pro token: https://uiarc.dev/account#pro-access
- Setup guide: https://uiarc.dev/docs/ai#pro-access

## Usage

```tsx
import { GooeyMenu } from "@/components/arc/gooey-menu/gooey-menu";
import { Camera, FileText, Mic } from "lucide-react";

export function CreateButton() {
  return (
    <div style={{ position: "fixed", right: 24, bottom: 24 }}>
      <GooeyMenu
        items={[
          { label: "Note", icon: <FileText />, onSelect: () => createNote() },
          { label: "Photo", icon: <Camera />, onSelect: () => openCamera() },
          { label: "Voice memo", icon: <Mic />, onSelect: () => record() },
        ]}
      />
    </div>
  );
}
```

## API reference

### GooeyMenu

A floating action button whose actions bud off it like drops of liquid, pinch off, and merge back in on close. Labels fade in beside the bubbles.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `items` (required) | `GooeyMenuItem[]` | – | Actions with label, icon, onSelect, and optional disabled. The first sits nearest the button. |
| `open` | `boolean` | – | Controlled open state. |
| `defaultOpen` | `boolean` | `false` | Initial open state when uncontrolled. |
| `onOpenChange` | `(open: boolean) => void` | – | Called when the menu opens or closes. |
| `direction` | `"up" \| "down" \| "left" \| "right"` | `"up"` | Where the bubbles travel. |
| `labelSide` | `"start" \| "end"` | `"start"` | Side of the labels when bubbles travel up or down. Horizontal menus show a label above the hovered or focused bubble. |
| `label` | `string` | `"Create"` | Accessible name of the trigger and the menu. |
| `icon` | `ReactNode` | – | Trigger icon. Turns 45 degrees when open, so a plus becomes a close mark. Defaults to a plus. |
| `size` | `number` | `56` | Trigger diameter in px. Items are 80% of it. |
| `gap` | `number` | `14` | Space between bubbles in px. |
| `className` | `string` | – | Class on the root, which is exactly the trigger. Position it here. |
| `style` | `CSSProperties` | – | Inline style on the root. |

## Keyboard interactions

| Keys | Action |
| --- | --- |
| Enter / Space | Opens or closes the menu. Opening with the keyboard focuses the first action. |
| ArrowUp / ArrowDown on the trigger | Opens the menu and focuses the first action. |
| Arrow keys | Moves between actions, wrapping at the ends. |
| Home / End | Focuses the first or last action. |
| Escape | Closes the menu and returns focus to the trigger. |
| Tab | Closes the menu and moves on. |

## Accessibility

- The trigger has aria-haspopup="menu", aria-expanded, and aria-controls; actions are role="menuitem" in a labelled role="menu".
- Closed actions are inert, so they cannot be focused or clicked while hidden inside the button.
- Each action's visible label is its accessible name; icons are aria-hidden.
- Clicking outside closes the menu.

## Motion

- Bubbles are plain circles merged by an SVG blur and alpha threshold filter, so they stretch out of the button, neck, and pinch off; icons live in a crisp layer above.
- Opening uses a spring with bounce 0.32 and a 40ms stagger; closing uses a critically damped spring in reverse order so they merge as one pull.
- Hovered bubbles swell 12% and pressed ones dip, and the liquid bulges toward neighbours as they do.
- The trigger icon turns 45 degrees on a spring.
- Reduced motion drops the filter and travel; actions fade in and out in place.

## Responsive behavior

- The root is only the trigger, so it fits any corner; plan room for bubbles in the chosen direction.
- Labels sit beside vertical menus and need about 120px on that side.
- Taps respond on press with a dip; touch targets are at least 44px at the default size.

## Performance

- The SVG filter only repaints while bubbles move; at rest it is static.
- Bubble positions animate on transform through Motion.
- The filter region is sized to the reach of the menu so it never clips or grows larger than needed.

## Notes for AI

- Choose it for three to five quick create actions on a mobile screen, a canvas, or a map.
- Put the most common action first; it sits nearest the button.
- Position the root with fixed or absolute positioning; bubbles and labels overflow it on purpose, so do not clip the parent too tightly.
- The liquid is the accent (--accent with --accent-foreground icons), so it follows the accent setting. Set --goo-color and --goo-ink on the root to change the liquid and icon colors.
- Use direction="left" or "right" for toolbars along an edge.

## Related

- [Orbit menu](https://uiarc.dev/components/orbit-menu/markdown): Hold a button and its actions orbit out, ready to pick with a drag.
- [Action morph](https://uiarc.dev/components/action-morph/markdown): A floating button that morphs into a quick-action menu, then an inline form, then back with a check.
- [Dropdown menu](https://uiarc.dev/components/dropdown-menu/markdown): A focused list of actions anchored to a trigger.
- [Dock](https://uiarc.dev/components/dock/markdown): A floating tool dock with a gliding label, a springy selection, and trays that grow out of it.

## Also in docks and tabs

- [Share sheet](https://uiarc.dev/components/share-sheet/markdown): A Share button that opens into a panel with copy link, access level, channels, and people to send to.
- [Morph nav](https://uiarc.dev/components/morph-nav/markdown): A navigation bar that morphs into rich menus, search, and a compact state as one surface.
- [Liquid tab bar](https://uiarc.dev/components/liquid-tab-bar/markdown): Tabs with a lens selection that slides between them, swaps labels cleanly, and fills in icons as it passes.

## Guidance for AI tools

Gooey menu: A floating action button whose actions bud off like liquid and merge back in. 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://uiarc.dev/llms.txt
