Radio
A set of checkable buttons—known as radio buttons—where no more than one of the buttons can be checked at a time. Based on BrConfigProvider for global theming.
Component Features
- 🎨 Theme Configuration: Based on
BrConfigProviderfor global theming with colors, radius, shadows tokens. - 📏 Multiple Sizes: Supports
xs,sm,md(default),lg,xl,2xlsize specs. - ❌ Disabled State: Supports
disabledprop for individual options or entire group. - 📐 Layout Options: Supports
orientationprop to control horizontal or vertical arrangement. - 🌗 Dark Mode: Automatically adapts to dark mode.
- ♿️ Accessibility: Built-in ARIA attributes with keyboard navigation support.
Basic Usage
The most basic usage of radio buttons, usually used with BrRadioGroup.
Disabled State
Set the disabled prop to disable the radio button.
Sizes
We provide a default set of sizes. You can control the size of the radio button via the size prop. Supports xs, sm, md (default), lg, xl, 2xl.
Horizontal Layout
Set the orientation="horizontal" prop to arrange the radio group horizontally.
Theming
Global Customization (BrConfigProvider)
You can override default CSS variables via the theme prop of BrConfigProvider to customize colors, border radius, etc.
Local Customization (TailwindCSS)
You can use TailwindCSS utility classes directly on the component to override styles.