Go Main page
Go Main page

Web components

cover

components

Checkbox

v.1.0.0 | Saturn

Import

1
import { Checkbox } from '@kubit-ui-web/react-components';

Props

Let's delve into the versatility of the checkbox component by examining all its avalaible props.

PropertyVariantDefaultDescription
variant
Required
String-Variant of the component
checkedBooleanfalseDefault checked value
disabledBooleanfalseWhen true, it is shown as disabled
errorBooleanfalseWhen true, it indicates the component has errors
requiredBooleanfalseWhen true, it is required for the user to check mark as checked
valueString-Checkbox value
nameString-Checkbox name
labelCheckboxLabelType-Checkbox label
errorMessageCheckboxHelperAndErrorTextType-When isError, error text to shown
checkedIconIElementOrIcon-When checked, checked icon
errorIconIElementOrIcon-When error, error icon
errorAriaLiveTypeAriaLiveOptionTypeassertivearia-live for the error section
helperContentCheckboxHelpContentType-JSX Element or string that can be added as help content
helperTextCheckboxHelperAndErrorTextType-Checkbox helper text if content isn't a JSX.Element
extraAriaDescribedByString-Allow to extend the input "aria-describedby" prop
screenReaderTextString-String used for screen reader text. Use it when the context may change when checking
tabIndexNumber-Tab index
aria-labelString-Input aria-label
aria-labelledbyString-Input aria-labelledby
aria-hiddenString-It hides the element from screen readers
dataTestIdString-Test id of the input. Internal components will concatenate from this test id
ctvCheckboxPropsStateStylesType-Modify styles for the default version of the component