Skip to content

Dropdown API

API reference docs for the Stash Dropdown component. Learn about the props, CSS, and other APIs of this exported module.

Import

ts
import Dropdown from '@leaflink/stash/Dropdown.vue';

Props

NameTypeDefaultDescription
align"left" | "right"rightUsed to position the dropdown relative to target Options: left, right
closeManuallybooleanfalseIf true, dropdown will remain open when clicking on its content. Otherwise, it'll close automatically on click.
contentClassstring | ArrayCustom class to apply to the default dropdown content element
fluidContentbooleanfalseRemoves content container's max width
labelstring '' When passed, text with caret is displayed instead of default kebab menu.
offsetDropdownOffset() => ({})Used to horizontally and vertically offset the dropdown in pixels Keep in mind, `x` value is relative to `align` value.
reattachbooleantrueIf `reattach` is true, the contents will be mounted in the mount point container, so as to circumvent clipping issues from a parent's overflow property.

Slots

NameDescription
toggleToggle component slot, receives `toggle` method to trigger Dropdown display
defaultDropdown content slot. Receives `dismiss` method, to trigger manual close. You must call dismiss with parentheses. Receives `is-active` prop.

Events

NameDescription
toggle
dismiss