Dropdown 1
An animated dropdown reveals a menu of options or actions when activated by a button.
Installation
Usage
1import { Dropdown1 } from '@/components/pumki-ui/dropdown/dd1';1<Dropdown12 menuItems={profileMenuItems}3 triggerText="User Menu"4 menuTitle="User Options"5 buttonVariant="outline"6 buttonSize="default"7 />Props
| Prop | Type | Default | Description |
|---|---|---|---|
| menuItems? | MenuItem[] | [] | Array of menu items to display in the dropdown. |
| triggerText? | string | ”Menu” | Text for the dropdown trigger button. |
| menuTitle? | string | ”Menu Options” | Title displayed at the top of the dropdown menu. |
| onSelect? | (title: string) => void | - | Callback when a menu item is selected. |
| maxHeight? | string | number | ”16rem” |
| buttonVariant? | “default" | "destructive" | "outline" |
| buttonSize? | “default" | "sm" | "lg" |
| className? | string | - | Additional CSS classes for the dropdown container. |
| …props | HTMLDivElement attributes | - | Any other props for the dropdown container. |
Last updated on