Dropdown
Description
Dropdown provides both Bulma-flavored and renderless dropdown primitives for Enso UI.
The Bulma entrypoint renders trigger, menu, transition, and placement behavior, while the renderless layer owns keyboard navigation, registration, and selection flow.
Installation
Install the package:
yarn add @enso-ui/dropdown
This package can also be consumed outside the Enso ecosystem.
Features
- exports
DropdownandDropdownItemfrom the Bulma entrypoint - exports
CoreDropdownfrom the renderless entrypoint - supports keyboard navigation, selection tracking, click-outside closing, and up/down placement
- composes cleanly with custom trigger, controls, and item slots
Usage
<script>
import { Dropdown, DropdownItem } from '@enso-ui/dropdown';
export default {
components: { Dropdown, DropdownItem },
};
</script>
Renderless usage:
import { CoreDropdown } from '@enso-ui/dropdown/renderless';
API
Dropdown
Bulma-styled dropdown wrapper.
Import: @enso-ui/dropdown
Props:
opensUp: booleandefaultfalse
Methods:
show()hide()
Slots:
triggerlabelcontrolsitems
DropdownItem
Selectable Bulma dropdown item.
Import: @enso-ui/dropdown
Props:
selected: booleandefaultfalse
Events:
select
CoreDropdown
Renderless dropdown state owner.
Import: @enso-ui/dropdown/renderless
Props:
disableControls: booleandefaultfalsedisabled: booleandefaultfalsedropdownClass: stringdefault'dropdown'itemClass: stringdefault'dropdown-item'manual: booleandefaultfalse
Events:
showhide
Depends On
Contributions
are welcome. Pull requests are great, but issues are good too.
Thank you to all the people who already contributed to Enso!