Skip to content

Checkbox Component

A checkbox component with support for checked and indeterminate states.

Properties

NameTypeDefaultDescription
checkedbooleanfalseIndicates whether the checkbox is checked.
indeterminatebooleanfalseIndicates whether the checkbox is in an indeterminate state.
disabledbooleanfalseIndicates whether the checkbox is disabled.
valuestring'on'The value of the checkbox when it is checked.

CSS Parts

NameDescription
checkboxThe main container for the checkbox.

Check this link to learn how to use CSS parts for Checkbox Component.

CSS Properties

TokenDefaultDescription
--tap-checkbox-border-radius--tap-sys-radius-1The border radius of the checkbox.
--tap-checkbox-height--tap-sys-spacing-7The height of the checkbox.
--tap-checkbox-width--tap-sys-spacing-7The width of the checkbox.
--tap-checkbox-input-height--tap-sys-spacing-7The height of the checkbox input.
--tap-checkbox-input-width--tap-sys-spacing-7The width of the checkbox input.
--tap-checkbox-background-color--tap-sys-color-surface-primaryThe background color of the checkbox.
--tap-checkbox-border--tap-sys-color-border-inverse-primaryThe border color of the checkbox.
--tap-checkbox-checked-background-color--tap-sys-color-surface-inverse-primaryThe background color of the checked or indeterminate checkbox.
--tap-checkbox-checked-color--tap-sys-color-content-on-inverseThe color of the content inside the checked or indeterminate checkbox.
--tap-checkbox-checked-color--tap-sys-color-surface-disabledThe background color of the disabled checkbox.
--tap-checkbox-disabled-border-color--tap-sys-color-surface-disabledThe border color of the disabled checkbox.
--tap-checkbox-disabled-color--tap-sys-color-content-disabledThe color of the content inside the disabled checkbox.