Radio Block
Displays as a series of large buttons with icons.
Installation
Install
yarn add @iag/chroma-react-ui.components
Import
import { RadioBlock } from '@iag/chroma-react-ui.components';
Accessibility
Accessibility documentation(opens in new window)Default
Radio blocks are displayed as block level when no cols
prop is added.
Inline
Displays radio buttons inline. Set variant="inline"
.
Columns
Available column options are 2
, 3
, 4
, 5
and 6
via the cols
prop.
Error
Disabled
Example with icons
Properties
Name
Description
- classNamestringAdditional CSS classes to be applied
- disabledbooleanBoolean indicating if the input is disabled
- errorbooleanBoolean indicating if the input is in an error state
- idstringHTML id attribute for the Input
- namestringHTML name attribute for the input
- onChange(event: ChangeEvent<HTMLInputElement>) => voidFunction to be called when the input value changes
- options*IOptions[]Array of { label:string, value: string, disabled?: boolean, icon?: ReactNode }
- valuestringThe input value
- cols2 | 3 | 4 | 5 | 6Number of columns to display
- variant"inline"The type of radio block