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

Import

password-input.tsx
// Experimental: from the package's experimental entry, until it's stable.
import { PasswordInput } from "@qeetrix/react/experimental";

02

Props

And every native attribute of the element it renders.

PropTypeDefaultWhat it does
autoComplete"current-password" | "new-password" | "off"—Sign in, create one, or a secret that isn't theirs: so managers fill or suggest.
visible · defaultVisible · onVisibleChangebooleanfalseWhether it shows as text; hidden to start: people may not be alone.
capsLockWarningbooleantrue"Caps Lock is on" while typing with it on.
endAdornmentReactNode—Before Show password: a Copy button for a secret.
messagesPartial<…passwordInput>—Its words, over QeetrixProvider's.
… Input's props—Everything Input takes, but type.

03

Parts

Each part carries a data-slot, for tests and placement.

data-slotElementWhat it is
input-control<input>The input: Input's parts throughout.
password-input-caps<span>"Caps Lock is on", at the box's end, while it is.

04

A new password

new-password and the rule; it hides again when the form submits.

new-password.tsx
<Field label="New password" description="At least 12 characters." name="password">
  <PasswordInput autoComplete="new-password" minLength={12} required />
</Field>
Next — Password inputAccessibility