Dropdown

A dropdown menu component that provides a flexible way to display a list of options or actions. It supports various features like positions, hints, titles and custom content.

Plese note: components using popout (Tooltip, Dropdown & Popout) cannot be styled using scoped CSS in Vue SFC. However, you can just define a new <style> tag, style the popout inside and keep rest of your CSS scoped in a separate <style scoped>.

Props

NameDefaultType
placementbottom-starttop right bottom left top-start top-end right-start right-end bottom-start bottom-end left-start left-end
Position of the dropdown relative to the trigger
minWidth156number string
Minimum width of the dropdown in pixels or CSS units
expandfalseboolean
Whether to expand the dropdown to match the trigger's width
maxHeight356number string
Maximum height of the dropdown before scrolling in pixels or CSS units
noMobileDrawerfalseboolean
Disables mobile drawer behavior and always uses floating dropdown
transition-namestring none
Allows you to change or disable the Vue transition for dropdown appear. By default, placement-based transition is used. Set to none when using the View Transitions API to prevent the default animation from conflicting with your view transition.

Events

NameTypeDescription
close-Emitted when the dropdown is closed

Slots

NameAcceptsPropsDescription
triggeranyDropdownSlotsPropsThe element that triggers the dropdown
defaultanyDropdownSlotsPropsThe dropdown content

Both slots share the same exposed properties

interface DropdownSlotsProps {
  isOpen: Ref<boolean>
  open: () => void
  close: () => void
  toggle: () => void
}

Components

The dropdopwn component is meant to be used with a few specific components. If you're looking for a generic floating component, check out the Popout.

A clickable item in the dropdown menu.

Props
NameDefaultType
disabledfalseboolean
Whether the item is disabled
Slots
NameAcceptsPropsDescription
defaultany-The main content of the item
hintany-Additional hint text to display

A title or header section in the dropdown menu which also divides the dropdown into sections.

Points
10
Manage
Props
NameDefaultType
stickyfalseboolean
Whether the title should stick to the top
Slots
NameAcceptsPropsDescription
defaultany-The title text
endany-Content to display at the end of the title