DirectionalTooltip
A tooltip that appears from the direction it originates — it starts a small distance outside the trigger in its preferred direction and springs inward, so it feels like it materializes from the trigger.
Installation
Add the component directly to your repository using shadcn CLI:
npx shadcn@latest add Surajmaurya1/easyui/directional-tooltip
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| content | React.ReactNode | undefined | Tooltip body content |
| side | 'top' | 'right' | 'bottom' | 'left' | 'top' | Preferred side for the tooltip |
| align | 'start' | 'center' | 'end' | 'center' | Alignment along the chosen side |
| delayDuration | number | 150 | Delay before showing, in ms |
| showArrow | boolean | true | Show the arrow indicator |
| offset | number | 8 | Spacing from the trigger in px |
| forceOpen | boolean | false | Force the tooltip open (for previews) |