Basic Usage
With Sublabel
With Avatar
Displays an avatar with user initials:Custom Children
Use custom JSX instead of the label prop:Error State
Right-Positioned Checkbox
Circle Shape
Custom Size
Props
Whether the checkbox is checked. This is a controlled component.
Label text displayed next to the checkbox.
Secondary text displayed below the label in smaller font.
Shows error state with red border and background colors.
Position of the checkbox relative to the label.
Shape of the checkbox:
square: Rounded square (4px border radius)circle: Circular shape
Custom height of the checkbox in pixels.
Custom width of the checkbox in pixels.
Shows an avatar with initials from the label text.
Callback fired when the checkbox is clicked.
Disables the checkbox and reduces opacity to 0.5.
Custom content to display instead of the label. Overrides the
label and sublabel props.Features
- Animated Checkmark: Lottie animation plays when checkbox is selected
- Hover States: Interactive hover effect with background color change
- Active State: Scale animation (0.9) on click
- Responsive Colors: Different background colors on mobile devices
- Error Indication: Red color scheme when error prop is true
- Avatar Support: Shows circular avatar with user initials
- Flexible Layout: Checkbox can be positioned left or right
- Custom Content: Supports both label props and custom children
Color States
Normal State
- Unselected: Light primary background with soft primary border
- Selected: Primary background with primary border
- Hover: Primary soft background with primary border
Error State
- Unselected: Error background with red soft border
- Selected: Error background with error border