Gooey Menu
A tactile liquid dropdown menu with organic SVG metaball fusion filter and spring-driven extrusion animation.
Installation
Add the component directly to your repository using shadcn CLI:
npx shadcn@latest add Surajmaurya1/easyui/gooey-menu
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| options | string[] | ['Home', 'About', 'Projects', 'Contact', 'Book a call', 'Follow us'] | Array of option labels |
| value | string | undefined | Controlled active selected option |
| defaultValue | string | options[0] | Default selected option if uncontrolled |
| open | boolean | undefined | Controlled open dropdown state |
| defaultOpen | boolean | false | Initial open dropdown state if uncontrolled |
| onOpenChange | (open: boolean) => void | undefined | Callback fired when open state changes |
| onSelect | (option: string, index: number) => void | undefined | Callback fired on option selection |
| width | number | 306 | Pixel width of the dropdown panel and default pill; custom triggers keep their own size |
| trigger | ReactNode | undefined | Optional non-interactive content inside the trigger button, such as an avatar. Do not pass a nested button or link. |
| triggerLabel | string | "Toggle menu" for custom triggers | Accessible name for the trigger and its options |
| triggerClassName | string | undefined | Classes for the trigger button, including dimensions and border radius |
| triggerStyle | CSSProperties | undefined | Inline trigger styles; size and corner radii are measured automatically |
| align | "start" | "center" | "end" | "start" | Logical alignment of the panel relative to the trigger. Start and end follow the inherited text direction. |
| optionClassName | string | ((option: string, index: number) => string | undefined) | undefined | Additional classes for all options or individual actions, such as a red logout option |
| className | string | undefined | Custom CSS class overrides |