IFSC Input

IFSC Input is a copy-paste React component that stops helps prevent a transfer to the wrong branch 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/ifsc-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

StopsHelps prevent a transfer to the wrong branch

Was this component page useful?

How do I install IFSC Input?

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

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

How do I use IFSC Input in React?

ifsc-input-usage.tsx
import { IfscInput } from "@/components/ui/ifsc-input"

<IfscInput value={ifsc} onValueChange={setIfsc} lookup={lookupDemoIfsc} expectedBank={bank} onUseBank={(_, name) => setBank(name)} requiredRail="RTGS" />

What input mistakes does IFSC Input catch?

  • Letter O typed for the fifth character, which is always 0
  • Missing 0, wrong length, or digits in the 4-letter bank code
  • Prefixes guessed from the bank name (AXIS instead of UTIB)
  • Branch from the lookup belonging to a different bank than the one chosen
  • Branch that doesn't support a required rail (requiredRail)

What props does IFSC Input accept?

IfscInput props
PropTypeDefault
label

Visible label.

string"IFSC"
value

Controlled IFSC (cleaned and uppercased).

string—
defaultValue

Initial IFSC when uncontrolled.

string""
onValueChange

Called with the cleaned, uppercased code on every change.

(value: string) => void—
lookup

Finds the branch for a complete code. Resolve null if it doesn't exist, undefined if this lookup can't check it. See createRazorpayIfscLookup.

(ifsc: string, signal: AbortSignal) => Promise<IfscDetails | null | undefined>—
onDetailsChange

Called with the branch once found, or null when the code changes or isn't found/checked.

(details: IfscDetails | null) => void—
expectedBank

The bank the user picked earlier in the form (name or 4-letter code), compared with the IFSC's bank.

string—
onUseBank

Offers a one-tap switch of the picked bank when it doesn't match the IFSC.

(bankCode: string, bankName: string) => void—
requiredRail

A payment rail this transfer needs; warns when the branch doesn't support it.

IfscRail—
mismatchMessage

Text after the IFSC's bank in the mismatch warning, before the picked bank.

string"but you picked"
notFoundMessage

Shown when the lookup finds no branch.

string"No branch has this IFSC."
notCheckedMessage

Shown when a lookup can't confirm a code (for example, an offline preview).

string"This IFSC wasn't checked against a branch directory."

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

How is IFSC Input accessible?

  • Visible label tied to the input, described by a polite status region
  • aria-invalid when the lookup finds no branch
  • Lookup failures use role=alert with a retry button
  • Icons are aria-hidden; warnings are text

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: Re-validate the IFSC and run payee name verification on the server before initiating the transfer.

  • Format looks valid is not the same as verified; only your lookup confirms the branch exists
  • Built-in bank prefix list is partial
  • Doesn't check the account number or the payee name

What validation rules apply to IFSC Input?

Rules last verified:

Informational; check the official source. Format rule confirmed. The guessed-prefix list and the Razorpay API shape were not re-verified. Copied components don't update themselves, so re-check after rule changes (see updating a component).

What expensive mistakes does IFSC Input stop?

Helps prevent a transfer to the wrong branch

Also known as

ifsc · ifsc code · bank branch · neft · rtgs · imps · beneficiary · bank details

Field type

What dependencies does IFSC Input require?

IFSC Input facts & technical specifications

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

How does IFSC Input validate Indian financial identifiers?

IFSC Input stops a transfer to the wrong branch. Complies with national standards for Letter O typed for the fifth character, which is always 0, Missing 0, wrong length, or digits in the 4-letter bank code, Prefixes guessed from the bank name (AXIS instead of UTIB), Branch from the lookup belonging to a different bank than the one chosen, Branch that doesn't support a required rail (requiredRail). Limitation: verify ifsc-input with issuer gateway.

How do I install ifsc-input with shadcn?

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

What props customize IFSC Input?

IFSC Input accepts `label`, `value`, `defaultValue`, `onValueChange`, `lookup`. Configures ifsc, ifsc code, bank branch behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of ifsc-input?

Format looks valid is not the same as verified; only your lookup confirms the branch exists. Built-in bank prefix list is partial. Doesn't check the account number or the payee name Server requirement: Re-validate the IFSC and run payee name verification on the server before initiating the transfer.

How does IFSC Input meet accessibility guidelines?

Visible label tied to the input, described by a polite status region. aria-invalid when the lookup finds no branch. Lookup failures use role=alert with a retry button. Icons are aria-hidden; warnings are text. Minimizes errors: ifsc code validation, ifsc letter o vs zero.

Which components pair with IFSC Input?