Bank Selector
Find a bank by name, abbreviation or BIN.
Preview
970436The 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-selectorUsage 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
| Prop | Type | Behavior |
|---|---|---|
value, defaultValue | string | Controlled value or initial uncontrolled value. |
onValueChange | (value) => void | Receives the next value; connect it to form state or React Hook Form Controller. |
label, name, disabled, className | string, string, boolean, string | Visible label, form name, disabled state and CSS class. |
entries | readonly Bank[] | Override the local bank directory. |
value | string | Selected 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.