Input Mask

Provides flexible masked input fields for enforcing specific input formats like phone numbers, dates, or IDs.

react-input-mask

Installation


1

Install the following dependencies:

npx shadcn@latest add https://sbthemes.com/r/input-mask.json

Examples


Custom Format

Permanents

Form


API Reference

InputMaskField

PropTypeDefault
maskstring-
formatChars{ [key: string]: string }-
permanentsnumber[]-
valuestring-
onChange(e: React.ChangeEvent<HTMLInputElement>) => void-