Gulf components
Five inputs for the shadcn registry. They use your shadcn theme and primitives, and every check comes from @dualkit/format.
Each one installs into components/gulf with the shadcn CLI, along with Input, Label and a shared field file. They work with and without shadcn init --rtl. All labels, help text and error messages come in as props.
Each takes a controlled value and onChange, and onResult hands you the result from format: { ok: true, value } or { ok: false, error: { code, message } }.
Phone input
A number from any of the six GCC countries. It reads Arabic-Indic digits, returns E.164 and stays left to right in Arabic.
Pick the country, then type the number.
{"ok":true,"value":{"country":"AE","e164":"+971501234567","type":"mobile"}}اختر الدولة ثم اكتب الرقم.
{"ok":true,"value":{"country":"SA","e164":"+966551234567","type":"mobile"}}IBAN input
Groups the IBAN in fours as you type, and checks the length and checksum for each Gulf country.
Spaces are added for you.
{"ok":true,"value":{"country":"AE","electronic":"AE070331234567890123456","formatted":"AE07 0331 2345 6789 0123 456","bankCode":"033"}}تُضاف المسافات تلقائيًا.
{"ok":true,"value":{"country":"SA","electronic":"SA0380000000608010167519","formatted":"SA03 8000 0000 6080 1016 7519","bankCode":"80"}}National ID input
A national ID for the UAE, Saudi Arabia (ID or Iqama), Kuwait, Qatar or Bahrain, grouped as you type and left to right in both languages. UAE, Saudi and Kuwait numbers have a check digit. Qatar and Bahrain publish none, so they get a length and shape check, and the result says so.
15 digits, starting with 784.
{"ok":true,"value":{"country":"AE","strength":"checksum","digits":"784199012345676","formatted":"784-1990-1234567-6","year":1990}}١٠ أرقام. الهوية تبدأ بـ ١ والإقامة بـ ٢.
{"ok":true,"value":{"country":"SA","strength":"checksum","digits":"1012345672","formatted":"1012345672","holder":"citizen"}}Amount
An amount in AED, SAR, QAR, KWD, BHD or OMR. Dinars and rials take three decimals. English puts the code first and Arabic puts the abbreviation after the number.
Up to three decimals for KWD.
{"ok":true,"value":{"amount":1250.125,"formatted":"KWD 1,250.125"}}حتى ثلاث خانات عشرية للدينار الكويتي.
{"ok":true,"value":{"amount":1250.125,"formatted":"١٬٢٥٠٫١٢٥ د.ك"}}Hijri date
Type a date once and see it in Gregorian and Umm al-Qura Hijri side by side. The time zone is required.
Write it as YYYY-MM-DD.
{"ok":true,"value":{"iso":"2026-10-13","date":"2026-10-13T12:00:00.000Z","hijri":{"year":1448,"month":5,"day":2}}}السنة-الشهر-اليوم.
{"ok":true,"value":{"iso":"2026-10-13","date":"2026-10-13T12:00:00.000Z","hijri":{"year":1448,"month":5,"day":2}}}