Select
Displays a list of options for the user to pick from—triggered by a button. Replicates the core capabilities of the shadcn-vue Select component, supporting single selection, multiple selection, search, grouping, and other functions. Based on BrConfigProvider for global theme configuration.
Component Features
- ✅ Single & Multiple Selection: Supports both single and multiple selection modes.
- 🔍 Search Support: Supports local and remote search filtering.
- 📦 Grouping Support: Supports option grouping via
BrSelectGroup. - ❌ Clearable: Supports
clearableprop to clear selection. - 📏 Multiple Sizes: Supports
sm,md,lgsize specs. - ⚠️ Error State: Supports
errorprop to display error state. - 🎨 Theme Customization: Based on
BrConfigProviderfor global theming and TailwindCSS local overrides.
Basic
The most basic single selection mode, supports custom placeholder.
Grouping
Display options in groups using the group field.
Remote Search
Enable the filterable prop and listen to the search event to implement remote search. Supports loading state.
Multiple Selection & Clearable
Enable the multiple prop to support multiple selection, and clearable for one-click clearing.
Size
Supports default, sm, lg sizes.
Status
Supports error state.
Theming
The BrSelect component fully follows the theme specifications of BrConfigProvider.
Global Configuration & Local Override
- Global Configuration: Configure global colors via the
themeprop ofBrConfigProvider, and the Select component will automatically adapt. - Local Override: You can use Tailwind CSS class names to directly override styles.