Overview Button Copy button Field Input Number field Textarea Select Combobox Multiselect Date picker Date range picker Date-time picker Checkbox Radio group Position picker Switch Slider Dropzone Device controls Avatar Badge Card Collapsible Kbd Map Matrix Proportion bar Separator Stat Table Timeline Chat Playback Pagination Charts Chart theming Profile chart Time series chart Bar chart Isopleth chart TS diagram Box plot Rose chart Calendar chart Banner Toast Loader Progress Skeleton Empty state Error state Dropdown menu Tooltip Info tooltip Dialog Sheet Resizable Confirm dialog Breadcrumbs Command palette Mobile menu Navigation list Outline Scroll rail Sidebar Tabs
Tooltip
A short label that appears on hover and focus. Near black in both themes, as in the app. It waits a moment, then fades in while drifting out from the trigger. Once one has shown, the next opens without waiting.
On icon buttons
Automatic: hover these, then move along the row. After the first, the rest open at once.
<!-- Icon buttons get one from their aria-label -->
<Button variant="ghost" square iconLeft="pen" aria-label="Edit" />
<!-- Anything else: spread the trigger props -->
<Tooltip content="Last fix 2 min ago">
{#snippet children({ props })}
<span {...props} tabindex="0">AIS</span>
{/snippet}
</Tooltip> Sides
Top by default. It flips if there isn't room.
On anything
Wrap any element; it receives the trigger props.
AIS
Rules
- Every icon-only button has one. Button does it for you: a square button shows its aria-label.
- Name the thing in one to three words. Explanations belong in the page or an info popover.
- Only for things whose label isn’t visible. A button that says “Delete” doesn’t need a tooltip saying Delete.
- Nothing clickable inside. A tooltip disappears when the pointer leaves, so a link in it can’t be reached.
- Never the only way to learn something essential: touch screens have no hover.