React-sim
GitHub

Radio

A radio control will create several radio buttons, one of which is selected.

radio takes:

The Common controls props properties, plus:

NameDescription
vertical
boolean, optional, false by default
Whether the options are shown horizontally or vertically.
NameDescription
options
array option objects
options is an array of option objects, which have label and value properties. label is a string, value can be a string, a number or a boolean. label is what is displayed, value is the value that will be passed when the control changes. If label and value are identical, instead of an object a simple string can be used.
<Model
showTimer={false}
initialParams={{ options: 'jet' }}
controls={[
{
type: 'radio',
label: 'Choose one',
param: 'options',
options: ['jet', 'set', 'radio'],
},
]}
/>
Edit this page on GitHub
Previous:
Toggle
Next:
Select
React-SimGitHub