# Dropdown
To use the custom dropdown you need to import the custom made component:
import {DropDown} from 'src/components'
Global usage
Vue.component(DropDown)
For local usage
export default {
components: {
DropDown
}
}
2
3
4
5
:::warning
Note Drop-down uses a click outside directive internally. You will get a warning if the directive is not imported.
You can find the declaration of this directive in src/globalDirectives.js
:::
# Simple
:::tip
You can specify the tag that the dropdown will be rendered with through the tag
prop
:::
# As button
# Split button dropdowns
Similarly, create split button dropdowns with virtually the same markup as single button dropdowns, but with the addition of .dropdown-toggle-split for proper spacing around the dropdown caret.
We use this extra class to reduce the horizontal padding on either side of the caret by 25% and remove the margin-left that’s added for regular button dropdowns. Those extra changes keep the caret centered in the split button and provide a more appropriately sized hit area next to the main button.
# DropDown Props
# Events
Event Name | Description | Parameters |
---|---|---|
change | triggers when the dropdown is opened/closed | the updated value |
# Slots
Name | Description |
---|---|
default | content for dropdown menu |
title | content for dropdown title |
← Date Pickers Inputs →