Color
Typography
Spacing
Radius
Border
Opacity
Elevation
Blur
Avatar
Badge
Button
Checkbox
Input
ProgressBar
RadioButton
Separator
Slider
Switch
TextArea
TextLink
Accordion
Breadcrumb
ButtonGroup
Combobox
DropdownMenu
ListItem
Pagination
SegmentedControl
Select
Tooltip
Calendar
Card
CommandMenu
DatePicker
Dialog
Drawer
EmptyState
Footer
Form
NavigationBar
Sidebar
Skeleton
Table
Tabs
Toaster

Tooltip

A short label shown next to an element on hover or keyboard focus. Four positions, two variants, optional arrow.

Position
Variant

Usage

Import the component and render it.

import { Tooltip } from 'src/components/Tooltip/Tooltip';
import { Button } from 'src/components/Button/Button';

<Tooltip position="top" variant="default" label="Tooltip Text" hasArrow>
  <Button variant="outline" size="sm">Hover or focus me</Button>
</Tooltip>

Accessibility

Role: tooltip (Radix Tooltip): the trigger is described by the label with aria-describedby while it is shown.

KeyAction
TabFocusing the trigger shows the tooltip; moving focus away hides it
EscapeHides the tooltip
  • Shown on hover (after a short delay) and on keyboard focus; it stays while the pointer moves onto it (WCAG 1.4.13).
  • Only for short, supplementary text: never put essential information or interactive content in a tooltip.
  • A truncated label is still read in full by screen readers (Radix describes the trigger with the whole text), but sighted users only see the start: keep labels short.
  • The trigger must be focusable and have its own accessible name.

Position

Set the position prop: Top is "top", Bottom is "bottom", Left is "left", Right is "right".

Tooltip Text
Top
Tooltip Text
Bottom
Tooltip Text
Left
Tooltip Text
Right
<Tooltip position="top" label="Tooltip Text" />
<Tooltip position="bottom" label="Tooltip Text" />
<Tooltip position="left" label="Tooltip Text" />
<Tooltip position="right" label="Tooltip Text" />

Variant

Set the variant prop: Default is "default", Brand is "brand".

Tooltip Text
Default
Tooltip Text
Brand
<Tooltip variant="default" label="Tooltip Text" />
<Tooltip variant="brand" label="Tooltip Text" />

Used in

Tooltip is part of Sidebar.