Componentes
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Avatar
- Badge
- Breadcrumb
- Button
- Button Group
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Collapsible
- Combobox
- Command
- Context Menu
- Data Table
- Date Picker
- Dialog
- Direction
- Drawer
- Dropdown Menu
- Empty
- Field
- Hover Card
- Input
- Input Group
- Input OTP
- 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
- Toggle Group
- Tooltip
- Typography
Tooltip
A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.
Installation#
pnpm add @ag/uiUsage#
import {
Tooltip,
TooltipContent,
TooltipTrigger,
} from "@ag/ui"<Tooltip>
<TooltipTrigger>Hover</TooltipTrigger>
<TooltipContent>
<p>Add to library</p>
</TooltipContent>
</Tooltip>Composition#
Use the following composition to build a Tooltip:
Tooltip
├── TooltipTrigger
└── TooltipContentExamples#
Side#
Use the side prop to change the position of the tooltip.
With Keyboard Shortcut#
Disabled Button#
Show a tooltip on a disabled button by wrapping it with a span.
RTL#
To enable RTL support in shadcn/ui, see the RTL configuration guide.
API Reference#
See the Radix Tooltip documentation.