Password Input

Ready

The password input component is very much like the text input, with the difference that their value is obscured by default (by replacing its characters with dot symbol ("•"), and the mask can be toggled on/off using the show and hide component action.

Specifications

Password input component specifications
Password input component specifications

The password input color, typography, border, spacing, width and margin specifications are inherited from the text input, for reference check the text input component documentation.

The password input doesn't have the following text input elements, therefore their listed styles don't apply:

  • Placeholder
  • Prefix / Suffix

States

The component password has the following states:

States: enabled, hover, focus, error and disabled.

Password input component states
Password input component states

Anatomy

Component anatomy example
  1. 1.
    Label
  2. 2.
    Helper text (Optional)
  3. 3.
    Input container
  4. 4.
    Show/Hide action
  5. 5.
    Clear action
  6. 6.
    Error icon
  7. 7.
    Error message
  8. 8.
    Input value

Actions

Show and hide action to toggle the value visibility
Show and hide action to toggle the value visibility

The value of the input can be toggled on or off using the default action the component provides. The password input can also be clearable.

  • The toggle indicates the action that will be performed when clicked, tapped, or pressing keyboard Enter key.
  • The toggle has a title with a textual cue for the resulting action.

Accessibility

WCAG

WAI Web Accessibility Tutorials