OriginDropdown
A dropdown with origin-aware expansion — the menu materializes from the chosen side with a slight scale and an inward translation, so its perceived origin is the trigger edge closest to the menu.
Installation
Add the component directly to your repository using shadcn CLI:
npx shadcn@latest add Surajmaurya1/easyui/origin-dropdown
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| trigger | React.ReactNode | undefined | Custom trigger content |
| items | OriginDropdownItem[] | undefined | Menu items (alternative to children) |
| children | React.ReactNode | undefined | Custom menu content |
| side | 'top' | 'right' | 'bottom' | 'left' | 'bottom' | Side the menu opens from |
| open | boolean | undefined | Controlled open state |
| defaultOpen | boolean | false | Initial open state |
| onOpenChange | (open: boolean) => void | undefined | Open state change callback |