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.
checkedIndexnumber—Index of the currently checked/selected item.
childrenReactNode—MenuItem components to render.

MenuItem

PropTypeDefaultDescription
iconLucideIcon—Icon component displayed on the left.
labelstring—The text label of the item.
indexnumber—The index of the item for selection tracking.
checkedboolean—Override checked state. Shows check icon when true.
onSelect() => void—Callback when the item is selected.