Skip to content

Dropdown Menu

Displays a menu to the user—such as a set of actions or functions—triggered by a button.

BrDropdown is based on BrConfigProvider for global theme configuration (colors, radius, shadows, z-index tokens), supporting multiple trigger methods and position adaptation.

Basic Usage

Click the trigger to show the dropdown menu.

Example

Triggers

Supports custom trigger elements and Hover trigger (controlled via v-model:open).

Example

Positioning

Supports align and side props to control the popup position (12 directions).

Example

Groups & Separators

Use BrDropdownGroup and BrDropdownSeparator to group menu items. Supports disabled prop to disable menu items.

Example

Theming

Global configuration of Dropdown radius, background color, shadow, etc. via BrConfigProvider.

Example

API

BrDropdown

PropTypeDefaultDescription
defaultOpenbooleanfalseThe open state of the dropdown menu when it is initially rendered.
openbooleanundefinedThe controlled open state of the dropdown menu.
dir'ltr' | 'rtl'undefinedThe reading direction of the dropdown menu.
modalbooleantrueThe modality of the dropdown menu.

BrDropdownTrigger

PropTypeDefaultDescription
asChildbooleanfalseChange the default rendered element for the one passed as a child, merging their props and behavior.
disabledbooleanfalseWhen true, prevents the user from interacting with the item.

BrDropdownContent

PropTypeDefaultDescription
align'start' | 'center' | 'end''center'The preferred alignment against the anchor.
side'top' | 'right' | 'bottom' | 'left''bottom'The preferred side of the anchor to render against.
sideOffsetnumber4The distance in pixels from the anchor.
alignOffsetnumber0An offset in pixels from the "start" or "end" alignment options.
avoidCollisionsbooleantrueWhen true, overrides the side and align preferences to prevent collisions with boundary edges.
loopbooleanfalseWhen true, allows cycling through the items with the keyboard.
classstring''Custom class name.

BrDropdownItem

PropTypeDefaultDescription
disabledbooleanfalseWhen true, prevents the user from interacting with the item.
textValuestringundefinedOptional text used for typeahead purposes.
insetbooleanfalseWhether to add padding for items without icons to align with items with icons.
classstring''Custom class name.

BrDropdownLabel

PropTypeDefaultDescription
insetbooleanfalseWhether to add padding for labels to align with items.