Forms
Input Mask
Documentation:
https://www.npmjs.com/package/react-text-mask
Static Mask Basic
Code
Input mask are use with
input
tags.
mask="'##-#######'" (99-9999999)
mask="'AA-####'" (aa-9999)
Alternate masks
Code
mask="'##.#'" (99.9)
mask="'##.##'" (99.99)
Dynamic Syntax
Code
mask="'#-AAA###'" (9-a{"{1,3}"}9{"{1,3}"})
mask="'AA-####'" (aa-9{"{1,4}"})
mask="'AA-##'" (aa-9{"{1,2}"})
Date
Code
mask="'##/##/####'" (dd/mm/yyyy)
mask="'##-##-####'" (99-99-9999)
mask="'## December, ####'" (99 December, 9999)
IP
Code
mask="'###.###.###.###'" (192.198.1.1)
Phone
Code
mask="'(###) ###-####'" ((999) 999-9999)
Currency
Code
$999,9999,999.99