Spell Out

Spell Out is a copy-paste React component that stops booking ref misread over the phone 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/spell-out
Version 0.1.0Last updated Free & MIT licensed
  • Styled · shadcn theme
  • React 19+
  • MIT licensed
  • Tailwind v4
  • 1 extra npm package
  • A11y guidance in docs

StopsBooking ref misread over the phone

Was this component page useful?

How do I install Spell Out?

pnpm dlx shadcn@latest add @bollard/spell-out

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

How do I use Spell Out in React?

spell-out-usage.tsx
import { SpellOut } from "@/components/ui/spell-out"

<SpellOut label="Booking reference" value="K5O1ZB" />

What input mistakes does Spell Out catch?

  • Look-alike characters (0/O, 1/l/I, 5/S), named
  • Non-Latin homoglyphs (Cyrillic, Greek) posing as Latin letters
  • Invisible characters and leading/trailing spaces
  • Case that matters, spoken as capital/lowercase
  • Copying the exact value instead of the grouped display

What props does Spell Out accept?

SpellOut props
PropTypeDefault
value* (required)

The exact value: a booking ref, IBAN, wallet address, licence key or password.

string—
label

What it is, e.g. "Booking reference".

string—
groupSize

Characters per group. Defaults to 3 for short codes and 4 for long ones.

number—
caseSensitive

Say "capital"/"lowercase" for letters. Defaults to on when the value mixes cases, or for secrets.

boolean—
secret

Mask the value until revealed, then hide it again after `revealFor` ms.

booleanfalse
revealFor

How long a revealed secret stays visible, in ms.

number30_000
defaultView

Which view opens first.

"characters" | "phonetic""characters"
onCopied

Called after the exact value was copied.

() => void—
viewLabel

Accessible label of the view switch.

string"View"
charactersLabel

Label of the characters view.

string"Characters"
phoneticLabel

Label of the phonetic (NATO) view.

string"Read aloud"
copyLabel

Label of the copy button.

string"Copy"
copiedLabel

Announced after copying.

string"Copied"
showLabel

Label of the reveal button.

string"Show"
hideLabel

Label of the hide button.

string"Hide"
hiddenLabel

Read in place of a hidden value.

string"Hidden. Show it to spell it out."
homoglyphText

Templates: `{position}` and `{detail}` are filled in.

string"Character {position} is not a Latin “{detail}”, it only …
invisibleText

Warning for invisible characters.

string"Character {position} is an invisible {detail}."
edgeSpaceText

Warning for leading or trailing spaces.

string"Character {position} is a space at the edge, easy to los…
confusableHint

Hint explaining look-alike names.

string"Look-alike characters are named underneath."

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

How is Spell Out accessible?

  • View switch uses aria-pressed buttons in a labelled group
  • Groups are a list; each has its spoken spelling for screen readers
  • Hidden values announce a hidden label; reveal is an aria-pressed toggle
  • Copy result and warnings render in polite live regions

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

What are the limitations and server boundaries?

  • Look-alike list is a common set, not exhaustive
  • Secret mode masks visually; the value is still in the page

What expensive mistakes does Spell Out stop?

Booking ref misread over the phone

Also known as

nato alphabet · spell out · pnr · booking reference · wallet address · confusable · phonetic · support call

Field type

What dependencies does Spell Out require?

Spell Out facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameSpell Out
Registry identifier@bollard/spell-out
Install commandnpx shadcn@latest add @bollard/spell-out
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)
Dependencieslucide-react
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 Spell Out

How does Spell Out validate Indian financial identifiers?

Spell Out stops booking ref misread over the phone. Complies with national standards for Look-alike characters (0/O, 1/l/I, 5/S), named, Non-Latin homoglyphs (Cyrillic, Greek) posing as Latin letters, Invisible characters and leading/trailing spaces, Case that matters, spoken as capital/lowercase, Copying the exact value instead of the grouped display. Limitation: verify spell-out with issuer gateway.

How do I install spell-out with shadcn?

Run `npx shadcn@latest add @bollard/spell-out`. Sources added: registry/default/spell-out/spell-out.tsx, registry/default/spell-out/spell.ts. Package requirements: lucide-react.

What props customize Spell Out?

Spell Out accepts `value`, `label`, `groupSize`, `caseSensitive`, `secret`. Configures nato alphabet, spell out, pnr behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of spell-out?

Look-alike list is a common set, not exhaustive. Secret mode masks visually; the value is still in the page Server requirement: backend verification for spell-out.

How does Spell Out meet accessibility guidelines?

View switch uses aria-pressed buttons in a labelled group. Groups are a list; each has its spoken spelling for screen readers. Hidden values announce a hidden label; reveal is an aria-pressed toggle. Copy result and warnings render in polite live regions. Minimizes errors: pnr misread, spell over phone.

Which components pair with Spell Out?