vn/ui / Docs / Components

Bank Selector

Find a bank by name, abbreviation or BIN.

Preview

BIN970436

The Code tab uses the common @/* alias. Import the copied file from the directory in vnui.json if your app uses a different path.

Installation

Initialize vn/ui in your app, then add this component.

npx @naminc/vnui@latest add bank-selector

Usage and variants

The bundled directory covers nine banks. Search by BIN, code, short name or Vietnamese name. Supply your own directory to change coverage. Provide a licensed local logo path in each bank record or display its code.

<BankSelector entries={[{ bin: "970436", code: "VCB", shortName: "Vietcombank", name: "Ngân hàng TMCP Ngoại thương Việt Nam" }]} />

API

PropTypeBehavior
value, defaultValuestringControlled value or initial uncontrolled value.
onValueChange(value) => voidReceives the next value; connect it to form state or React Hook Form Controller.
label, name, disabled, classNamestring, string, boolean, stringVisible label, form name, disabled state and CSS class.
entriesreadonly Bank[]Override the local bank directory.
valuestringSelected six-digit BIN.

Use value and onValueChange for controlled fields, including React Hook Form Controller. Use defaultValue for standalone fields. label, name, disabled and className customize the field.

Accessibility

Fields have visible labels and keyboard focus. Searchable selectors support typing, arrow keys, Enter and Escape; date controls use browser keyboard behavior.

A search with no result announces No matches. Type a name or BIN, then use arrow keys, Enter and Escape in the combobox.