Buttons
RadioGroup
Storybook
RadioGroup
Storybook
RadioGroup is a component that allows you to group multiple Radio components together.
Import
To import the RadioGroup component, use the following syntax:
1import { RadioGroup } from 'dd360-ds'
1import RadioGroup from 'dd360-ds/RadioGroup'
Usage
The RadioGroup component requires the "value" prop to be set. Here's an example of how to use the RadioGroup component:
RadioGroup
1import {RadioGroup, Radio} from 'dd360-ds'
2
3<RadioGroup name='radio-buttons-group' title='RadioGroup' value='A' row>
4 <Radio label='Lorem A' value='A' />
5 <Radio label='Lorem B' value='B' />
6</RadioGroup>
7
API Reference
Name | Types | Default |
---|---|---|
"value"* | string | - |
"title" | string | - |
"name" | string | - |
"onChange" | ((event: ChangeEvent<HTMLInputElement>) => void) | - |
"row" | boolean | false |
"className" | string | - |