CheckboxGroup
A labelled group of checkboxes for several values.
Locales
import {Checkbox, CheckboxGroup} from 'alinea/components'
export function CheckboxGroupExample() {
return (
<CheckboxGroup label="Locales" defaultValue={['en', 'nl']}>
<Checkbox value="en">English</Checkbox>
<Checkbox value="nl">Nederlands</Checkbox>
<Checkbox value="fr">Français</Checkbox>
</CheckboxGroup>
)
}Props
PropTypeDefaultDescription
valueArray<string>Default –
defaultValueArray<string>Default –
onValueChange(value: Array<string>) => voidDefault –
orientationOrientationDefault 'vertical'
namestringDefault –
labelReactNodeDefault –
descriptionReactNodeDefault –
errorReactNodeDefault –
requiredbooleanDefault –
disabledbooleanDefault –
readOnlybooleanDefault –
iconIconType | ReactElementDefault –
sharedbooleanDefault –Marks the field as shared between translations
Also accepts className and style, id and aria-* labelling attributes and data-* attributes.