Components

Button Menu

Dropdown menus with items, submenus, dividers, and labels.

UiButtonMenu renders a button that opens a dropdown. Fill its #menu slot with UiButtonMenuItem, UiButtonMenuSubmenu, UiButtonMenuDivider, and UiButtonMenuText; items take their label from item-text.

Build a menu

<template>
  <UiButtonMenu variant="outline" text="Actions">
    <template #menu>
      <UiButtonMenuText item-text="Manage" />
      <UiButtonMenuItem item-text="Edit" icon="&#xe3c9;" />
      <UiButtonMenuItem item-text="Duplicate" icon="&#xe14d;" shortcut="Ctrl+D" />
      <UiButtonMenuDivider />
      <UiButtonMenuItem item-text="Delete" icon="&#xe872;" is-destructive />
    </template>
  </UiButtonMenu>
</template>

Add a submenu

<template>
  <UiButtonMenu text="More">
    <template #menu>
      <UiButtonMenuItem item-text="Share" icon="&#xe80d;" />
      <UiButtonMenuSubmenu item-text="Export" icon="&#xe2c6;" placement="right">
        <UiButtonMenuItem item-text="PDF" />
        <UiButtonMenuItem item-text="CSV" />
      </UiButtonMenuSubmenu>
    </template>
  </UiButtonMenu>
</template>

Keyboard

The menu follows the WAI-ARIA menu button pattern. Enter, Space, ↓ or ↑ on the button open the menu and focus its first item (↑ focuses the last).

KeyIn the menu
↓ / ↑Next / previous item, wrapping at the ends
Home / EndFirst / last item
A letterNext item whose label starts with it
→ / ←Open a submenu on its first item / close it back to its item
Enter / SpacePick the item
EscClose the menu (not a dialog around it) and focus the button
TabClose the menu and move to the next element

After an item is picked from the keyboard, focus goes back to the button; after a click it stays where the click left it. Disabled items are skipped. The panel is a role="menu", items are menuitems (or menuitemcheckboxes with checked) and dividers are separators.

UiButtonMenu props

Takes UiButton's look and state props (id, text, title, variant, color, size, icon, iconVariant, iconTrailing, disabled, loading, rounded, fluid, customClass). The trigger is always a button, so the link props (to, href, as) and type don't apply. It adds:

PropTypeDefaultDescription
placementFloatingPlacement'bottom'Dropdown placement (top, bottom, left, right, …).
tooltipTextstring | nullnullTooltip on the trigger, and its accessible name when there is no text or title. Without it, an icon-only trigger is named by the buttonMenu.ariaLabel label ("Menu").
tooltipPlacementFloatingPlacement'top'Tooltip placement.
isMobilebooleanfalseDisable dropdown positioning (bottom sheet on mobile).

Slots: menu (the dropdown content), icon (the trigger icon). Emits: click (with the MouseEvent).

UiButtonMenuItem props

PropTypeDefaultDescription
itemTextstring—Item label.
iconstring | null—Leading Material Symbols code.
iconClass / iconStylestring | string[] | null / string | object | null—Classes and inline styles for the leading icon.
iconTrailingstring | null—Trailing icon code.
iconTrailingClass / iconTrailingStylestring | string[] | null / string | object | null—Classes and inline styles for the trailing icon.
badgePartial<IBadgeProps> | null—Inline badge config.
shortcutstring | null—Shortcut hint (e.g. Ctrl+S).
isDestructivebooleanfalseDestructive (danger) styling.
disabledbooleanfalseDisable the item.
keepOpenbooleanfalseKeep the menu open after a click. By default a click closes the menu and any parent submenu.
checkedboolean | nullnullMake the item a checkbox (role="menuitemcheckbox") in this state. Pair it with keepOpen for toggles.
customClassstring | string[] | null—Extra classes on the item.

UiButtonMenuSubmenu props

The submenu takes an item's look (itemText, icon, iconClass, iconStyle, iconTrailing, iconTrailingClass, iconTrailingStyle, badge, isDestructive, disabled, customClass) and fills its default slot with the nested items. → opens it on its first item and ← closes it.

PropTypeDefaultDescription
idstring | null—Id of the nested dropdown.
placementFloatingPlacement'right'Where the submenu opens.
isMobilebooleanfalseDisable positioning (bottom sheet on mobile).

CSS variables

The menu panel (.v-popper--theme-dropdown, shared by every dropdown) reads these variables. Set them on :root to restyle all menus. The mobile bottom sheet keeps its larger item padding and corners. Hover and pressed backgrounds come from the shared state layer.

:root {
  --cffy-dropdown-radius: var(--cffy-radius-md);
  --cffy-dropdown-item-active-bg-color: var(--cffy-primary-container);
  --cffy-dropdown-item-active-color: var(--cffy-on-primary-container);
}
VariableDefaultControls
--cffy-dropdown-bg-color / --cffy-dropdown-color--cffy-surface-overlay / --cffy-on-backgroundPanel background and text
--cffy-dropdown-border-color--cffy-outline-overlayPanel border
--cffy-dropdown-radius--cffy-shape-containerPanel corners (items use half)
--cffy-dropdown-shadow--cffy-shadow-lgPanel shadow
--cffy-dropdown-padding--cffy-space-4Panel padding
--cffy-dropdown-min-width12remPanel minimum width
--cffy-dropdown-easing / --cffy-dropdown-duration--cffy-ease-overshoot-soft / --cffy-duration-500Opening animation
--cffy-dropdown-item-colorthe panel text colorItem text
--cffy-dropdown-item-font-size--cffy-fs-3xsItem text size
--cffy-dropdown-item-radiushalf the panel radiusItem corners
--cffy-dropdown-item-padding-inline / --cffy-dropdown-item-padding-block--cffy-space-8 / --cffy-space-8Item padding
--cffy-dropdown-item-hover-color--cffy-on-backgroundHovered item text
--cffy-dropdown-item-active-color / --cffy-dropdown-item-active-bg-color--cffy-on-background / --cffy-surface-container-highestSelected, focused and pressed item
  • UiButtonMenuDivider — visual separator.
  • UiButtonMenuText — non-interactive label (itemText).
Copyright © 2026