Skip to content
العربية
Saudi forms and dates

IbanInput

Saudi IBAN in groups of four, checked with mod-97. A placeholder replaces the built-in one.

import { IbanInput, saudiError } from "@percentsa/ui";

Examples

Code
export function IbanInputExample() {
  const t = useT();
  const lang = useLang();
  const [iban, setIban] = useState("");
  const [touched, setTouched] = useState(false);
  return (
    <Field label="IBAN" error={touched ? saudiError("iban", iban, lang) : null} className="w-full max-w-sm">
      <IbanInput value={iban} onValueChange={setIban} onBlur={() => setTouched(true)} aria-label={t("IBAN", "الآيبان")} />
    </Field>
  );
}