# `<alta-secret-field>`

> A password field the page cannot read: the value goes only to the owner's server, once, and is cleared.

A password field the page cannot read: the value goes only to the owner's server, once, and is cleared.

[All components](https://docs.altasystem.ai/ui/components/)

## States

The closed list `data-state` takes on the element.

- <span id="state-empty"></span>`empty`
- <span id="state-filled"></span>`filled`
- <span id="state-invalid"></span>`invalid`
- <span id="state-sending"></span>`sending`
- <span id="state-sent"></span>`sent`
- <span id="state-unavailable"></span>`unavailable`

## Other attributes

On the element, or on a part (`part: attribute`). A list of values is closed.

| Attribute | On | Values |
|---|---|---|
| `data-focus` | the element | present or absent |

## Events

Dispatched on the element, bubbling. Listen with `addEventListener`.

- <span id="event-alta-secret-change"></span>`alta-secret-change`
- <span id="event-alta-secret-enter"></span>`alta-secret-enter`

## Parts

Every node you can style, as `[data-part="…"]`.

`label` · `input` · `hint` · `error` · `reveal`

## Style it

```css
[data-aui="secret-field"][data-state="unavailable"] [data-part="label"] { /* … */ }
```

## Words it reads

Keys of the string tables (override them on `<alta-provider>`).

`secret.`

## Files

`packages/ui/src/elements/secret-field.ts`
