A masked field is an enhanced input field that improves readability by providing visual and non-visual cues to a user about the expected value.
A Mask component renders a controlled input field that applies formatting to the input value when the field is blurred.
mask prop into the
TextField component with a valid value will
enable formatting to occur when the field is blurred. To "unmask" the
value, you can import and call the
Additional classes to be added to the root
Sets the initial value. Use this for an uncontrolled component; otherwise,
Additional classes to be added to the error message
Location of the error message relative to the field input
Additional classes to be added to the field element
Used to focus
Additional hint text to display
Access a reference to the
Text showing the requirement ("Required", "Optional", etc.). See Required and Optional Fields.
Applies the "inverse" UI theme
Label for the input
Applies date format masking to the input value entered
and renders to a text field above the input.
Additional classes to be added to the
Apply formatting to the field that's unique to the value you expect to be entered. Depending on the mask, the field's appearance and functionality may be affected.
Whether or not the text field is a multiline text field
Optionally specify the number of visible text lines for the field. Only applicable if this is a multiline field.
Set the max-width of the input either to
Sets the input's
The following Sass variables can be overridden to customize Input/Form components: