radio-button

v2.6.5arrow_drop_down
v2.6.5
v2.5.5
STATUS
Passing
DOWNLOADS
162
LICENSE
Apache 2.0
VISIBILITY
Public
PUBLISHED
3 months ago
subject
A radio button control.
1 contributor
Like
Use radio-button in your project ?
Copied
npm i @bit/grommet.grommet.radio-button
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.dev
Component Example
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
modified
chevron_left
chevron_right

RadioButton

A radio button control.

RadioButton should typically not be used directly. Instead, use RadioButtonGroup.

Usage

import { RadioButton } from 'grommet';
<RadioButton />

Properties

checked

Same as React <input checked={} />

boolean

disabled

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

boolean

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

Required. 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={} />.

function

Intrinsic element

input