Button Menu is a trigger button that opens a menu of related actions when activated.
Loading demo: button-menu-real-world
npx sdaia-ui@latest add buttonmenu
import { Button } from '@/components/ui/Button';import { Button } from '@/components/ui/Button';The default button close style.
Loading demo: button-menu-default
Use the `size` prop to change the size of the button menu.
Loading demo: button-menu-sizes
Use the `iconOnly` prop to change the layout of the button menu.
Loading demo: button-menu-icon-only
Props for the Button Menu component.
Prop | Type | Default | Required |
|---|---|---|---|
variant | 'neutral' | 'primary' | 'secondary-solid' | 'secondary-outline' | 'subtle' | 'transparent' | 'neutral' | optional |
size | 'sm' | 'md' | 'lg' | 'md' | optional |
leadingIcon | ReactNode | — | optional |
iconOnly | boolean | — | optional |
disabled | boolean | — | optional |
selected | boolean | — | optional |
fullWidth | boolean | — | optional |
dir | 'ltr' | 'rtl' | — | optional |
as | ElementType | — | optional |
children | ReactNode | — | optional |
How this component behaves at the three system breakpoints. Spacing and type tokens switch automatically at 768px and 1280px.
| Screen | Behavior |
|---|---|
| Desktop (1280px and up) | Sized by its label, or the full width of its container with fullWidth. The menu opens below the button, at least 180px wide. |
| Tablet (768–1279px) | Same layout as desktop, with the tablet token values. |
| Phone (under 768px) | Same with the mobile token values. The menu is never wider than the screen minus 32px; long item labels are truncated. Use fullWidth in narrow layouts. |