A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.
Loading...
import { Button } from "@/components/ui/button"
import {
Tooltip,Installation
pnpmnpmyarnbun
Usage
import {
Tooltip,
TooltipContent,
TooltipProvider,
TooltipTrigger,
} from "@/components/ui/tooltip"<Tooltip>
<TooltipTrigger>Hover</TooltipTrigger>
<TooltipContent>
<p>Add to library</p>
</TooltipContent>
</Tooltip>Examples
Default
Loading...
import { Button } from "@/components/ui/button"
import {
Tooltip,API Reference
TooltipProvider
Wraps your app to provide global tooltip functionality. Should be placed at the root of your application.
Tooltip
The root component that contains all tooltip parts.
TooltipTrigger
The element that triggers the tooltip.
TooltipContent
The popup content displayed when the tooltip is open.