# Password

> A password input with strength scoring and a generator (Zod schema included).

_Updated: 2026-06-04_

A password input with strength scoring and a generator (Zod schema included).

## Installation

```bash
railbase ui add password
```

Peer dependencies:

```bash
npm install zod
```

> [!NOTE]
> `railbase ui add` also copies the `input` component — they ship alongside this component automatically.

## Usage

```tsx
import { PasswordInput } from "@/lib/ui/password";

<PasswordInput value={pw} onInput={(e) => setPw(e.currentTarget.value)} />
// passwordSchema, scorePassword(), generatePassword() are also exported
```

## Anatomy

Exported parts: `passwordSchema` · `scorePassword` · `generatePassword` · `PasswordInput`
