CheckBox
Props
Name | Type | Description |
---|---|---|
checkboxIcon | L.IconTypes.Icons | false | null | Checkbox icon, it is independent from the value, see examples |
children | React.Node | Label content |
defaultValue | boolean | Where to start |
id | string | Just an id |
isDisabled | boolean | In case you don't want it to be active |
onChange | (ev: ChangeEvent) => void | Change handler |
shouldRender | boolean | Pass false if you don't want the component to appear |
theme | PartialGlobalDefaultTheme[ typeof COMPONENTS_NAMESPACES.checkBox ] | ... |
value | boolean | Value |
_[className] | [x: string]: unknown | E.g.: _w-48 adds a css class w-48 to the component's outer wrapper. |
Examples
() => { const [value, setValue] = React.useState(true); return ( <L.CheckBox onChange={({ component }) => setValue(component.value)} value={value} > click me </L.CheckBox> ); }