Skip to content
synccn

Password Input

Show/hide toggle, strength meter and a live rules checklist.

  • At least 8 characters
  • One uppercase letter
  • One number
  • One symbol

Installation

$ pnpm dlx shadcn@latest add @synccn/password-input

First time in this project? Connect synccn with one command.

Usage

import { PasswordInput } from "@/components/ui/password-input";<PasswordInput />

API reference

Generated from the component's TypeScript types, so it always matches the code.

PasswordInput

Password field with show/hide, a strength meter and a rules checklist.

  • showStrength
    boolean

    Default true

    Show the meter and rules checklist.

  • rules
    PasswordRule[]

    Default RULES

    Checks shown in the list; strength is the number passed.

  • className
    string

    Extra classes for the root element.

Also accepts every standard <input> attribute, and forwards its ref.

Dependencies

Read from the component's imports when the site builds. The CLI installs all of these for you.

Helpers

npm packages

Accessibility

From the source

Read from this component's code when the site builds, so it can't drift.

  • ARIA attributes: aria-describedby, aria-label, aria-live
  • Shows a visible focus ring for keyboard users
  • Announces changes to screen readers