Readback

Readback is a copy-paste React component that stops licence key misread, 0 vs o 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/readback
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

StopsLicence key misread, 0 vs O

Was this component page useful?

How do I install Readback?

pnpm dlx shadcn@latest add @bollard/readback

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

How do I use Readback in React?

readback-usage.tsx
import { Readback } from "@/components/ui/readback"

<Readback label="License key" value="8OB1-lZ5S-Q0I2-7KXM" />

What input mistakes does Readback catch?

  • Zero vs letter O, one vs small L, and other look-alikes
  • Long values without grouping
  • Copying spaces or dashes: copies the clean value
  • Reading it across a room: large view

What props does Readback accept?

Readback props
PropTypeDefault
value* (required)

The value to read or type elsewhere. Spaces and dashes are removed before grouping.

string—
label* (required)

What it is, e.g. "Wi-Fi password".

string—
groupSize

Characters per group, or a pattern like [4, 4, 4, 4].

number | number[]4
verbatim

Keep the original separators instead of stripping them (for passwords where they matter).

booleanfalse
showMode

Offer a full-screen, large-type view for showing the value to someone.

booleantrue
copyLabel

Text of the copy button.

string"Copy"
copiedLabel

Text shown after copying.

string"Copied"
showLabel

Text of the full-screen button.

string"Show"
doneLabel

Text of the button that closes the full-screen view.

string"Done"

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

How is Readback accessible?

  • Screen readers get the value spelled out group by group ("letter O", "small L"); the visual groups are aria-hidden
  • Large view is a labelled dialog opened by a button with aria-haspopup
  • Copy result is announced in a polite live region

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

What are the limitations and server boundaries?

  • Display only; it doesn't validate the value
  • Look-alike list is fixed and Latin-only

What expensive mistakes does Readback stop?

Licence key misread, 0 vs O

Also known as

license key · product key · wifi password · iban · recovery code · readback · monospace · confusable characters

What dependencies does Readback require?

Readback facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameReadback
Registry identifier@bollard/readback
Install commandnpx shadcn@latest add @bollard/readback
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 Readback

What form validation mistake does Readback catch?

Readback prevents licence key misread, 0 vs O. Groups a licence key, IBAN or Wi-Fi password and labels every look-alike character, so 0 and O or 1 and l aren't misread. Catches: Zero vs letter O, one vs small L, and other look-alikes, Long values without grouping, Copying spaces or dashes: copies the clean value, Reading it across a room: large view. Limitation: validate readback schemas on backend.

How do I install readback with shadcn?

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

What props customize Readback?

Readback accepts `value`, `label`, `groupSize`, `verbatim`, `showMode`. Configures license key, product key, wifi password behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of readback?

Display only; it doesn't validate the value. Look-alike list is fixed and Latin-only Server requirement: backend verification for readback.

How does Readback meet accessibility guidelines?

Screen readers get the value spelled out group by group ("letter O", "small L"); the visual groups are aria-hidden. Large view is a labelled dialog opened by a button with aria-haspopup. Copy result is announced in a polite live region. Minimizes errors: zero vs o confusion, license key wrong.

Which components pair with Readback?