Skip to content
bitboss-ui3.0.0-beta.31

BbDropdown

An accessible action menu behind any trigger, including links, submenus and selectable groups.

import { BbDropdown } from 'bitboss-ui';

On this page

Use it for

Use BbDropdown to put several commands or navigation links behind one trigger: row actions, an account menu or a context menu. Describe rows with items; the component owns ARIA, focus and keyboard behavior.

Use something else when

Pass Through

Hover or tap a part to outline it. Toggles flip loading, errors and warnings when the component has them — only parts highlight.

Build a row actions menu

Spread the activator props onto a focusable trigger and pass the actions as data.

ORD-2026-0417 — no action yet

Use a real button and name icon-only triggers. The supplied props wire expanded state, focus return and keyboard navigation.

Choose the right item type

Use onClick for commands and href or to for navigation, so links keep native browser behavior.

Q2 revenue review.pdf

2.4 MB · shared with the Finance team

Items need a stable key; text is the label and description adds a second line. Gate destructive actions with useConfirm.

Coming from v2

text is the v3 item label, and destructive rows use variant: 'destructive'. In fetched groups, map extra row fields through itemProps; raw href, icons and disabled fields are otherwise ignored.

Use the directive for simple menus

When the trigger already exists and the menu is a flat items array, use the globally registered directive.

Signed in

Use the component for slots, sections or a <BbDropdownGroup> companion.

Track async actions

Return a promise from an item's onClick; the activator slot exposes loading until it settles and ignores repeat clicks.

Last synced at 09:24

Coming from v2

The exposed template-ref loading member is removed. Read the flag from the activator slot.

Give an item its own items array. Keep nesting shallow: the parent row opens the submenu and cannot also run an action or navigate.

Unassigned

Desktop uses flyouts; the mobile sheet drills down one level at a time.

Build selectable groups

Mark a group selectable, then bind its state with <BbDropdownGroup> using the same id as the group's key.

Sorted by recent · pending

Add multiple for checkbox semantics. Provider-backed groups can share the same fetch contract as BbSelect; keep enforce-coherence for lists that can change under an existing choice.

Rows that represent records

Carry application data in meta and target one group's rows with its named slot.

Working in Acme Studio

Use #<groupKey>:item:prepend for an avatar or logo. A slot replaces the icon on that edge; the selected check still wins on the trailing edge.

Place and size the panel

Choose placement and width for the surrounding layout.

width="100%" follows the anchor; numeric widths align repeated menus. For a context menu, pair trigger="contextMenu" with placement="cursor".

Coming from v2

arrowPadding is removed; dropdowns do not draw arrows.

Check the mobile sheet

On small screens the menu becomes a bottom sheet by default. Verify submenus and destructive actions on that surface.

Use :adaptive="false" only when the menu must remain a flyout. off-canvas-props configures the sheet.

Coming from v2

Adaptive mode is new and enabled by default in v3. offcanvasProps becomes offCanvasProps.

Style items

destructive is the only styled item variant. Register additional names through dropdownItemVariants, then style their generated modifier classes. Prefer pt:panel and pt:item for instance-level changes.

Coming from v2

The floating wrapper is now a <div>, not a <span>. Class hooks remain; only element-specific selectors stop matching.