Dropdown
A floating menu component that displays a list of actions or options triggered by a button click.
Installation
npx chilli@latest add dropdownSmall
List item
List item
List item
List item
List item
List item
List item
Medium
List item
List item
List item
List item
List item
List item
List item
Large
List item
List item
List item
List item
List item
List item
List item
API Reference
Dropdown
| Prop | Type | Default | Description |
|---|---|---|---|
size | "sm" | "md" | "lg" | "md" | The size of the dropdown and its items. |
checkedIndex | number | — | Index of the currently checked/selected item. |
children | ReactNode | — | MenuItem components to render. |
MenuItem
| Prop | Type | Default | Description |
|---|---|---|---|
icon | LucideIcon | — | Icon component displayed on the left. |
label | string | — | The text label of the item. |
index | number | — | The index of the item for selection tracking. |
checked | boolean | — | Override checked state. Shows check icon when true. |
onSelect | () => void | — | Callback when the item is selected. |