Checksum Input

Checksum Input is a copy-paste React component that stops money sent to a mistyped account 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/checksum-input
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

StopsMoney sent to a mistyped account

Was this component page useful?

How do I install Checksum Input?

pnpm dlx shadcn@latest add @bollard/checksum-input

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

How do I use Checksum Input in React?

checksum-input-usage.tsx
import { ChecksumInput } from "@/components/ui/checksum-input"

<ChecksumInput kind="iban" label="Payee IBAN" defaultValue="DE89 3704 0044 0523 0130 00" />

What input mistakes does Checksum Input catch?

  • IBAN mod-97 failures and wrong length for the country
  • Card numbers failing Luhn or with a wrong length for the brand
  • ISBN-10/13 check digit failures
  • IFSC codes in the wrong format, with known bank codes read back
  • The swapped or doubled character that explains a failure

What props does Checksum Input accept?

ChecksumInput props
PropTypeDefault
kind* (required)

What the field holds.

ChecksumKind—
label

Visible label. Defaults to the kind's name.

stringLABELS[kind]
value

Controlled value, without spaces.

string—
defaultValue

Initial value when uncontrolled.

string""
onValueChange

Called with the cleaned value (no spaces, upper case).

(value: string) => void—
hint

Helper text shown while there is nothing to report.

string—
locale

Locale for IBAN country names.

string"en"
messages

Override any of the default messages.

Partial<typeof CHECKSUM_MESSAGES>—

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

How is Checksum Input accessible?

  • Visible <label>; aria-invalid and aria-describedby to an aria-live="polite" status
  • Fix returns focus to the input
  • Grouped read-back is aria-hidden; status text carries the result

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

What are the limitations and server boundaries?

This is a UX guard rail. Enforce on the server: Validate the account or card with the bank or payment processor before moving money.

  • A passing check digit means the number is well-formed, not that the account, card or book exists
  • IFSC has no check digit: only format and a few bank codes are checked
  • The IBAN length table needs updating when countries join the registry

What expensive mistakes does Checksum Input stop?

Money sent to a mistyped account

Also known as

iban · card number · luhn · isbn · ifsc · mod 97 · check digit · bank details

Field type

What dependencies does Checksum Input require?

Checksum Input facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameChecksum Input
Registry identifier@bollard/checksum-input
Install commandnpx shadcn@latest add @bollard/checksum-input
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 Checksum Input

How does Checksum Input validate Indian financial identifiers?

Checksum Input stops money sent to a mistyped account. Complies with national standards for IBAN mod-97 failures and wrong length for the country, Card numbers failing Luhn or with a wrong length for the brand, ISBN-10/13 check digit failures, IFSC codes in the wrong format, with known bank codes read back, The swapped or doubled character that explains a failure. Limitation: verify checksum-input with issuer gateway.

How do I install checksum-input with shadcn?

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

What props customize Checksum Input?

Checksum Input accepts `kind`, `label`, `value`, `defaultValue`, `onValueChange`. Configures iban, card number, luhn behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of checksum-input?

A passing check digit means the number is well-formed, not that the account, card or book exists. IFSC has no check digit: only format and a few bank codes are checked. The IBAN length table needs updating when countries join the registry Server requirement: Validate the account or card with the bank or payment processor before moving money.

How does Checksum Input meet accessibility guidelines?

Visible <label>; aria-invalid and aria-describedby to an aria-live="polite" status. Fix returns focus to the input. Grouped read-back is aria-hidden; status text carries the result. Minimizes errors: iban validation, luhn check card number.

Which components pair with Checksum Input?