- Boolean props are now prefixed by
is
. - There is no longer a loading state.
icon
prop has been renamed toprefix
.- Button props have been removed. To add a clear button, use the
isClearable
prop. For a more complex use case, create your own input using InputGroup. wrapperProps
no longer exists.validationState
has been changed toisInvalid
.
PasswordField
A password field is a specialized text field that allows a user to enter a password.
Usage
Disabled
A password field in a disabled state shows that an input field exists, but is not available in that circumstance. This can be used to maintain layout continuity and communicate that a field may become available later.
ReadOnly
The isReadOnly
prop makes the PasswordField's text content immutable. Unlike isDisabled
, the password field remains focusable and its content can still be copied. See the MDN docs for more information.
Error
A password field can be displayed in an error state to indicate that the user input is invalid.
Sizes
Password fields can vary in size.
Labeling
If a visible label isn't specified, an aria-label must be provided to the password field for accessibility. If the field is labeled by a separate element, an aria-labelledby
prop must be provided using the ID of the labeling element instead.
Description
A password field with a helper message.
ContextualHelp
A ContextualHelp element may be placed next to the label to provide additional information or help about a PasswordField.
Props
The placeholder text when the PasswordField is empty.
The size of the PasswordField.
If true
, the PasswordField will take all available width.
A ref for the HTML input element.
The props for the InputGroup.
The props for the Input.
The props for the EmbeddedButton.
The inline style for the element. A function may be provided to compute the style based on component state.
Regex pattern that the value of the input must match to be valid. See MDN.
Whether to use native HTML form validation to prevent form submission when the value is missing or invalid, or mark the field as required or invalid via ARIA.
An enumerated attribute that defines what action label or icon to preset for the enter key on virtual keyboards. See [https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/enterkeyhint].
Whether the input is disabled.
Whether the input can be selected but not changed by the user.
Whether user input is required on the input before form submission.
Whether the value is invalid.
A function that returns an error message if a given value is invalid.
Validation errors are displayed to the user when the form is submitted
if validationBehavior="native"
. For realtime validation, use the isInvalid
prop instead.
Whether the element should receive focus on render.
The current value (controlled).
The default value (uncontrolled).
Describes the type of autocomplete functionality the input should provide if any. See MDN.
The maximum number of characters supported by the input. See MDN.
The minimum number of characters required by the input. See MDN.
Hints at the type of data that might be entered by the user while editing the element or its contents. See MDN.
An attribute that takes as its value a space-separated string that describes what, if any, type of autocomplete functionality the input should provide. See MDN.
An enumerated attribute that defines whether the element may be checked for spelling errors. See MDN.
The name of the input element, used when submitting an HTML form. See MDN.
The CSS className for the element. A function may be provided to compute the class based on component state.
Sets the background-color
property.
If you want to use a token value from the SCALE, use the backgroundColor
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the background-color
property when active.
If you want to use a token value from the SCALE, use the backgroundColorActive
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the background-color
property when focused.
If you want to use a token value from the SCALE, use the backgroundColorFocus
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the background-color
property when hovered.
If you want to use a token value from the SCALE, use the backgroundColorHover
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the border
property.
If you want to use a token value from the SCALE, use the border
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the border
property when active.
If you want to use a token value from the SCALE, use the borderActive
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the border-bottom
property.
If you want to use a token value from the SCALE, use the borderBottom
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the border-bottom
property when active.
If you want to use a token value from the SCALE, use the borderBottomActive
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the border-bottom
property when focused.
If you want to use a token value from the SCALE, use the borderBottomFocus
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the border-bottom
property when hovered.
If you want to use a token value from the SCALE, use the borderBottomHover
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the border-bottom-left-radius
property.
If you want to use a token value from the SCALE, use the borderBottomLeftRadius
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the border-bottom-right-radius
property.
If you want to use a token value from the SCALE, use the borderBottomRightRadius
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the border
property when focused.
If you want to use a token value from the SCALE, use the borderFocus
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the border
property when hovered.
If you want to use a token value from the SCALE, use the borderHover
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the border-left
property.
If you want to use a token value from the SCALE, use the borderLeft
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the border-left
property when active.
If you want to use a token value from the SCALE, use the borderLeftActive
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the border-left
property when focused.
If you want to use a token value from the SCALE, use the borderLeftFocus
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the border-left
property when hovered.
If you want to use a token value from the SCALE, use the borderLeftHover
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the border-radius
property.
If you want to use a token value from the SCALE, use the borderRadius
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the border-right
property.
If you want to use a token value from the SCALE, use the borderRight
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the border-right
property when active.
If you want to use a token value from the SCALE, use the borderRightActive
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the border-right
property when focused.
If you want to use a token value from the SCALE, use the borderRightFocus
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the border-right
property when hovered.
If you want to use a token value from the SCALE, use the borderRightHover
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the border-top
property.
If you want to use a token value from the SCALE, use the borderTop
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the border-top
property when active.
If you want to use a token value from the SCALE, use the borderTopActive
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the border-top
property when focused.
If you want to use a token value from the SCALE, use the borderTopFocus
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the border-top
property when hovered.
If you want to use a token value from the SCALE, use the borderTopHover
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the border-top-left-radius
property.
If you want to use a token value from the SCALE, use the borderTopLeftRadius
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the border-top-right-radius
property.
If you want to use a token value from the SCALE, use the borderTopRightRadius
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the box-shadow
property.
If you want to use a token value from the SCALE, use the boxShadow
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the box-shadow
property when active.
If you want to use a token value from the SCALE, use the boxShadowActive
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the box-shadow
property when focused.
If you want to use a token value from the SCALE, use the boxShadowFocus
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the box-shadow
property when hovered.
If you want to use a token value from the SCALE, use the boxShadowHover
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the color
property.
If you want to use a token value from the SCALE, use the color
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the color
property when active.
If you want to use a token value from the SCALE, use the colorActive
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the color
property when focused.
If you want to use a token value from the SCALE, use the colorFocus
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the color
property when hovered.
If you want to use a token value from the SCALE, use the colorHover
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the column-gap
property.
If you want to use a token value from the SCALE, use the columnGap
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the fill
property.
If you want to use a token value from the SCALE, use the fill
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the fill
property when focused.
If you want to use a token value from the SCALE, use the fillFocus
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the fill
property when hovered.
If you want to use a token value from the SCALE, use the fillHover
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the font-family
property.
If you want to use a token value from the SCALE, use the fontFamily
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the font-size
property.
If you want to use a token value from the SCALE, use the fontSize
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the font-weight
property.
If you want to use a token value from the SCALE, use the fontWeight
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the gap
property.
If you want to use a token value from the SCALE, use the gap
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the grid-auto-columns
property.
If you want to use a token value from the SCALE, use the gridAutoColumns
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the grid-auto-rows
property.
If you want to use a token value from the SCALE, use the gridAutoRows
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the grid-column-span
property.
If you want to use a token value from the SCALE, use the gridColumnSpan
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the grid-row-span
property.
If you want to use a token value from the SCALE, use the gridRowSpan
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the grid-template-columns
property.
If you want to use a token value from the SCALE, use the gridTemplateColumns
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the grid-template-rows
property.
If you want to use a token value from the SCALE, use the gridTemplateRows
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the height
property.
If you want to use a token value from the SCALE, use the height
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the line-height
property.
If you want to use a token value from the SCALE, use the lineHeight
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the margin
property.
If you want to use a token value from the SCALE, use the margin
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the margin-bottom
property.
If you want to use a token value from the SCALE, use the marginBottom
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the margin-left
property.
If you want to use a token value from the SCALE, use the marginLeft
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the margin-right
property.
If you want to use a token value from the SCALE, use the marginRight
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the margin-top
property.
If you want to use a token value from the SCALE, use the marginTop
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the horizontal margin (margin-left
and margin-right
) property.
If you want to use a token value from the SCALE, use the marginX
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the vertical margin (margin-top
and margin-bottom
) property.
If you want to use a token value from the SCALE, use the marginY
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the max-height
property.
If you want to use a token value from the SCALE, use the maxHeight
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the max-width
property.
If you want to use a token value from the SCALE, use the maxWidth
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the min-height
property.
If you want to use a token value from the SCALE, use the minHeight
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the min-width
property.
If you want to use a token value from the SCALE, use the minWidth
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the padding
property.
If you want to use a token value from the SCALE, use the padding
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the padding-bottom
property.
If you want to use a token value from the SCALE, use the paddingBottom
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the padding-left
property.
If you want to use a token value from the SCALE, use the paddingLeft
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the padding-right
property.
If you want to use a token value from the SCALE, use the paddingRight
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the padding-top
property.
If you want to use a token value from the SCALE, use the paddingTop
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the horizontal padding (padding-left
and padding-right
) property.
If you want to use a token value from the SCALE, use the paddingX
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the vertical padding (padding-top
and padding-bottom
) property.
If you want to use a token value from the SCALE, use the paddingY
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the row-gap
property.
If you want to use a token value from the SCALE, use the rowGap
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the stroke
property.
If you want to use a token value from the SCALE, use the stroke
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
Sets the width
property.
If you want to use a token value from the SCALE, use the width
property instead.
This property is marked as UNSAFE because you're opting out of the intended values of the design system.
The helper message of the field.
The error message of the field.
The label of the field.
Whether the required state should be shown as an asterisk or a label, which would display (Optional) on all non required field labels.
A ContextualHelp element to place next to the label.