# `<alta-plan-card>`

> What a run would do, before anything is written: the title, what gets installed or changed, the cost, the details folded away.

What a run would do, before anything is written: the title, what gets installed or changed, the cost, the details folded away.

[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-planned"></span>`planned`
- <span id="state-stale"></span>`stale`
- <span id="state-blocked"></span>`blocked`
- <span id="state-already"></span>`already`
- <span id="state-missing"></span>`missing`
- <span id="state-unavailable"></span>`unavailable`
- <span id="state-error"></span>`error`

## Other attributes

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

| Attribute | On | Values |
|---|---|---|
| `data-going` | the element | present or absent |
| `data-done` | `row` | present or absent |
| `data-chip` | `chip` | `size`, `duration`, `resource` |

## Events

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

- <span id="event-alta-plan"></span>`alta-plan`
- <span id="event-alta-plan-error"></span>`alta-plan-error`
- <span id="event-alta-details-toggle"></span>`alta-details-toggle`
- <span id="event-alta-install-first"></span>`alta-install-first`

## Parts

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

`title` · `note` · `skeleton` · `rows` · `row` · `row-mark` · `row-name` · `row-what` · `foot` · `cost` · `chip` · `blocked` · `stale` · `already` · `missing` · `unavailable` · `error` · `install-first` · `retry` · `details-toggle` · `details` · `body` · `writes` · `command` · `copy` · `undo`

## Slots

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

`before-rows` · `after-cost` · `actions`

## Draws inside itself

[`<alta-agreement>`](https://docs.altasystem.ai/ui/components/agreement)

## Style it

```css
[data-aui="plan-card"][data-state="error"] [data-part="title"] { /* … */ }
```

## Words it reads

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

`plan.` · `ui.details` · `ui.copy` · `ui.copied`

## Files

`packages/ui/src/elements/plan-card.ts` · `packages/ui/styles/components/step.css`
