Skip to content

Tooltip

A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.

Examples

Default

vue
<TooltipProvider>
  <Tooltip>
    <TooltipTrigger as-child>
      <Button variant="outline">Hover</Button>
    </TooltipTrigger>
    <TooltipContent>
      <p>Add to library</p>
    </TooltipContent>
  </Tooltip>
</TooltipProvider>

Props

TooltipProvider

PropTypeDefaultDescription
delayDurationnumber700The duration from when the mouse enters a tooltip trigger until the tooltip opens.
skipDelayDurationnumber300How much time a user has to enter another trigger without incurring a delay again.
disableHoverableContentbooleanfalseWhether to disable hoverable content.

Tooltip

PropTypeDefaultDescription
defaultOpenbooleanfalseThe open state of the tooltip when it is initially rendered.
openboolean-The controlled open state of the tooltip.
delayDurationnumber700The duration from when the mouse enters a tooltip trigger until the tooltip opens.
disableHoverableContentbooleanfalseWhether to disable hoverable content.

Slots

TooltipProvider

SlotDescription
defaultThe content of the provider.

Tooltip

SlotDescription
defaultThe content of the tooltip.

TooltipTrigger

SlotDescription
defaultThe content of the trigger.

TooltipContent

SlotDescription
defaultThe content of the tooltip.