# Password Peek

> A password field whose eye blinks as you toggle it, and whose characters rise into view left to right instead of snapping from dots.

## Spec sheet

| | |
| --- | --- |
| Access | Free: no account, free for commercial use |
| Shelf | Components › State Changes |
| Live preview | https://uibrik.com/components/password-peek |
| Writes | 1 file into `components/uibrik/password-peek/` |
| Packages | `motion` (the CLI installs them) |
| Needs | React 19, Tailwind CSS v4, a project set up with `npx shadcn@latest init` |
| Theme | Reads the shadcn tokens and follows class-based dark mode ([theming](https://uibrik.com/docs/theming.md)) |
| Updated | Nov 22, 2026 |

## Add it

```bash
npx shadcn@latest add https://uibrik.com/r/password-peek.json
```

With the `@uibrik` namespace in `components.json` ([setup](https://uibrik.com/docs/installation.md)): `npx shadcn@latest add @uibrik/password-peek`.

Can't run commands? https://uibrik.com/components/password-peek/prompt.txt has every file verbatim, with the setup steps, ready for an assistant to write.

## Render it

Renders as is; every value shown is the default, so delete any line you don't need.

```tsx
import { PasswordPeek } from "@/components/uibrik/password-peek/password-peek";

<PasswordPeek
  label="Password"
  placeholder="Enter password"
  defaultValue="sunset-harbor-42"
  revealDuration={0.35}
  radius={12}
  defaultVisible={false}
  // value="…"
  // onValueChange={(value) => {}}
  // visible={false}
  // onVisibleChange={(visible) => {}}
/>
```

## Tune it

The same props as the Customize panel on https://uibrik.com/components/password-peek.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `label` | `string` | `"Password"` | Label above the field. Empty hides it but keeps it as the accessible name. |
| `placeholder` | `string` | `"Enter password"` | Shown while empty. |
| `defaultValue` | `string` | `"sunset-harbor-42"` | Value on mount when uncontrolled. |
| `revealDuration` | `number` | `0.35` | Longest the left-to-right reveal may take, however long the password. |
| `radius` | `number` | `12` | Corner radius. |

## Wire it

The props the Customize panel doesn't show: ranges, data, content and callbacks.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `value / onValueChange` | `string / (value) => void` |  | Controlled value. |
| `visible / onVisibleChange` | `boolean / (visible) => void` |  | Controlled visibility. |
| `defaultVisible` | `boolean` | `false` | Visibility on mount when uncontrolled. |
| `...input props` | `InputHTMLAttributes` |  | name, autoComplete, required and the rest go to the input. |
| `className` | `string` |  | Classes for the wrapper. |

## Where it fits

- **Sign-in and sign-up**: The left-to-right reveal makes it obvious the password is now showing, even at a glance. Pairs with [Auth Forms](https://uibrik.com/components/auth-forms.md) (Pro) and [Password Strength](https://uibrik.com/components/password-strength.md) (Pro).
- **Wi-Fi and device setup**: Long generated passwords are easier to check against a label when they appear in order.
- **Secrets in settings**: The same peek works for tokens and keys a user needs to read back once. Pairs with [API Keys](https://uibrik.com/components/api-keys.md) (Pro) and [Settings Page](https://uibrik.com/components/settings-page.md) (Pro).

## Same shelf: State Changes

- [Pin Tab](https://uibrik.com/components/pin-tab.md) (Pro): A tab bar where pinning shrinks a tab to its icon and slides it to the front, and unpinning grows it back with its title.
- [Presence Dot](https://uibrik.com/components/presence-dot.md) (Pro): An avatar status dot that morphs between online, away, busy and offline, and opens from the dot itself into a tiny picker that previews each status as you hover.
- [Read Receipts](https://uibrik.com/components/read-receipts.md): A message bubble whose clock turns into one tick, then two, then fills with colour once the message is read.
- [Sync Button](https://uibrik.com/components/sync-button.md): A sync button whose arrows spin while it works, coast to a stop instead of halting, draw a check, and keep "Synced 3 min ago" up to date.
- [Typing Dots](https://uibrik.com/components/typing-dots.md): A typing indicator whose bubble grows from three dots into the message itself, so the reply lands where the dots were.
- [Disabled Reason](https://uibrik.com/components/disabled-reason.md): A disabled button that answers a press: it shakes, says why it's blocked, and moves focus to the field that needs fixing.

## Ground rules

- Only the props above exist. To change anything else, edit the installed file.
- Keep the files in `components/uibrik/password-peek/` so the import paths keep resolving.
- The playbook for working with the whole library: https://uibrik.com/llms.txt
