Red
Blue
Green
Other
What is your favorite color?
Red
Blue
Green
Other
<orb-radio-group label="What is your favorite color?" note="Do the thing" buttons value="Green">
<orb-radio>Red</orb-radio>
<orb-radio>Blue</orb-radio>
<orb-radio>Green</orb-radio>
<orb-radio>Other</orb-radio>
</orb-radio-group>
<orb-radio-group value="Green">
<orb-label slot="label">What is your favorite color?</orb-label>
<orb-radio>Red</orb-radio>
<orb-radio>Blue</orb-radio>
<orb-radio>Green</orb-radio>
<orb-radio>Other</orb-radio>
</orb-radio-group>
Set mode to row or column to change the layout. Radios default to a column, and button groups default to a row. A row of radios wraps when there isn’t enough room.
Small
Medium
Large
Daily
Weekly
Monthly
<orb-stack space="lg">
<orb-radio-group label="Radios in a row" mode="row" value="Medium">
<orb-radio>Small</orb-radio>
<orb-radio>Medium</orb-radio>
<orb-radio>Large</orb-radio>
</orb-radio-group>
<orb-radio-group label="Buttons in a column" mode="column" buttons value="Weekly">
<orb-radio>Daily</orb-radio>
<orb-radio>Weekly</orb-radio>
<orb-radio>Monthly</orb-radio>
</orb-radio-group>
</orb-stack>
| Description |
Displays the radios as a group of buttons |
| Attribute |
buttons |
| Type |
boolean |
| Default |
false |
| Description |
Disables the controls |
| Attribute |
disabled |
| Type |
boolean |
| Default |
false |
| Description |
Label that shows above the control |
| Attribute |
label |
| Type |
string |
| Default |
undefined |
| Description |
Lays the radios out in a column or a row. Defaults to column for radios and row when buttons is set. |
| Attribute |
mode |
| Type |
"column" | "row" |
| Default |
undefined |
| Description |
Additional info that shows below the control |
| Attribute |
note |
| Type |
string |
| Default |
undefined |
| Description |
Value the form will reset to. Defaults to initial value if not specified |
| Attribute |
original-value |
| Type |
any |
| Default |
undefined |
| Description |
Requires a value before the form can be submitted |
| Attribute |
required |
| Type |
boolean |
| Default |
undefined |
| Description |
The currently selected value |
| Attribute |
value |
| Type |
any |
| Default |
undefined |
| Description |
Emits the selected value whenever it changes |
| Type |
CustomEvent<any> |
graph TD;
orb-radio-group --> orb-label
orb-radio-group --> orb-note
orb-calendar --> orb-radio-group
style orb-radio-group fill:#f9f,stroke:#333,stroke-width:4px