Dropdown

A floating menu component that displays a list of actions or options triggered by a button click.

Installation

npx chilli@latest add dropdown

Small

Medium

Large

API Reference

Dropdown

PropTypeDefaultDescription
size"sm" | "md" | "lg""md"The size of the dropdown and its items.
checkedIndexnumberIndex of the currently checked/selected item.
childrenReactNodeMenuItem components to render.

MenuItem

PropTypeDefaultDescription
iconLucideIconIcon component displayed on the left.
labelstringThe text label of the item.
indexnumberThe index of the item for selection tracking.
checkedbooleanOverride checked state. Shows check icon when true.
onSelect() => voidCallback when the item is selected.