# field.password.shown

A password field while its content is revealed

Component: [`<Field>`](https://www.prongs.dev/docs/components/field.md) · Renders: `<input type="text">` · Profile: [UI](https://www.prongs.dev/docs/intents/ui.md)

## Example

```tsx
<Field intent="field.password.shown" id="password-shown" name="password-shown" />
```

## Choosing between neighbours

Find the row that describes your element, and use the intent on the right.

| If it is for… | Use |
|---|---|
| A password field while its content is revealed | `field.password.shown` (this page) |

## Connections

Declared in the registry, both directions. Where an intent is used in your own code is something check and the gallery see; this site has no app code.

- Built from: [`field.password`](https://www.prongs.dev/docs/intents/field/password.md)

## For registry authors

**Starter intents.** These are the intents `prongs add` puts in your registry, shown in this site’s theme. Yours are your own `registry.ts`: rename, restyle and add to them, and see them with `prongs add gallery`.

What this intent is built from and its entry in `components/prongs/registry.ts`. You only need this to change how it looks or to add an intent like it.

How field.password.shown resolves, and its definition

Each layer adds to the one before it; a later class wins over an earlier one that sets the same thing.

- [`input.default`](https://www.prongs.dev/docs/intents/ui.md#input-default) — Bordered input box

  ```
  w-full min-w-0 rounded-md border border-input bg-background pl-3
  pr-3 py-2 text-base text-foreground
  placeholder:text-muted-foreground focus-visible:outline-none
  focus-visible:ring-2 focus-visible:ring-ring
  disabled:cursor-not-allowed disabled:opacity-50
  aria-invalid:border-destructive
  ```

- [`field.password`](https://www.prongs.dev/docs/intents/field/password.md) — A password, with room for a show/hide control. Set autoComplete="new-password" when creating one

  ```
  pr-14
  ```

- `field.password.shown` (this page) — A password field while its content is revealed

Final classes

```
w-full min-w-0 rounded-md border border-input bg-background pl-3
py-2 text-base text-foreground placeholder:text-muted-foreground
focus-visible:outline-none focus-visible:ring-2
focus-visible:ring-ring disabled:cursor-not-allowed
disabled:opacity-50 aria-invalid:border-destructive pr-14
```

Element behaviour

```
{ type: 'text', autoComplete: 'current-password' }
```

Definition

```ts
'field.password.shown': {
  kind: 'semantic',
  description: 'A password field while its content is revealed',
  refs: ['field.password'],
  binding: { behavior: { type: 'text' } },
},
```
