Skip to main content
ALEXY LINK

Tooltip 08

A restrained form-guidance tooltip that explains a field requirement in advance rather than after a validation error.

Requirements

HTML, CSS, JavaScript

Dependencies

None

Usage

Copy index.html, styles.css and script.js into your project.

Typography: Inter, with a system sans-serif fallback.

About Tooltip 08

Tooltip 08 is a tooltip component in the Tooltip Components collection, available in HTML + CSS + JavaScript and React + TypeScript + Tailwind CSS. Last updated September 13, 2026.

  • tooltip
  • help tooltip

What the code includes

HTML + CSS + JavaScript

3 files: index.html, styles.css, script.js

  • Behavior is handled in script.js.
  • ARIA in the markup: role tooltip; aria-label.
  • HTML elements used: button, input, label.
  • Keyboard keys handled: Escape.
  • Includes a prefers-reduced-motion rule for its animation.

React + TypeScript + Tailwind CSS

3 files: Tooltip08.jsx, Tooltip08.types.ts, Tooltip08.tailwind.css

  • Configurable through 4 props: label, content, autoFocus, className.
  • Uses React hooks: useId, useState.
  • ARIA in the markup: role tooltip; aria-label, aria-describedby, aria-invalid.
  • HTML elements used: button, input, label.
  • Keyboard keys handled: Escape.
  • Includes a prefers-reduced-motion rule for its animation.
View all Tooltip Components (10)