# Share Menu

> A share button that flips open into a pill of options, resizing to fit.

## Spec sheet

| | |
| --- | --- |
| Access | Free: no account, free for commercial use |
| Shelf | Components › Buttons |
| Live preview | https://uibrik.com/components/share-menu |
| Writes | 1 file into `components/uibrik/share-menu/` |
| Packages | `@tabler/icons-react`, `motion`, `react-use-measure` (the CLI installs them) |
| Needs | React 19, Tailwind CSS v4, a project set up with `npx shadcn@latest init` |
| Theme | Reads the shadcn tokens and follows class-based dark mode ([theming](https://uibrik.com/docs/theming.md)) |
| Updated | Nov 9, 2026 |

## Add it

```bash
npx shadcn@latest add https://uibrik.com/r/share-menu.json
```

With the `@uibrik` namespace in `components.json` ([setup](https://uibrik.com/docs/installation.md)): `npx shadcn@latest add @uibrik/share-menu`.

Can't run commands? https://uibrik.com/components/share-menu/prompt.txt has every file verbatim, with the setup steps, ready for an assistant to write.

## Render it

Renders as is; every value shown is the default, so delete any line you don't need.

```tsx
import { ShareMenu } from "@/components/uibrik/share-menu/share-menu";

const options = [
  { label: "Copy Link", Icon: LinkIcon },
  { label: "Download", Icon: DownloadIcon },
  // …1 more
];

<ShareMenu
  label="Share"
  duration={0.5}
  bounce={0}
  blur={4}
  options={options}
/>
```

## Tune it

The same props as the Customize panel on https://uibrik.com/components/share-menu.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `label` | `string` | `"Share"` | Text on the closed pill. |
| `duration` | `number` | `0.5` | How long the pill takes to resize. |
| `bounce` | `number` | `0` | Spring bounce of the resize. |
| `blur` | `number` | `4` | Blur as the label and options swap. |

## Wire it

The props the Customize panel doesn't show: ranges, data, content and callbacks.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `options` | `ShareOption[]` | `Copy link, Download, Print` | Rows in the open menu: label, Icon, onSelect. |

## Where it fits

- **Sharing posts and products**: A button flipping open into a pill of options keeps share targets one tap away. Pairs with [Copy Button](https://uibrik.com/components/copy-button.md).
- **Blog social links**: Resizing to fit lets the pill hold two or six networks.
- **Referral flows**: A compact share menu suits invite and referral prompts. Pairs with [Invite Members](https://uibrik.com/components/invite-members.md) (Pro).

## Same shelf: Buttons

- [Soft Button](https://uibrik.com/components/soft-button.md): A plain button made with care: a gentle top-to-bottom gradient, a faint inner highlight and shade, and a crisp border, in primary, secondary and accent.
- [Split Button](https://uibrik.com/components/split-button.md): A primary button with a menu of alternative actions; the chosen one rolls into the main label.
- [Stepper Button](https://uibrik.com/components/stepper-button.md): An add-to-cart button that reshapes into a quantity stepper in the same pill.
- [Tactile Toggle](https://uibrik.com/components/tactile-toggle.md): A single switch whose knob squishes under the finger, drags like the real thing and springs home on release.
- [Theme Switch](https://uibrik.com/components/theme-switch.md): Switches the page theme: the sun pulls in its rays and is eclipsed into a moon while the new theme spreads out from the button.
- [Announcement Pill](https://uibrik.com/components/announcement-pill.md): A small New pill for above a hero heading, with a band of light along its border and an arrow that grows on hover.

## Ground rules

- Only the props above exist. To change anything else, edit the installed file.
- Keep the files in `components/uibrik/share-menu/` so the import paths keep resolving.
- The playbook for working with the whole library: https://uibrik.com/llms.txt
