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:
This component uses a text field and its styles, which can be customized by the following variables:
For more information about how we tested and validated our work for each checklist item, read our component maturity documentation.
ColorMeets AA color contrast standards for accessibility and color blindness.Complete
Forced Colors Mode (FCM)While using FCM the components text is legible and improves readability.Complete
WCAG 2.1 Level AA ConformanceAll Axe checks for WCAG AA compliance have passed.Complete
Screen readersVoiceOver, NVDA, and JAWS screen readers provide concise communication and interaction.Incomplete
Keyboard navigationComponent is fully navigable with a keyboard.Complete
StorybookComponent has stories to cover all defined props.Complete
ResponsiveComponent designed to work in all responsive breakpoints.Complete
Spanish translationsIncludes Spanish translations for default text content.Not applicable
CodeTokens implemented in code.Complete
DesignTokens implemented in the Sketch.Complete