Bubble Menu

A circular menu that expands with child elements positioned around a central button.

Demo

See the Bubble Menu component in action.

Installation

pnpm dlx shadcn@latest add https://shadcn-ui-variants.vercel.app/r/bubble-menu.json

Overview

A circular menu that expands with child elements positioned around a central button, inspired by material design principles. Perfect for contextual actions, tool palettes, or navigation menus.

Examples

Actions Menu

Creative Tools Palette

Navigation Wheel

Features

  • Smooth staggered animations
  • Auto-closes when clicking outside
  • Responsive hover states
  • Dark/light mode compatible
  • Fully customizable positioning

Styling Tips

  1. For better visibility: You can add a border to child buttons:

    <button className="size-full border-2 border-background ...">
  2. For tooltips: Wrap child buttons with Tooltip component:

    <Tooltip content="Delete"> <button>...</button> </Tooltip>
  3. For groups: Use multiple BubbleMenus with different positions:

    <BubbleMenu className="top-4 left-4">...</BubbleMenu> <BubbleMenu className="top-4 right-4">...</BubbleMenu>

BubbleMenu Props

PropTypeDefault
children
React.ReactNode
radius
number60
buttonSize
number40
subButtonSize
number35