Tooltip
HUD callout tooltip with triangular tail pointer
Size
Material
ISO 800 -- Auto
<div class="tooltip">ISO 800 -- Auto</div> .tooltip {
position: relative; display: inline-flex; padding: 6px 12px;
background: var(--bg-raised); border: 1px solid var(--border-mid);
border-radius: var(--radius-sm); box-shadow: 0 2px 8px rgba(0,0,0,0.3);
font-family: var(--font-ui); font-size: 10px; font-weight: 500;
color: var(--text-primary); letter-spacing: 0.5px;
}
.tooltip::after {
content: ''; position: absolute; bottom: -5px; left: 50%;
width: 8px; height: 8px; background: var(--bg-raised);
border-right: 1px solid var(--border-mid); border-bottom: 1px solid var(--border-mid);
transform: translateX(-50%) rotate(45deg);
} API
| Class | Type | Description |
|---|---|---|
.tooltip | Base | Primary component class |
.default | Size | Extra large variant |
Design Notes
Physical Analog
Reference devices: Camera HUD floating labels, broadcast graphics lower-thirds, military HUD callout boxes.
Mechanism: A small pop-up information panel that appears near a point of interest to provide context. The triangular tail (created via ::after rotated 45 degrees) points toward the source element, derived from the callout line patterns in engineering drawings and military head-up display overlays.
Geometry
| Property | Value |
|---|---|
| Padding | 6px 12px |
| Border radius | --radius-sm (4px) |
| Font size | 10px |
| Tail size | 8x8px rotated 45deg |
| Tail offset | 5px below |
| Shadow | 0 2px 8px rgba(0,0,0,0.3) |
CSS Recipe
Container (.tooltip)
.tooltip {
position: relative; display: inline-flex; padding: 6px 12px;
background: var(--bg-raised); border: 1px solid var(--border-mid);
border-radius: var(--radius-sm); box-shadow: 0 2px 8px rgba(0,0,0,0.3);
font-family: var(--font-ui); font-size: 10px; font-weight: 500;
color: var(--text-primary); letter-spacing: 0.5px;
}
Tail (pointing down)
.tooltip::after {
content: ''; position: absolute; bottom: -5px; left: 50%;
width: 8px; height: 8px; background: var(--bg-raised);
border-right: 1px solid var(--border-mid); border-bottom: 1px solid var(--border-mid);
transform: translateX(-50%) rotate(45deg);
}
HTML Structure
<div class="tooltip">ISO 800 -- Auto</div>
Size Variants
No size variants defined.
Material Variants
No material variants. Uses standard raised surface.
Theme Behavior
- Background swaps via
--bg-raised - Border adapts via
--border-mid - Tail background matches container background
- Shadow reduces in light mode
- Text adapts via
--text-primary
Constraints
- MUST include triangular tail via
::afterpseudo-element - Tail MUST be an 8x8px square rotated 45 degrees
- Tail MUST inherit container background and border colors
- MUST use
--radius-sm(small, callout-proportioned) - MUST use
position: relativefor tail positioning - Shadow MUST be moderate (0 2px 8px) -- tooltip is close to surface
Accessibility
- Use
role="tooltip"on the element - Trigger element should have
aria-describedbypointing to tooltip id - Tooltip should appear on hover AND focus of the trigger
- Tooltip should dismiss on Escape key
- Tooltip must not contain interactive elements
♿
Accessibility
- Element
- Use semantic HTML with appropriate ARIA roles
- Keyboard
- Follow WAI-ARIA patterns for this control type
- Focus
-
Visible focus indicator required. Use native browser focus ring or custom
:focus-visiblestyles.