Dropdown
Dropdown menu component with icons, separators, danger and disabled items, and full keyboard support.
How to use it
Run npx @blossomui/react add dropdown, or copy src/components/UI/Dropdown/Dropdown.tsx into your React project and import it.
import { Dropdown } from './components/ui/Dropdown'Props
DropdownItem
| Prop | Type | Description |
|---|---|---|
| id (required) | string | |
| label (required) | string | |
| icon | ReactNode | |
| onSelect | () => void | Called when the item is chosen with the mouse or the keyboard. |
| danger | boolean | Shows the item in red, useful for destructive actions. |
| disabled | boolean | |
| separator | boolean | Draws a line above this item. |
DropdownProps
| Prop | Type | Description |
|---|---|---|
| label (required) | ReactNode | Content of the button that opens the menu. |
| items (required) | DropdownItem[] | |
| align | 'start' | 'end' | Which edge of the button the menu lines up with. |
| className | string |