NimUI
ComponentsForms

PasswordInput

Password input with accessible visibility controls

PasswordInput keeps Input styling but adds an accessible show/hide toggle.

Import

import { PasswordInput } from '@nim-ui/components';

Basic Usage

Approval Password
Code
<PasswordInput
  name="approvalPassword"
  autoComplete="current-password"
  placeholder="Password"
/>

Props

variant and size come from Input — PasswordInput reuses its styling, so a validation state or a size set here behaves exactly as it does on an Input.

NameTypeDefaultDescription
variant'default' | 'error' | 'success''default'Visual style variant indicating validation state
size'sm' | 'md' | 'lg''md'Size of the input field
showLabelstring'Show password'Accessible name for the toggle while the password is hidden
hideLabelstring'Hide password'Accessible name for the toggle while the password is visible
disabledbooleanfalseWhether the field and its toggle are disabled
classNamestring-Additional CSS classes to apply

On this page