Tooltip
Displays brief, contextual information when hovering over or focusing on an element, improving clarity without cluttering the interface.
Installation
Install ReUI
Refer to the Installation Guide for detailed instructions on setting up ReUI dependencies in your project.
Install dependencies
npm install @radix-ui/react-tooltip
Add component
Copy and paste the following code into your project’s components/ui/tooltip.tsx
file.
Examples
Default
Light
Side
API Reference
This component is built using Radix UI Tooltip primitives. For detailed information, please visit the full API reference.
Tooltip
This component is based on the Tooltip.Root primitive. For full details, visit the official documentation.
TooltipTrigger
This component is based on the Tooltip.Trigger primitive. For full details, visit the official documentation.
TooltipContent
This component is based on the Tooltip.Content primitive and includes the following custom props:
Prop | Type | Default |
---|---|---|
sideOffset | ||
className |
TooltipProvider
This component is based on the Tooltip.Provider primitive. For full details, visit the official documentation.