RadioButton

a radio button control

Props

checked

Same as React <input checked={} />
truefalse

children

Function that will be called to render the visual representation. It will be passed an object indicating whether the button is checked. It should return a react element. For example: children={({ checked }) =&gt; &lt;Box ...>{...}</Box>}

({ checked }) => {...}

disabled

Same as React <input disabled={} />. Also adds a hidden input element with the same name so form submissions work.

truefalse

id

The DOM id attribute value to use for the underlying <input/> element.
"string"

label

Label text to place next to the control.
"node"

name

The DOM name attribute value to use for the underlying <input/> element.

"string"

onChange

Function that will be called when the user clicks the radio button. It will be passed a React event object. The current state can be accessed via event.target.checked. Same as React <input onChange={} />.

({ target: { checked } }) => {...}