# `<alta-agreement>`

> The owner's yes to a plan, with what it asks for (a capability, a permission, a sign-in). Nothing runs before it.

The owner's yes to a plan, with what it asks for (a capability, a permission, a sign-in). Nothing runs before it.

[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-ready"></span>`ready`
- <span id="state-invalid"></span>`invalid`
- <span id="state-agreeing"></span>`agreeing`
- <span id="state-agreed"></span>`agreed`
- <span id="state-declined"></span>`declined`
- <span id="state-refused"></span>`refused`
- <span id="state-disabled"></span>`disabled`

## Other attributes

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

| Attribute | On | Values |
|---|---|---|
| `data-ask` | `ask` | `capability`, `permission`, `signin`, `service`, `repair` |
| `data-new` | `ask` | present or absent |

## Events

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

- <span id="event-alta-agree"></span>`alta-agree`
- <span id="event-alta-agreed"></span>`alta-agreed`
- <span id="event-alta-decline"></span>`alta-decline`
- <span id="event-alta-refused"></span>`alta-refused`

## Parts

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

`action` · `again` · `alternative` · `decline` · `note` · `summary` · `title` · `lead` · `asks` · `ask` · `ask-kind` · `ask-name` · `ask-why` · `actions`

## Slots

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

`before-action` · `legal`

## Style it

```css
[data-aui="agreement"][data-state="disabled"] [data-part="action"] { /* … */ }
```

## Words it reads

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

`agree.` · `secret.unavailable` · `run.retry`

## Files

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