#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 CheckboxThemeConfigextends StandardThemeConfig<CheckboxStyleKeys, CheckboxProps> {}
#Local Props
Name | Type | Description |
---|---|---|
label * | string | Label of the checkbox. |
defaultChecked | boolean | Change checkbox default checked. Will override input props defaultChecked . |
isChecked | boolean | Change checkbox to checked state when set to true. Will override input props checked . |
isDisabled | boolean | Change checkbox icon to disabled state when set to true. Will override input props disabled . |
isIndeterminate | boolean | Change checkbox icon to indeterminate checkbox when set to true. |
isLabelHidden | boolean | Hide label when set to true |
#Full Props
export interface CheckboxPropsextends Omit<CheckControlProps, "checkLabel" | "checkType" | "label">,StandardComponentProps,LocalCheckboxProps {}