Icon tooltip
An icon that explains the label beside it: the info icon, with a tooltip that says what the label means.
<span className="flex items-center gap-1.5 text-label-2 text-neutral-fg"> Token lifetime <IconTooltip label="About token lifetime" tooltip="How long an access token stays valid." /></span>Installation
import { IconTooltip } from "@dome-systems/ds-dashboard/components";Anatomy
- 1 — Icon. The info icon, 14px, in the muted text color.
- 2 — Tooltip. The Tooltip's own box, above the icon and centered on it, 6px off.
After a title
After a title that needs a word more. Give it a label: the keyboard then stops on it, and the label is its name. Every Icon tooltip a screen places itself has a label.
<span className="flex items-center gap-1.5 text-label-2 text-neutral-fg"> Prompt signature <IconTooltip label="About the prompt signature" tooltip="The gateway adds it to the start and end of each system prompt this guard checks." /></span>Placed by a Field or a Checkbox
A Field, a Field group, a Checkbox, a Switch and a Radio take an iconTooltip and place the icon themselves, after their title or their text. They draw it at 12px and name it from that title ("Audience details", or "Details" when the title is not plain text). A press on the icon never checks the box it sits beside.
<div className="flex w-72 flex-col gap-5"> <Field title="Audience" iconTooltip="Tokens for any other audience are refused."> <Input placeholder="api://dome" /> </Field> <Checkbox iconTooltip="Runs that are already going are not retried.">Retry failed runs</Checkbox></div>Inside a tab
Without a label it is a plain <span> that takes no focus, so it can sit inside a control: the tab keeps the focus, and only a pointer reaches the tooltip. A tab places it from its own iconTooltip, at the size of a tab's icons: 14px, and 10px in the smallest tabs. That prop is the tooltip alone, so a tab's icon has no label, and a tab that shows only its icon draws none. No screen puts one in a tab today.
<Tabs defaultValue="written"> <TabsList> <TabsTrigger value="written">Written</TabsTrigger> <TabsTrigger value="effective" iconTooltip="What applies after every scope is merged.">Effective</TabsTrigger> </TabsList></Tabs>An Icon tooltip, a Hint, a button
Three things with a tooltip. An Icon tooltip is a mark after a title: it explains the title, and it is not something to press. A Hint is the text itself, with a dotted line under it: the tooltip says the fuller value. A Button does something when pressed, and an icon-only button's tooltip is its name.
<span className="flex items-center gap-8 text-body-2 text-neutral-fg"> <span className="flex items-center gap-1.5"> Token lifetime <IconTooltip label="About token lifetime" tooltip="How long an access token stays valid." /> </span> <Hint tooltip="1,948,935 tokens">1.9M</Hint> <Button emphasis="ghost" size="sm" iconStart={Copy} tooltip="Copy ID" /></span>Size
size is the icon's side in px, 14 unless set. The Field, the Field group and the choice controls draw it at 12 (11 beside the text of a small checkbox, switch or radio), and 19 of the 23 places a screen draws one itself set 12 too.
<span className="flex items-center gap-8"> <span className="flex items-center gap-1.5 text-label-2 text-neutral-fg"> Subscription <IconTooltip size={12} label="How workspaces are billed" tooltip="Each workspace is billed with your subscription." /> </span> <span className="flex items-center gap-1.5 text-label-2 text-neutral-fg"> Subscription <IconTooltip label="How workspaces are billed" tooltip="Each workspace is billed with your subscription." /> </span></span>Another icon
The info icon unless icon gives another. No screen sets one today.
<span className="flex items-center gap-1.5 text-label-2 text-neutral-fg"> Prompt echo <IconTooltip icon={QuestionCircle} label="About the prompt echo" tooltip="Blocks a reply that copies this many characters of the system prompt." /></span>Where the tooltip opens
Above the icon, centered on it, and at once. tooltip is the text, or the text as children with the Tooltip's settings: side, align, delay, variant, anchor, glide and the rest of what its content takes.
<span className="flex items-center gap-8"> <IconTooltip label="About retries" tooltip="A failed run is tried again twice." /> <IconTooltip label="About retries" tooltip={{ children: "A failed run is tried again twice.", side: "right" }} /> <IconTooltip label="About retries" tooltip={{ children: "A failed run is tried again twice.", side: "bottom", align: "start" }} /></span>A longer explanation
With a label the tooltip is set as a paragraph: a paragraph's padding, and its text and <code> flow as one block. As any tooltip of one run of text, it stays on one line while it fits in 280px, then wraps into lines of even length.
<span className="flex items-center gap-1.5 text-label-2 text-neutral-fg"> Audience <IconTooltip label="About the audience" tooltip={{ children: ( <> The value your identity provider puts in the token's <code>aud</code> claim. A token whose claim names another audience is refused. </> ), }} /></span>In the dashboard
Where the dashboard shows an Icon tooltip today. Every one has a label: the Field and the choice controls give it theirs, and every screen that places one sets it.
A field's title
The Field places it after its title, from iconTooltip. The model form, the gateway form and a setting's row explain a field this way. A Field group can too; no screen gives one today.
ds/components/field.tsx, components/models/model-form.tsx
A checkbox's or a switch's text
They place it after their text, from iconTooltip. The escalation editor's checkboxes and a switch in the assistant's settings use it. A radio can too; no screen gives one today.
ds/components/checkbox.tsx, components/escalations/escalation-graph-editor.tsx
A section's or a row's title
A screen places it itself after a title it draws: a form section's help, a guard section's, a gateway's sign-in settings, the billing breakdown.
components/shared/entity-form-page.tsx, components/guards/guard-section.tsx, components/billing/quantity-manager.tsx
Inside a badge
A probe monitor's Skipped badge holds one that says why the last run was skipped.
app/(authenticated)/[kind]/[scopeId]/probes/_components/monitor-detail.tsx
Accessibility
With a label, the keyboard stops on the icon: it has role="button", the label is its name, and it shows a focus ring when the keyboard reaches it. Its tooltip opens on keyboard focus as it does under the pointer, and Escape closes it and leaves the focus on the icon. It does nothing of its own when pressed: a press closes the tooltip if it is open, Enter does nothing, and inside a <label> element the press is kept from the control that element belongs to.
Without a label, it is a <span> with no role and no name, and the keyboard does not stop on it: only a pointer reaches its tooltip.
What the tooltip says is not read by a screen reader, with or without a label: the label is the icon's name, and the Tooltip ties no text to its trigger. See the Tooltip's page. A tooltip does not open on a touch screen.
The cursor over the icon is the plain arrow.
API Reference
IconTooltip
Besides these, the props of a <span>, except children.
| Prop | Type | Default | Description |
|---|---|---|---|
tooltip | string | TooltipSettings | — | Required. What the tooltip says: the text, or the text as children with the Tooltip's settings (side, align, delay, variant, anchor, glide and the rest of what its content takes). |
icon | IconComponent | ICircle | The icon. The info icon by default. |
size | number | 14 | The icon's side in px. Inside a tab, the tab sizes it. |
label | string | — | Names the icon and lets the keyboard stop on it, for an icon that is not inside a control. Its tooltip is then set as a paragraph. |
Tokens
In ds/tokens/icon-tooltip.css. The tooltip is the Tooltip's own, with its tokens.
| Token | Value | What it sets |
|---|---|---|
--icon-tooltip-foreground-icon | --neutral-fg-muted | The icon's color: the muted text tier, quieter than the text beside it. |
Rules
Written down
Every help icon in the dashboard is this one
The dashboard's older help icon is gone. An icon that explains a label is the Icon tooltip.
From ds/README.md (Icon tooltip).
On its own it is named; inside a control it is not
After a field's or a section's title it takes a label: the keyboard reaches it and the label names it. Inside a tab or a button it takes none, and the control keeps the focus.
From ds/components/icon-tooltip.tsx and ds/README.md (Icon tooltip).
The icon is quieter than the text beside it
It takes the muted text color (--neutral-fg-muted), a solid color of its own. It is never dimmed with an opacity.
From ds/tokens/icon-tooltip.css and .claude/rules/dashboard-ui.md (rule 4).
No dotted line under an icon
The dotted line goes under text. An icon with a tooltip keeps its tooltip and gets no line.
From ds/components/hint.tsx and ds/README.md (Hint).
The tooltip shows at once
Unless delay in its tooltip says otherwise.
From ds/components/icon-tooltip.tsx.
Open questions
12px or 14px after a title?
OpenThe icon rule gives 14px unless a component sets the size, and says not to shrink an icon. The Field, the Field group and the choice controls set 12. Of the 23 places a screen draws one itself, 19 set 12 by hand, as the Field does, and 4 keep 14. Whether a screen may set 12 is not decided.
Not looked up.
How does the keyboard reach one inside a tab?
OpenIt does not: a tab gives it no label, so only a pointer opens it. No screen puts one in a tab today.
See the Tabs' page, which asks whether a tab should have one at all.
What does a label say?
OpenNothing written says. Five forms are in use: "Audience details" (the Field and the choice controls), "About the prompt signature" (most screens), "Sign-in help", a question ("What happens after saving"), and the visible title repeated as it is.
Not looked up.