Tooltip
A small popup that shows brief, supplementary information on hover or focus.
- Status
- ReadyBuild day 13 of 21
- Code
- In React
- Role
- Overlay
Usage
This demo is live, and the code below it is the same code, imports included. The component lives in src/ui of this repository and is not published to npm yet.
Pastes as editable layers. Shadows are not exported.
import { Button, Tooltip, type TooltipPlacement } from "@/ui";
const placement: TooltipPlacement = "top";
export default function TooltipDemo() {
return (
<Tooltip placement={placement} title="Effective interest rate" description="Calculated from the outstanding principal.">
<Button variant="ghost">Interest rate</Button>
</Tooltip>
);
}Variants and states
Every specimen is the real component from src/ui, held in one state.
Pastes as editable layers. Shadows are not exported.
Props
- title
- string · default none
- Required. The hint.
- description
- string · default none
- A second line.
- placement
- "top" | "bottom" | "left" | "right" · default "top"
- Side of the trigger.
- size
- "sm" | "md" · default "md"
- Padding and text size.
- arrow
- boolean · default true
- The 12x6 pointer.
- children
- ReactNode · default none
- The trigger. It must be focusable, such as a button.
- TooltipBubble
- component · default none
- The bubble on its own, for documentation.
Figma to code
Figma properties by their exact names from Naming, and the React prop that carries each one. The table covers the shared properties that bear on this component; the Figma file decides which of them its component exposes. None means there is no prop for it yet.
- 📐 Size
- size
- sm or md.
- 🧰 Type
- placement
- Top, Bottom, Left, Right.
- 🔺 Show Arrow
- arrow
- Boolean.
- Title, Show Description, Description
- title, description
- Same text.
Accessibility
What the code in src/ui does today, and what it leaves to you.
Keyboard
- Shows when the trigger gets keyboard focus, hides on blur and on Escape.
Screen readers
- The bubble has role=tooltip and is linked to the trigger with aria-describedby, so it is read after the trigger's name.
What you still need to do
- Put nothing in a tooltip that the user needs to finish a task; it is a hint.
- The bubble stays while the pointer is over it, so it can be read and copied (WCAG 1.4.13).
- Do not put links or buttons in a tooltip. Use a popover or a Modal instead.
When to use
Clarifies icon-only buttons or gives extra context.
Do and don't
Do
- Keep the text short: a phrase, not a paragraph.
- Ensure it's accessible via keyboard focus, not just hover.
Don't
- Put essential information only in a tooltip.
- Use for content that requires interaction: use a popover instead.
Related
4 of 28 other molecules, same role and ready ones first.
- DrawerA panel that slides in from the edge of the screen over the page.Ready
- ModalA dialog that interrupts the current context to focus the user on a task.Ready
- AccordionStacked sections that expand to reveal their content.Ready
- AlertA persistent, inline message that communicates important information.Ready
Status reflects the component tracker snapshot of 29 October 2026.