Get Started
Components
- Accordion
 - Alert Dialog
 - Alert
 - Aspect Ratio
 - Avatar
 - Badge
 - Breadcrumb
 - Button Group
 - Button
 - Calendar
 - Card
 - Carousel
 - Chart
 - Checkbox
 - Collapsible
 - Combobox
 - Command
 - Context Menu
 - Data Table
 - Date Picker
 - Dialog
 - Drawer
 - Dropdown Menu
 - Empty
 - Field
 - Form
 - Hover Card
 - Input Group
 - Input OTP
 - Input
 - Item
 - Kbd
 - Label
 - Menubar
 - Native Select
 - Navigation Menu
 - Pagination
 - Popover
 - Progress
 - Radio Group
 - Resizable
 - Scroll Area
 - Select
 - Separator
 - Sheet
 - Sidebar
 - Skeleton
 - Slider
 - Sonner
 - Spinner
 - Switch
 - Table
 - Tabs
 - Textarea
 - Toast
 - Toggle Group
 - Toggle
 - Tooltip
 - Typography
 
A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.
import { Button } from "@/components/ui/button"
import {
  Tooltip,
  TooltipContent,
  TooltipTrigger,
} from "@/components/ui/tooltip"
export function TooltipDemo() {
  return (
    <Tooltip>
      <TooltipTrigger asChild>
        <Button variant="outline">Hover</Button>
      </TooltipTrigger>
      <TooltipContent>
        <p>Add to library</p>
      </TooltipContent>
    </Tooltip>
  )
}
Installation
pnpm dlx shadcn@latest add tooltip
Usage
import {
  Tooltip,
  TooltipContent,
  TooltipTrigger,
} from "@/components/ui/tooltip"<Tooltip>
  <TooltipTrigger>Hover</TooltipTrigger>
  <TooltipContent>
    <p>Add to library</p>
  </TooltipContent>
</Tooltip>Changelog
2025-09-22 Update tooltip colors
We've updated the tooltip colors to use the foreground color for the background and the background color for the foreground.
Replace bg-primary text-primary-foreground with bg-foreground text-background for both <TooltipContent /> and <TooltipArrow />.
Deploy your shadcn/ui app on Vercel
Trusted by OpenAI, Sonos, Adobe, and more.
Vercel provides tools and infrastructure to deploy apps and features at scale.
Deploy to Vercel