GooseUI

Components

Tooltip


Tooltip shows a short hint beside a control. It appears after a brief delay on hover or focus. Escape dismisses the hint. Use it for supplementary information, not essential instructions.

Browser support

Popover

Displays content in the browser top layer.

Your browser:
Anchor positioning

Positions content by its trigger; JavaScript positions it when anchors are unavailable.

Your browser:
@starting-style

Animates entry when supported; otherwise content appears immediately.

Your browser:

Preview

Installation

npx shadcn@latest add @gooseui/tooltip
pnpm dlx shadcn@latest add @gooseui/tooltip
yarn dlx shadcn@latest add @gooseui/tooltip
bunx --bun shadcn@latest add @gooseui/tooltip

Usage

import { Tooltip, TooltipTrigger, TooltipContent } from "@/components/ui/tooltip"

<Tooltip>
  <TooltipTrigger asChild><button>Details</button></TooltipTrigger>
  <TooltipContent side="top">Helpful information</TooltipContent>
</Tooltip>

Examples

Position

<TooltipContent side="right">Helpful information</TooltipContent>

Props

PropTypeDefaultDescription
side"top" | "bottom" | "left" | "right""top"Preferred side of the trigger.
align"start" | "center" | "end""center"Alignment along the trigger.
sideOffsetnumber4Distance from the trigger in pixels.
asChildbooleanfalseUse the child as the trigger.
hiddenbooleanfalsePrevent the tooltip from opening.