Radio group
A group of buttons with radio behavior
Demo
API
Tag
Name | Description |
<s-radiogroup>
|
Custom HTML tag, no content |
Attributes
Name | Value | Required | Description |
radioitems |
String |
Stringified JSON array of radio items. See Guidelines below. |
|
nodefaultselection |
Boolean |
if not present, select the first radio item. Otherwise, leave all radio items unselected. |
Properties
Name | Value | Required | Description |
---|---|---|---|
radioItems |
Array |
Array of radio objects. See Guidelines below. |
|
noDefaultSelection |
Boolean |
if not present, select the first radio item. Otherwise, leave all radio items unselected. |
Events
Name | Detail | Description |
---|---|---|
s-select |
The selected button's |
Fired after a button is selected. |
Demo
API
Tag
Name |
<SRadiogroup>
|
Props
Name | Value | Required | Description |
radioItems |
Array |
Array of radio objects. See Guidelines below. |
|
onS-select |
Function |
Handles the |
Skylab React links
Typescript
Exported types
Guidelines
Creating radio items
The radio buttons within the Radiogroup component are set via an array of objects.
To pass the radio items to the s-radiogroup
component, you can either set
the radioItems
property equal to your array of objects, as in the code sample above, or you can stringify your array and set the radioitems
attribute.
No primary buttons
Buttons with the primary
class are not intended to be used in this component, as they do not have active
styling.
Usage - table toolbar
Use this JSON to implement the row height selector radio group in the table toolbar:
Design
Design resources can be found on the Skylab design documentation site: skylab.avalara.com