Skip to main content
  1. Docs
  2. Components
  3. Forms

Password input

A password or a secret, with Show password. Paste always works, and there's no length cap.

Import
@qeetrix/react/experimental
Status
ExperimentalSince 0.0.4
Renders
<input type="password">Server-rendered
Tested
WCAG 2.2 AAaxe on every pull request

01

When to use

Use it for
  • Signing in, or setting a new password.
  • A secret shown once: a client secret, a key.
Not for

02

Anatomy

  1. 1field-label<label>Names it, from its Field.
  2. 2input-control<input>Hidden until shown; spelling and capitalisation tools off.
  3. 3input-end<span>Show password: a toggle with aria-pressed; showing and hiding is announced.

03

Do and don't

Let it be shown
DoShow password, so people can check what they typed.
Don'tA plain password input: typing blind.

04

Content

  • State the rule before it's broken: "At least 12 characters."
  • Never cap the length, never block paste: password managers need both.
Next — Password inputAPI