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” | Maximum height of the dropdown menu. |
buttonVariant? | “default” | “destructive” | “outline” | “secondary” | “ghost” | “link” | “success” | “warning” | “info” | “dark” | “light” | “gradient” | “glass" | "default” | Style variant for the trigger button. |
buttonSize? | “default” | “sm” | “lg” | “icon" | "default” | Size of the trigger button. |
className? | string | - | Additional CSS classes for the dropdown container. |
…props | HTMLDivElement attributes | - | Any other props for the dropdown container. |
Last updated on