Skip to content

<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.

All components

States ​

The closed list data-state takes on the element.

  • idle
  • picking
  • picked
  • locked

Other attributes ​

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

AttributeOnValues
data-columnsthe element1, 2, 3
data-statechoiceavailable, recommended, picked, dimmed, off
data-offchoiceresources, host, os, hosted
data-shortchoiceany

Events ​

Dispatched on the element, bubbling. Listen with addEventListener.

  • alta-pick
  • alta-picked
  • alta-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

Alta OS is open source (MIT).