Tooltip
A lightweight, edge-aware tooltip that flips placement automatically when it would clip against the viewport. Delayed enter, instant exit - no library dependencies.
Installation
npx stepwise-ui add tooltip
Usage
Props
PropTypeDescription
contentReactNodeThe text or rich content displayed inside the tooltip bubble.
childrenReactElementThe trigger element. Must be a single element - the tooltip injects its own ref and event listeners via cloneElement.
side"top" | "bottom" | "left" | "right"Preferred placement. The tooltip automatically flips to the opposite or roomiest side when the preferred side does not have enough space. Default: "top".
classNamestringExtra classes applied to the tooltip bubble itself - useful for overriding max-width or styling.