Radio component
A component that handles radio buttons and grouping of radio buttons
Install
npm i @wethecurious/wtc-ui-library
Usage
Import it into your project
import { Radio, RadioGroup } from '@wethecurious/wtc-ui-library'
Prop
<RadioGroup
onChange={this.onRadioChangeThree}
ariaLabel='Aria label group'
>
<Radio radioId='first' ariaLabel='first option' />
<Radio radioId='second' ariaLabel='second option' />
<Radio radioId='third' ariaLabel='third option ' />
</RadioGroup>
RadioGroup
Prop | Description | Default |
---|---|---|
labelId | Sets the groups aria-labelledby value | |
ariaLabel | Sets the groups aria-label value | |
onChange | Function called on radio button change, accepts the radio id param |
Radio
Prop | Description | Default |
---|---|---|
size | Defines the size of the radio button | s |
isOn | Sets the radio button on / off | off |
backgroundColour | Specifies the background colour | |
checkedColour | Specifies the inner checkout circle colour | |
isOutline | Displays or hides the radio outline | true |