MaterialR Radio
@materialr/radio
React Material radio implementation
Installation
$ npm install --save @materialr/radio
Demo
A full demo is available on the MaterialR website showcasing all variants.
Components
Default export
import Radio from '@materialr/radio';
Props
Prop | Type | Required | Default | Description |
---|---|---|---|---|
checked |
bool | Yes | N/A | Whether the radio button is checked |
className |
string | No | undefined | Additional classNames to add |
disabled |
bool | No | false | Whether the radio button is disabled |
id |
string | No | uuidv1() |
The id attribute for the element |
label |
string | Yes | N/A | The label for the radio button |
name |
string | Yes | N/A | The name attribute of the element |
onBlur |
func | No | undefined | The blur event handler |
onChange |
func | Yes | N/A | The change event handler |
onDragStart |
func | No | undefined | The dragstart event handler |
onDrop |
func | No | undefined | The drop event handler |
onFocus |
func | No | undefined | The focus event handler |
value |
string | Yes | N/A | The element's value |