Tabs
A set of layered sections of content—known as tab panels—that are displayed one at a time.
Component Features
- 🎨 3 Visual Variants: Supports
line,segment,pillvisual variants. - 📐 4 Positions: Supports
top,bottom,left,righttab positions. - 📱 Scrollable: Supports horizontal scroll when tabs overflow.
- ✖️ Closable: Supports closable tab panels.
- ✋ Draggable: Supports drag-to-reorder tabs.
- ⚡ Lazy Load: Supports lazy rendering of tab panel content.
- 📱 Responsive Folding: Supports responsive folding of tab overflow.
- 🎨 Theme Customization: Based on
BrConfigProviderfor global theming and TailwindCSS local overrides.
Basic Usage
Variants
Use the variant prop to control the visual style of the tabs.
- Line: Default style with a bottom border and an active indicator.
- Card: Card style with borders.
- Underline: Simple underline style.
Vertical Tabs
Use the position prop to control the position of the tabs list.
Scrollable Tabs
Set the scrollable prop on BrTabsList to enable scrolling when tabs exceed the container width.
Closable Tabs
Set the closable prop on BrTabs or BrTabsTrigger to make tabs closable.
Theming
Global Customization (BrConfigProvider)
You can override default CSS variables via the theme prop of BrConfigProvider.
API
BrTabs Props
Plus all props from Radix Vue TabsRoot.
BrTabsList Props
Plus all props from Radix Vue TabsList.
BrTabsTrigger Props
Plus all props from Radix Vue TabsTrigger.
BrTabsContent Props
All props from Radix Vue TabsContent.