Avara UI

Tooltip

A context-aware popup that displays information when an element receives keyboard focus or a mouse hover.
Most lightweight tooltips suffer from a fatal flaw: they get clipped or hidden if they are placed inside a container with overflow-hidden. This TooltipBlock completely sidesteps that issue natively. It uses React's createPortal to render the tooltip bubble directly onto the document.body layer, calculating its position dynamically so it is mathematically impossible for it to get clipped by parent components.
Hover or tab to each trigger to open its tooltip.

Without Arrow

side
renders the tooltip on left, top, bottom, or right without an indicator arrow.
icon / title / des
renders a matching-height icon badge on the left, a single-line title, and single-line description.

Installation

New project? Follow the installation guide to set up Tailwind CSS, shadcn, the cn helper and lucide-react, register the @algorize-ui registry once, then copy your styles from the Themes page.

Install Tooltip

npx shadcn@latest add @algorize-ui/tooltip

components/custom/blocks/TooltipBlock.tsx is written into your project. Copy any snippet from a Usage tab above and it runs.

Install dependencies

Nothing beyond the shared setup — Tooltip needs only the cn helper and lucide-react, which the installation guide already put in place.

Examples

With Arrow

UseshowArrowtrue
on TooltipContent to anchor a directional pointer arrow.

With Arrow & Animated

Useanimatedtrue
for a smooth pull-out emergence animation sliding gently out from the trigger.

With Staggered Content Animation

Usestaggeredtrue
along with animated for a sequential entrance where the icon appears first, followed by the title, and then the description.

With Expanding Content

Useexpandtrue
to open as a compact title badge first, then smoothly expand its height (for top/bottom) or width (for left/right) to unveil the description.

Props Reference

ComponentPropTypeDefaultDescription
TooltipdelayDurationnumber200
The time (in milliseconds) a user must hover over the trigger before the tooltip opens.
TooltipContentside"top" | "bottom" | "left" | "right""top"
The preferred side of the trigger to render the tooltip content.
TooltipContentalign"start" | "center" | "end""center"
The preferred alignment against the chosen side. For example, side="top" align="end" anchors the bottom-right corner of the tooltip to the top-right corner of the trigger.
TooltipContentsideOffsetnumber6
The distance (in pixels) from the edge of the trigger element to the tooltip bubble.
TooltipContentshowArrowbooleanfalse
Whether to render an adaptive pointer arrow anchoring the tooltip bubble to its trigger.
TooltipContentanimatedbooleanfalse
Whether to enable the smooth pull-out animation that slides gently out from the trigger.
TooltipContentstaggeredbooleanfalse
Whether to animate child elements (icon → title → description) in a smooth staggered cascade.
TooltipContentexpandbooleanfalse
Whether to start with only title space and smoothly expand height (for top/bottom) or width (for left/right) to unveil the description.
TooltipContentarrowClassNamestringundefined
Optional Tailwind CSS classes for custom styling on the pointer arrow.
TooltipContenticonReact.ReactNodeundefined
Optional leading icon rendered on the left inside a background badge container that matches the content height.
TooltipContenticonClassNamestringundefined
Optional Tailwind CSS classes for custom styling on the icon background badge container.
TooltipContenttitleReact.ReactNodeundefined
Optional header title rendered in bold to the right of the icon (single line). If omitted, no title is rendered.
TooltipContentdescriptionReact.ReactNodeundefined
Optional descriptive text rendered underneath the title (single line). If only description is passed, it cleanly renders just the description.
TooltipContentdesReact.ReactNodeundefined
Shorthand alias for description.
TooltipArrowclassNamestringundefined
Standalone arrow sub-component that automatically reads side and align to anchor the bubble.
All ComponentsclassNamestringundefined
Standard Tailwind overrides. Useful for overriding background colors or text sizing on the TooltipContent.