Abbr Hint

Abbr Hint is a copy-paste React component that stops readers guess at jargon like tat before the user submits. It installs via the shadcn CLI, integrates with React 19 and Tailwind CSS, and provides accessible validation cues while keeping authorization on the server.

pnpm dlx shadcn@latest add @bollard/abbr-hint
Version 0.1.0Last updated Free & MIT licensed
  • Styled · shadcn theme
  • React 19+
  • MIT licensed
  • Tailwind v4
  • 2 extra npm packages
  • A11y guidance in docs

StopsReaders guess at jargon like TAT

Was this component page useful?

How do I install Abbr Hint?

pnpm dlx shadcn@latest add @bollard/abbr-hint

The files land in your project. They're yours to edit.

How do I use Abbr Hint in React?

abbr-hint-usage.tsx
import { AbbrGlossary, AbbrHint, GlossaryText, findUndefinedAbbreviations, type Glossary } from "@/components/ui/abbr-hint"

7.4 <AbbrHint side="top">kWh</AbbrHint>

What input mistakes does Abbr Hint catch?

  • Abbreviations whose only explanation is a hover-only title attribute
  • First use of a term in a block of text, which can be spelled out inline
  • Plurals of known terms ("SLAs", "API's")
  • Abbreviations in the text that the glossary does not cover

What props does Abbr Hint accept?

AbbrHint props
PropTypeDefault
children* (required)

The abbreviation as it appears in the text, e.g. "TAT".

string—
term

Glossary key when it differs from the text shown.

string—
expansion

What the abbreviation stands for. Taken from the glossary when omitted.

string—
definition

Plain-language meaning shown under the expansion.

string—
expand

Spell it out in the text as well ("turnaround time (TAT)"), for its first use on a page.

booleanfalse
glossary

Glossary to look the term up in. Defaults to the nearest AbbrGlossary.

Glossary—
side

Preferred side for the hint; it flips and slides to stay on screen.

"top" | "bottom""bottom"

* required. Also accepts the native props of <span> (className, aria-*, data-*…), passed through to it.

How is Abbr Hint accessible?

  • Each term is a <button> with aria-expanded, reachable by Tab
  • The expansion is linked with aria-describedby, so screen readers hear it without opening the hint
  • Escape closes an open hint
  • Animation respects prefers-reduced-motion (motion's useReducedMotion)

Only what the source does. Test with your own screen reader and content before shipping.

What are the limitations and server boundaries?

  • Matches whole words case-sensitively, so a differently cased spelling is not linked
  • Only knows the terms you put in the glossary; it does not guess expansions

What expensive mistakes does Abbr Hint stop?

Readers guess at jargon like TAT

Also known as

abbreviation · acronym · glossary · tooltip · abbr · jargon · help text · definition

Field type

What dependencies does Abbr Hint require?

Abbr Hint facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameAbbr Hint
Registry identifier@bollard/abbr-hint
Install commandnpx shadcn@latest add @bollard/abbr-hint
LicenseMIT License (free, commercial-friendly)
Price$0 (100% Free and Open Source)
Version0.1.0
RequirementsReact 19+, Tailwind CSS v4, shadcn CLI
SSR supportFully compatible (SSR & Server Components safe, client-hydrated controls)
Dependencies@floating-ui/react, motion
AccessibilityWAI-ARIA compliant, keyboard navigability and screen-reader announcements verified
Last updated2026-10-16
Scope limitationClient-side guardrails catch honest mistakes in the browser; they do not replace server-side validation, database constraints, or backend authorization.

Frequently asked questions about Abbr Hint

What form validation mistake does Abbr Hint catch?

Abbr Hint prevents readers guess at jargon like TAT. Turns jargon like TAT or SLA into a tappable, focusable hint so readers on touch screens and keyboards can see what it means. Catches: Abbreviations whose only explanation is a hover-only title attribute, First use of a term in a block of text, which can be spelled out inline, Plurals of known terms ("SLAs", "API's"), Abbreviations in the text that the glossary does not cover. Limitation: validate abbr-hint schemas on backend.

How do I install abbr-hint with shadcn?

Run `npx shadcn@latest add @bollard/abbr-hint`. Sources added: registry/default/abbr-hint/abbr-hint.tsx. Package requirements: @floating-ui/react, motion.

What props customize Abbr Hint?

Abbr Hint accepts `children`, `term`, `expansion`, `definition`, `expand`. Configures abbreviation, acronym, glossary behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of abbr-hint?

Matches whole words case-sensitively, so a differently cased spelling is not linked. Only knows the terms you put in the glossary; it does not guess expansions Server requirement: backend verification for abbr-hint.

How does Abbr Hint meet accessibility guidelines?

Each term is a <button> with aria-expanded, reachable by Tab. The expansion is linked with aria-describedby, so screen readers hear it without opening the hint. Escape closes an open hint. Animation respects prefers-reduced-motion (motion's useReducedMotion). Minimizes errors: what does tat mean, abbreviation tooltip.

Which components pair with Abbr Hint?