A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.
Props
Tooltip
Prop
Type
Default
Description
...Radix props
ComponentProps<typeof TooltipPrimitive.Root>
-
All Radix tooltip root props
TooltipContent
Prop
Type
Default
Description
sideOffset
number
0
Offset in pixels from the trigger
...Radix props
ComponentProps<typeof TooltipPrimitive.Content>
-
All Radix content props
Usage
<Tooltip><TooltipTriggerasChild><Buttonvariant="outline">Top</Button></TooltipTrigger><TooltipContentside="top"align="start"><p>Add to library</p></TooltipContent></Tooltip>