Igloo branding

Radio

Use Radio components to be part of an options list where users can only make a single choice.

Installation

To install @igloo-ui/radio in your project, you will need to run the following command using npm:

npm install @igloo-ui/radio

If you prefer Yarn, use the following command instead:

yarn add @igloo-ui/radio

Then to use the component in your code just import it!

import Radio from '@igloo-ui/radio';

<Radio htmlFor="radio-id">Label</Radio>;

API

PropTypeDescription
childrenReactNodeThe content to display inside the label
classNamestringAdd a specific class to the checkbox
dataTeststringAdd a data-test tag for automated tests
htmlForstringIndicates the ID of the element that is controlled by the checkbox
smallbooleanChanges the size of label
checkedbooleanModifies true/false value of the native checkbox
disabledbooleanModifies the native disabled state of the native checkbox
helperTextstringThe content to display to help users
onChange(e: ChangeEvent<HTMLInputElement>) => voidFunction called when the value changes