Input mask
Dates
Use type="date" with a format. Every part stays in its range and the day fits the month.
Time
Hours stop at 23, minutes and seconds at 59. A digit that cannot start a part gets a 0 in front.
Phone numbers
A plain pattern: 0 is a digit and every other character is added for the user.
Payments
Groups of digits for card details, with ranges where a part has a limit.
Postal codes and IDs
Use a for a letter and * for any character.
Network
Add ranges to keep every group of digits between a minimum and a maximum.
Numbers
Use type="number". Tabler groups the thousands and cuts the fraction to scale.
Money
A prefix or suffix for the currency. padFractionalZeros completes the cents when the field loses focus.
Units
A number with a unit, and a max that the value never goes over.
Visible pattern
Add visible to show the whole pattern before the user types. Change the empty slot with placeholderChar.