#Checkbox

import Checkbox from "@poodle/ui/Checkbox";

Checkbox is a component allow the user to select a value from a list of options.

#Simple

Each checkbox must have a label for accessibility. We can hide the displayed label by using prop isLabelHidden={true}

#Sizes

Change Checkbox size via prop sizeStyle.

Default Checkbox sizes are s, m, l. If you do not set size, the Checkbox will use the size m as default.

#Theming

Please check theming component document here.

export type CheckboxStyleKeys = "root" | "control" | "input" | "icon" | "label"
export interface CheckboxThemeConfig
extends StandardThemeConfig<CheckboxStyleKeys, CheckboxProps> {}

#Local Props

NameTypeDescription
label * stringLabel of the checkbox.
defaultCheckedbooleanChange checkbox default checked.
Will override input props defaultChecked.
isCheckedbooleanChange checkbox to checked state when set to true.
Will override input props checked.
isDisabledbooleanChange checkbox icon to disabled state when set to true.
Will override input props disabled.
isIndeterminatebooleanChange checkbox icon to indeterminate checkbox when set to true.
isLabelHiddenbooleanHide label when set to true

#Full Props

export interface CheckboxProps
extends Omit<CheckControlProps, "checkLabel" | "checkType" | "label">,
StandardComponentProps,
LocalCheckboxProps {}