Checkbox
Implementation#
Default#
Example
Color#
Example
Validation#
Example
Required#
Example
Size#
Example
Right-To-Left (rtl)#
Example
Props#
| Attribute | Type | Value | Default Value | Description |
|---|---|---|---|---|
| id | string | Matches the label in connection with the checkbox (htmlFor/id) | ||
| size | string | md/lg | md | UI size of Checkbox and Label |
| color | string | danger/default/primary success/warning/invalid | primary | Color of Checkbox when checked |
| invalid | boolean | true/false | Red text for Checkbox's label | |
| disabled | boolean | true/false | Disabled the element from user interaction | |
| required | boolean | true/false | Set the Checkbox as required and update Label UI to required | |
| rtl | boolean | true/false | When true, sets element to direction of right-to-left (rtl) | |
| labelProps | LabelProps | Pass in props you find useful for the Label component |