Zero-dependency input masks for React Hook Form. The form keeps the clean value while the input shows the mask; phone, card, date, and currency presets are built in, Turkish presets (TCKN, VKN, IBAN) included.
Form value: -
Display: -
Form value: -
Display: -
TCKN · VKN · IBAN · Bank
TCKN, VKN, IBAN, phone numbers and lira amounts work with Turkish rules out of the box. The bank’s name is detected as the IBAN is typed.
useViraMask(form, schema)
Your form keeps the clean value while users see it neatly formatted. Your existing React Hook Form code keeps working as it is.
Luhn · Amex · minAge
Card numbers are checked with the Luhn algorithm and IBANs with the mod-97 algorithm. Past expiry dates and age limits are covered too.
@virastack/mask/server
Define a mask once and use the same one in a Server Action. The server receives the clean, unformatted value.
Tokens · [optional]
Describe your own formats, like an order number or reference code, in a few lines. Write it once and reuse it everywhere.
Zero dependencies · <10 KB
The whole package is under 10 KB (min+brotli) with no dependencies. Only the parts you use end up in your project.