CheckBox

Props

NameTypeDescription
checkboxIconL.IconTypes.Icons | false | null

Checkbox icon, it is independent from the value, see examples

childrenReact.NodeLabel content
defaultValuebooleanWhere to start
idstringJust an id
isDisabledbooleanIn case you don't want it to be active
onChange(ev: ChangeEvent) => voidChange handler
shouldRender
boolean
Pass false if you don't want the component to appear
themePartialGlobalDefaultTheme[ typeof COMPONENTS_NAMESPACES.checkBox ]...
valuebooleanValue
_[className]
[x: string]: unknown
E.g.: _w-48 adds a css class w-48 to the component's outer wrapper.

Examples

  • Basic
  • Custom icons
  • Colored
  • Semi
() => {
  const [value, setValue] = React.useState(true);

  return (
    <L.CheckBox
      onChange={({ component }) => setValue(component.value)}
      value={value}
    >
      click me
    </L.CheckBox>
  );
}