Tabs
Organize content into switchable panels with tab navigation.
When to Use
- To group related content into separate views
- For settings pages or dashboards with distinct sections
- When users need to switch between different content areas
Import
Examples
Basic
Simple line-style tabs.
Card Type
Tabs styled as cards.
Centered
Center-align the tab bar.
With Icons
Add icons to tab labels.
Sizes
API
TabsProps
activeKey—string— Currently active tab key (controlled)defaultActiveKey—string— Initially active tab keyitems—TabItem[]— Tab configuration arraytype—"line" | "card" | "editable-card"— Tab style (default:"line")size—"small" | "middle" | "large"— Tab size (default:"middle")tabPosition—"top" | "bottom" | "left" | "right"— Tab bar position (default:"top")centered—boolean— Center-align tab bar (default:false)tabBarExtraContent—ReactNode | { left?: ReactNode; right?: ReactNode }— Extra content in tab bardestroyInactiveTabPane—boolean— Unmount hidden tab panes (default:false)onChange—(activeKey: string) => void— Tab change callbackonEdit—(targetKey: string, action: "add" | "remove") => void— Edit callback for editable-card
TabItem
key—string— Unique tab identifierlabel—ReactNode— Tab titlechildren—ReactNode— Tab contenticon—ReactNode— Tab icondisabled—boolean— Disable the tabclosable—boolean— Show close button (editable-card only)forceRender—boolean— Force render even when inactive