RRenDSv0.13.0

Composite

Tooltip Hybrid

Brief contextual text that appears on hover and focus. For supplementary hints — never the primary explanation. Reveals on hover after a short delay, on focus immediately, on touch via long-press.

About

Overview

Tooltips show short text labels next to icon buttons, abbreviations, or anything where a tiny extra hint helps. The trigger is always interactive (a button or link), the tooltip is always supplementary — never put critical information in a tooltip alone, because touch users may not see it.

Tooltip vs Popover vs Hover Card. Tooltip = short text. Popover = rich content + keyboard interaction. Hover Card = preview content with a slightly longer hover delay (think Twitter profile previews).

Live

Demo

Hover or focus the buttons below.

<button class="ren-btn ren-btn-secondary ren-tooltip-trigger" type="button">
  Save
  <ren-tooltip placement="top">⌘S</ren-tooltip>
</button>

Placements

Variants

Placement

Four placements via placement="top|right|bottom|left" (default top). The component flips to the opposite side automatically when there isn't room.

Delay

Default hover delay is 500 ms. Override it with show-delay="700" for less-interruptive contexts.

Reference

API

CSS classes

ClassEffect
.ren-tooltipThe floating bubble. role="tooltip". Dark surface on light theme, light on dark.
.ren-tooltip-arrowOptional arrow pointing at the trigger.

Web Component attributes

AttributeTypeDefaultNotes
placement"top" | "right" | "bottom" | "left""top"Preferred side. Auto-flips when there isn't room.
show-delaynumber (ms)500Delay before showing the tooltip.
hide-delaynumber (ms)0Delay before hiding the tooltip.

Inclusive by default

Accessibility

  • Trigger must be focusable. Tooltips on a non-interactive element aren't keyboard-reachable.
  • Use aria-describedby linking the trigger to the tooltip's id. Screen readers announce the tooltip after the trigger's accessible name.
  • Show on focus, not just hover. Keyboard users never trigger a hover.
  • Dismissable with Escape. Pressing Escape while the tooltip is open closes it.
  • Don't put essential info in a tooltip. Touch users may never see it. Pair the tooltip with a visible label or icon-with-text on small viewports.

Keyboard

TabFocus the trigger; tooltip shows immediately.
EscHides the tooltip while keeping focus on the trigger.

Patterns

Examples

Icon-only button with hint

<button class="ren-btn ren-btn-ghost ren-tooltip-trigger" type="button" aria-label="Settings"> <!-- gear SVG --> <ren-tooltip placement="bottom">Settings</ren-tooltip> </button>

Keyboard shortcut hint

<button class="ren-btn ren-btn-primary ren-tooltip-trigger" type="button"> Save <ren-tooltip>⌘S to save</ren-tooltip> </button>