English
<alta-choice-group>
One answer among a few, each with what it needs of the machine; an option the machine cannot take is greyed with its reason.
States
The closed list data-state takes on the element.
idlepickingpickedlocked
Other attributes
On the element, or on a part (part: attribute). A list of values is closed.
| Attribute | On | Values |
|---|---|---|
data-columns | the element | 1, 2, 3 |
data-state | choice | available, recommended, picked, dimmed, off |
data-off | choice | resources, host, os, hosted |
data-short | choice | any |
Events
Dispatched on the element, bubbling. Listen with addEventListener.
alta-pickalta-pickedalta-choice-off
Parts
Every node you can style, as [data-part="…"].
group · choice · medallion · choice-text · choice-label · choice-hint · choice-why · tag · tick · note
Slots
Children with slot="…" replace or add to these places.
choice:<id>
Style it
css
[data-aui="choice-group"][data-state="locked"] [data-part="group"] { /* … */ }Words it reads
Keys of the string tables (override them on <alta-provider>).
choice.
Files
packages/ui/src/elements/choice-group.ts · packages/ui/styles/components/forms.css