# `<alta-signin>`

> A sign-in with a tool: a link, a device code, an e-mail, a secret, or the tool's own window.

A sign-in with a tool: a link, a device code, an e-mail, a secret, or the tool's own window.

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

## States

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

- <span id="state-idle"></span>`idle`
- <span id="state-planning"></span>`planning`
- <span id="state-ready"></span>`ready`
- <span id="state-starting"></span>`starting`
- <span id="state-waiting"></span>`waiting`
- <span id="state-checking"></span>`checking`
- <span id="state-proving"></span>`proving`
- <span id="state-done"></span>`done`
- <span id="state-failed"></span>`failed`
- <span id="state-expired"></span>`expired`
- <span id="state-cancelled"></span>`cancelled`
- <span id="state-blocked"></span>`blocked`
- <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-kind` | the element | `link-code`, `device-code`, `email-link`, `secret`, `tool-browser` |
| `data-wait` | the element | `link`, `code`, `device`, `email`, `tool` |
| `data-problem` | the element | `refused`, `incomplete`, `local`, `address`, `verification` |
| `data-block` | the element | `screen`, `missing`, `first`, `card` |
| `data-state` | `kind` | `picked` |
| `data-index` | `kind` | any |

## Events

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

- <span id="event-alta-signin-state"></span>`alta-signin-state`
- <span id="event-alta-open-link"></span>`alta-open-link`
- <span id="event-alta-signin-done"></span>`alta-signin-done`
- <span id="event-alta-signin-failed"></span>`alta-signin-failed`
- <span id="event-alta-signin-switch"></span>`alta-signin-switch`

## Parts

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

`why` · `tool` · `title` · `product` · `kind-switch` · `kind` · `lead` · `link-row` · `link` · `link-host` · `device` · `code` · `copy` · `code-form` · `code-row` · `code-field` · `submit` · `problem` · `timer` · `foot` · `stop` · `email` · `terminal` · `show-window` · `alternative` · `progress` · `proof` · `plan` · `agreement` · `note` · `again`

## Slots

Children with `slot="…"` replace or add to these places.

`help` · `after`

## Draws inside itself

[`<alta-plan-card>`](https://docs.altasystem.ai/ui/components/plan-card) · [`<alta-agreement>`](https://docs.altasystem.ai/ui/components/agreement) · [`<alta-proof-badge>`](https://docs.altasystem.ai/ui/components/proof-badge) · [`<alta-secret-field>`](https://docs.altasystem.ai/ui/components/secret-field)

## Style it

```css
[data-aui="signin"][data-state="unavailable"] [data-part="why"] { /* … */ }
```

## Words it reads

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

`signin.` · `ui.copy` · `ui.copied`

## Files

`packages/ui/src/elements/signin.ts` · `packages/ui/styles/components/signin.css`
