Checkbox.Group
Installation
Section titled “Installation”npm install @sk-web-gui/reactAnvändning
Section titled “Användning”import { Checkbox.Group } from '@sk-web-gui/react';| Prop | Typ | Standard | Beskrivning |
|---|---|---|---|
id | CheckboxItemProps['id'] | – | The id of the checkbox group. |
name | CheckboxItemProps['name'] | – | The name of the checkbox group. This prop is passed to each checbox |
children | React.ReactNode | – | The content of the checkbox group. Must be the Checkbox component |
defaultValue | Array<CheckboxItemProps['value']> | – | The initial value of the checkbox group |
value | Array<CheckboxItemProps['value']> | – | The value of the checkbox group |
onChange | (value: Array<CheckboxItemProps['value']>) => void | – | The callback fired when any children Checkbox is checked or unchecked |
direction | 'row' | 'column' | – | If true, the checkboxes will aligned horizontally. @default column |
size | CheckboxItemProps['size'] | – | Size of all wrapped checkbox |
color | CheckboxItemProps['color'] | – | Color of all wrapped checkbox |
Storyvarianter
Section titled “Storyvarianter”- Template – standardstory
- ExampleWithForm – standardstory
- ExampleWithState – standardstory
- ExampleWithIndeterminate – standardstory
- Implementation: @sk-web-gui/forms
- Storybook: Checkbox.Group