Checkbox component to render input type checkbox along with some other properties.
The Checkbox component can be imported using
import { Checkbox } from '@tail-kit/tail-kit'
| Name | Description | Default Value |
|---|---|---|
| checked | HTML checked attribute for input element to set input status true or false boolean | "indeterminate" | undefined | -- |
| disabled | Use disbaled property to disable user input in checkbox boolean | undefined | -- |
| onChange | The callback function that is triggered when the state changes ((event: ChangeEvent<HTMLInputElement>) => void) | undefined | -- |
| className | Additional class applied to checkbox string | undefined | -- |
| style | Styles property to apply on the entire Checkbox component CSSProperties | undefined | -- |
| defaultChecked | Default checked property to intialize component boolean | undefined | -- |
| label | To show label on the right side of checkbox ReactNode | -- |
| error | Error property to render checkbox border and label text in red whenever error occurs boolean | undefined | -- |
| Name | Description | Default Value |
|---|---|---|
| options | Specifies options of checkbox to render (string | OptionType)[] | -- |
| value | Default selected values string[] | undefined | -- |
| disabled | If disable all checkboxes boolean | undefined | -- |
| onChange | The callback function that is triggered when the state changes ((checkedValues: string[]) => void) | undefined | -- |
| className | Additional class to apply on each individual checkbox string | undefined | -- |
| style | Apply styles on each individual checkbox CSSProperties | undefined | -- |