Tabs Container

PreviousNext

A flexible tabs system with drag-and-drop reordering, conditional visibility, and visual separators

Tabs with drag-and-drop reordering, conditional visibility, icon and badge support, and visual separators. Use Tabs when you need the tab bar and content in separate locations.

Basic Usage

Overview

This is the overview tab content. Use TabsContainer to organize your interface into logical sections.

With Icons and Badges

Add visual context with icons and display notification counts or status indicators with badges.

Profile Settings

Manage your profile information.

Line Variant

Use the line variant for a minimal, underline-style tab design.

Code editor content

Conditional Visibility

Dashboard content available to all users

Drag-and-Drop Reordering

First tab content - Try dragging me!

Container Styling

Home

Welcome to your dashboard with card background.

Vertical Orientation

General Settings

Configure general application settings.

Props

PropTypeDefaultDescription
tabsTabItem[]RequiredArray of tab items with id, label, content, and optional metadata
defaultValuestring | numberFirst tab IDInitially active tab (uncontrolled mode)
valuestring | number-Active tab (controlled mode)
onValueChange(value: string | number) => void-Callback when active tab changes
onTabsReorder(tabs: TabItem[]) => void-Callback when tabs are reordered via drag-and-drop
variant"default" | "line""default"Tab trigger style variant
orientation"horizontal" | "vertical""horizontal"Tab list orientation
draggablebooleanfalseEnable drag-and-drop reordering
showSeparatorsbooleanfalseShow visual separators between tab triggers
separatorClassNamestring-Custom className for separators
containerVariant"default" | "narrow" | "fullMobile" | "full""default"Container width constraint
padding"none" | "sm" | "md" | "lg" | "xl""md"Vertical padding
background"none" | "card" | "accent" | "dark""none"Background style
as"div" | "section" | "article""div"HTML element to render
classNamestring-Additional CSS classes

TabItem Interface

PropertyTypeDescription
idstring | numberUnique identifier for the tab
labelstringDisplay text for tab trigger
contentReact.ReactNodeTab content to display
iconReact.ReactNodeOptional icon (displayed before label)
badgestring | numberOptional badge count or text
disabledbooleanDisable tab interaction and drag
visibleboolean | ((tab: TabItem, allTabs: TabItem[]) => boolean)Visibility condition (boolean or callback)
ariaLabelstringCustom ARIA label for accessibility