ComponentsCheckbox

Checkbox

A customizable checkbox component with label positioning options




The Checkbox component provides a customizable checkbox input with various styling options and label positioning.

Tip!

Use the circle and color props to customize the appearance of the checkbox.



Props

PropTypeDefaultDescription
classNamestring-Additional classes to apply to the checkbox
idstring-Unique identifier for the checkbox
namestring-Name attribute for the checkbox
labelstring-Label text for the checkbox
helperTextstring-Helper text to display below the checkbox
checkedbooleanfalseWhether the checkbox is checked
onChangefunction-Function to handle checkbox state changes
labelPosition'left' | 'right''right'Position of the label relative to the checkbox
colorstring'primary'Color scheme of the checkbox
disabledbooleanfalseWhether the checkbox is disabled
circlebooleanfalseWhether to make the checkbox circular

Tip!

Use the color prop to change the color of the checkbox (primary, purple, red, etc).

Info

Use the labelPosition prop to control the layout of your checkbox and label.




Usage Examples

Basic Checkbox

Checkbox with Left Label

Circular Checkbox with Custom Color

Checkbox with Helper Text

Keep me logged in

Disabled Checkbox


Tip!

You can customize the appearance of the Checkbox component by passing additional classes or props.