Installation
Section titled “Installation”pnpm dlx shadcn@latest add pxl-ui/registry/tooltip
Install the following dependencies:
pnpm add @base-ui/react
Copy and paste the following code into your project.
Update the import paths to match your project setup.
Add the TooltipProvider to the root of your app.
import { TooltipProvider } from "@/components/ui/pxl/tooltip"
export default function RootLayout({ children }) { return ( <html lang="en"> <body> <TooltipProvider>{children}</TooltipProvider> </body> </html> )}import { Tooltip, TooltipContent, TooltipTrigger,} from "@/components/ui/pxl/tooltip"<Tooltip> <TooltipTrigger>Hover</TooltipTrigger> <TooltipContent> <p>Add to library</p> </TooltipContent></Tooltip>Composition
Section titled “Composition”Use the following composition to build a Tooltip:
Tooltip├── TooltipTrigger└── TooltipContentUse the side prop to change the position of the tooltip.
API Reference
Section titled “API Reference”See the Base UI Tooltip documentation.