# Password decrypt

A password field whose reveal decodes like a cipher.

Also called: password input, show password, password reveal, scramble text.

> chatcn Pro: needs a Pro license (https://chatcn.dev/pro). Install from the `@chatcn-pro` registry with your license token; setup at https://chatcn.dev/docs/chatcn-pro.

Example: A reveal that decodes. Show decodes the password left to right, glyph by glyph, and hide scrambles it back to dots; the strength meter resolves from noise to solid as you type. Preview: https://chatcn.dev/preview/password-decrypt-demo

Show reveals the password left to right like a decoder: each dot scrambles through glyphs and lands on its letter, and Hide scrambles them back to dots the same way. New dots pop in on a spring. Strength is an ordered dither bar that resolves from sparse boiling noise into solid colour as the password gets better, and the word under it rolls between Weak, Good and Strong. Every character sits in a fixed cell, so nothing shifts while it decodes.

## Installation

```bash
npx shadcn@latest add @chatcn-pro/password-decrypt
```

## Usage

```tsx
import { PasswordDecrypt } from "@/components/ui/chatcn/pro/password-decrypt"

<PasswordDecrypt label="Create password" value={password} onValueChange={setPassword} />
```

## Props

| Prop | Type | Notes |
| --- | --- | --- |
| `value` / `defaultValue` / `onValueChange` | `string` |  |
| `label` | `ReactNode` | Default Password |
| `strength` | `boolean` | The meter and its word; default true |
| `revealed` / `onRevealedChange` | `boolean` | Optional control |
| Input props |  | Passed to the real input: `name`, `required`, `autoComplete` |

## Accessibility

- A real password input with its label; the eye is a toggle button that switches the input to text, and the strength line describes the field.

## Motion

- Glyphs flip every 42 ms, staggered 34 ms per letter; the meter rides a spring. Reduced motion: letters swap at once and the noise holds still.

Source: https://chatcn.dev/docs/components/password-decrypt