Edit Profile

Dark Mode

Copy config

Copy and paste the following code into your global.css file to apply the styles.

WARNING: This component is in
Draft
status. This means that it is still in development and may have bugs or missing features. It is not intended to be used in production. You may use it for testing purposes.

Dropdown

Customizable popover menu.

Anatomy

ComponentDescription
Dropdown.Root

Defines the component boundary and exposes its internal logic. Must wrap over all other parts.

Dropdown.Trigger

Toggles the visibility of the dropdown menu. Should wrap around the button element.

Dropdown.Popover

Container for the dropdown menu, responsible for positioning and visibility.

Dropdown.Arrow

Optional arrow pointing from the trigger to the dropdown menu.

Dropdown.Content

Contains the dropdown options and other interactive elements.

Dropdown.Group

Groups multiple dropdown items under a common label.

Dropdown.GroupLabel

Label for a group of dropdown items.

Dropdown.Separator

Visual separator between different sections or groups of dropdown items.

Dropdown.CheckboxItem

Dropdown item that includes a checkbox for multi-select options.

Dropdown.ItemIndicator

Indicator that shows the selected state of an item.

Dropdown.RadioGroup

Groups radio items, allowing only one to be selected at a time.

Dropdown.RadioItem

Dropdown item that includes a radio button for single-select options within a radio group.

API

ComponentDescription
bind:open

Two-way data bind of the open state of the dropdown to a user-defined signal.

onOpenChange$

Callback function that is triggered when the open state of the dropdown changes.