Skip to content

Checkbox

A checkbox is an essential user interface component that enables users to make binary choices, such as selecting or deselecting options. It is commonly used for tasks like toggling settings, selecting multiple items, or confirming agreements within an application.

Example

Below is an example showcasing two checkbox components. The checkbox on the left is in its initial, unchecked state, while the one on the right displays a checked checkbox.

Props

PropertyTypeDefaultDescription
visiblebooleantrueControls the checkbox's visibility. When true, the checkbox is visible; when false, it is hidden.
sizeenum (small, medium, large, extra-large)mediumSets the checkbox's size, adjusting padding, font size, and layout compactness accordingly.
positionnumber[]0 0 0Specifies the checkbox's position.
primarystring (blue, #fff)#00BA92Defines the primary color of the checkbox (affecting text, background, icon background).
valuebooleanfalseSpecifies whether the checkbox is checked.
variantstring (light, dark)""Sets the button's color scheme mode, either "light" or "dark," for visual theme consistency.