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
Name | Type | Default | Description |
---|---|---|---|
align | "left" | "right" | right | Used to position the dropdown relative to target Options: left, right |
closeManually | boolean | false | If true, dropdown will remain open when clicking on its content. Otherwise, it'll close automatically on click. |
contentClass | string | Array |
| Custom class to apply to the default dropdown content element |
fluidContent | boolean | false | Removes content container's max width |
label | string | '' | When passed, text with caret is displayed instead of default kebab menu. |
offset | DropdownOffset | () => ({}) | Used to horizontally and vertically offset the dropdown in pixels Keep in mind, `x` value is relative to `align` value. |
reattach | boolean | true | If `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
Name | Description |
---|---|
toggle | Toggle component slot, receives `toggle` method to trigger Dropdown display |
default | Dropdown content slot. Receives `dismiss` method, to trigger manual close. You must call dismiss with parentheses. Receives `is-active` prop. |
Events
Name | Description |
---|---|
toggle | |
dismiss |