Black Friday: 30% off Pro

Get 30% off

Updated

Share Menu

Preview

Share
Copy Link
Download
Print

Customize

Duration0.50s
Bounce0.00
Blur4px

Installation

npx shadcn@latest add https://uibrik.com/r/share-menu.json
Adds the files to components/uibrik/share-menu and installs @tabler/icons-react, motion and react-use-measure. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/share-menu.

Usage

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}/>

Where to use Share Menu

  • Sharing posts and products

    A button flipping open into a pill of options keeps share targets one tap away.

    Pairs with Copy Button

  • 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

Props

ShareMenu
label
Type string
"Share"
Text on the closed pill.
duration
Type number
0.5
How long the pill takes to resize.
bounce
Type number
0
Spring bounce of the resize.
blur
Type number
4
Blur as the label and options swap.
options
Type ShareOption[]
Copy link, Download, Print
Rows in the open menu: label, Icon, onSelect.