Tooltip

Names a control that carries no text of its own, on hover or focus.

Configurations

Supported configurations for this component.

Configurations

4 examples
Top
Bottom
Left
Right

Add to your project

One command adds this component to your project.

1

Run the following command. New project? Run npx shadcn@latest init first to set up Tailwind and path aliases.

npx shadcn@latest add @aicanvas/••••••••••••

Light and dark both come with the install and follow the dark class on <html>, the shadcn dark mode setup (next-themes with attribute="class").

Props

Every prop this component accepts. Any other prop is forwarded to the underlying element.

PropTypeDefaultDescription
labelreqstring-Text shown in the tooltip.
position'top'|'bottom'|'left'|'right''top'Side of the trigger the label hangs off. `left`/`right` are for icon rails, where a label above the row would cover its neighbour.
portalbooleanfalseRender the bubble into <body> instead of the trigger, for triggers inside a clipping or scrolling panel.
childrenreqReact.ReactNode-The trigger element.
classNamestring-Additional CSS classes applied to the root element.
styleReact.CSSProperties-Inline styles applied to the root element.

More Andromeda Pro components