Checkbox
A control that allows the user to toggle between checked and not checked.
Component Features
- ☑️ Single & Group: Supports single checkbox and
BrCheckboxGroupfor multiple options. - 🔲 Indeterminate State: Supports indeterminate state for parent-child selection.
- 📏 Multiple Sizes: Supports
xs,sm,md,lg,xl,2xlsize specs. - ❌ Disabled State: Supports
disabledprop for both single and group mode. - ⚠️ Error State: Supports
errorprop to display error state. - 🏷️ Custom Label: Supports custom label content via slots.
- 🎨 Theme Customization: Based on
BrConfigProviderfor global theming and TailwindCSS local overrides.
Basic Usage
Checkbox Group
Use BrCheckboxGroup to group multiple checkboxes.
Indeterminate State
The indeterminate state is used when a checkbox's state is neither checked nor unchecked.
Sizes
We provide a default set of sizes that you can control via the size prop.
Disabled State
Theming
Global Customization (BrConfigProvider)
You can override default CSS variables via the theme prop of BrConfigProvider.
Local Customization (TailwindCSS)
You can directly override styles using TailwindCSS utility classes on the wrapper or via deep selectors if needed, but wrapper class is usually sufficient for layout.