Import
Usage
SelectMenu Props
HTML id for the component. Used to generate dropdown button id as
{id}-dropdown.Array of options to display in the dropdown menu. Each object has a
name (displayed label) and value (form value).The currently selected value.
Alignment of the dropdown panel relative to the button.
When true, the dropdown opens on hover instead of click.
Disables the backdrop blur effect on the dropdown panel.
Prevents the dropdown from closing when clicking outside.
When true, uses the custom dropdown slot instead of displaying the selected value.
Custom class for the dropdown panel background.
Custom class for the dropdown option buttons.
Object-based class names for conditional styling on the dropdown button.
All standard HTML select attributes are supported (except
class and size).Slots
Custom content to display in the dropdown button. Used when
customDropdown is true or when no values are provided.Additional buttons to append to the dropdown panel below the value options.
Examples
Behavior
The component creates a hidden native
<select> element that syncs with the custom UI. When an option is clicked, it updates the hidden select and dispatches a change event. The dropdown auto-closes on selection unless nocloseonclick is set.Accessibility
- Native select element in the background for form integration
- Keyboard navigation support (Tab, Enter, Arrow keys)
- Focus-within state opens dropdown for keyboard users
- Proper button types prevent form submission
select-noneon dropdown prevents text selection
Styling Features
- Maximum height of
18rem(72) with scroll for long lists - Smooth scale and opacity transitions
- Backdrop blur effect (unless
nobluris set) - Z-index of 1000 for proper layering
- Custom scrollbar styling via
lum-scroll