MaskedInput
Format codes and other identifiers as users type with a configurable mask.
Basic usage
The # character accepts one digit and the hyphen is literal. Pass the initial sequence without the hyphen. submitValue="raw" submits only the digits.
Enter six digits. The hyphen is inserted automatically.
API
Key props and defaults.
| Prop | Values and behavior | Default |
|---|---|---|
mask | string | readonly string[] | required |
tokens | InputMaskTokens | built-in tokens |
value / defaultValue | raw string | empty |
onValueChange | (details) => void | — |
submitValue | formatted | raw | formatted |