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

PropTypeDefaultDescription
contentReact.ReactNodeundefinedTooltip body content
side'top' | 'right' | 'bottom' | 'left''top'Preferred side for the tooltip
align'start' | 'center' | 'end''center'Alignment along the chosen side
delayDurationnumber150Delay before showing, in ms
showArrowbooleantrueShow the arrow indicator
offsetnumber8Spacing from the trigger in px
forceOpenbooleanfalseForce the tooltip open (for previews)