Components
Radio Group
A set of options where exactly one can be selected.
Usage
Basic
HTML
<bs:bsui-radio-group defaultValue="pro">
<bs:bsui-radio value="free" label="Free" />
<bs:bsui-radio value="pro" label="Pro" />
<bs:bsui-radio value="enterprise" label="Enterprise" />
</bs:bsui-radio-group>Horizontal
Orientation lays a short list of options out in a row.
HTML
<bs:bsui-radio-group name="priority" defaultValue="normal" orientation="horizontal">
<bs:bsui-radio value="low" label="Low" />
<bs:bsui-radio value="normal" label="Normal" />
<bs:bsui-radio value="urgent" label="Urgent" />
</bs:bsui-radio-group>Unavailable option
A single option can be disabled while the rest of the group stays usable.
HTML
<bs:bsui-radio-group name="plan" defaultValue="pro">
<bs:bsui-radio value="free" label="Free" />
<bs:bsui-radio value="pro" label="Pro" />
<bs:bsui-radio value="enterprise" label="Enterprise, contact sales" disabled="true" />
</bs:bsui-radio-group>In a field
Label, help text and error wrap the whole group rather than any one option.
HTML
<bs:bsui-field invalid="true">
<bs:bsui-field-label text="Where should backups live?" />
<bs:bsui-radio-group name="backups">
<bs:bsui-radio value="eu" label="Europe" />
<bs:bsui-radio value="us" label="United States" />
</bs:bsui-radio-group>
<bs:bsui-field-description text="This cannot be changed after the first backup runs." />
<bs:bsui-field-error text="Pick a region to enable backups." />
</bs:bsui-field>Anatomy
Radio Group is composed of the blocks below. Each one is a separate block that only renders inside its parent.
bsui/radio-groupbsui/radio
Attributes
| Attribute | Type | Default |
|---|---|---|
defaultValue | text | — |
name | text | — |
disabled | toggle | false |
orientation | vertical | |
nameAlt | text | — |
onChange | text | — |
value | text | — |
bsui/radio
| Attribute | Type | Default |
|---|---|---|
value | text | — |
label | richtext | — |
disabled | toggle | false |
bindText | text | — |