Phone Number

US phone format with area code and number groups.

(999) 999-9999

Credit Card

16-digit card number grouped into 4-digit blocks.

9999 9999 9999 9999

Social Security

SSN format with dashes between groups.

999-99-9999

Date Format

Date entry with MM/DD/YYYY mask pattern.

99/99/9999

Time Entry

24-hour time format with hours and minutes.

99:99

Zip Code

US zip code with optional +4 extension.

99999
99999-9999

Usage

<InputMask label="Phone Number" mask="(999) 999-9999" placeholder="(555) 123-4567" /><InputMask label="Card Number" mask="9999 9999 9999 9999" placeholder="4242 4242 4242 4242" /><InputMask label="Date" mask="99/99/9999" placeholder="02/14/1990" />

Props

PropTypeDefaultDescription
masktext""Input mask pattern (9 = digit, A = letter, * = any)
placeholdertext""Placeholder text showing example input
labeltext""Label text above the input