Tooltip

A small floating text label that appears next to its trigger on hover or keyboard focus. Never contains interactive content.

Installation

npx dafink-ui add tooltip

Demo

Props

NameTypeDefaultDescription
contentReactNode-The tooltip text. Must be non-interactive content only.
childrenReactElement-A single trigger element; receives hover/focus handlers and aria-describedby automatically.
side'top' | 'right' | 'bottom' | 'left''top'Which side of the trigger the tooltip appears on.
delaynumber300Open delay in milliseconds for hover. Keyboard focus shows the tooltip immediately.
classNamestring''Additional classes on the wrapper span.