Value of the initially active tab.
Tabs
1 min readStableBeginner
The Tabs component organizes content into tabbed panels. Tab selections can be synced across pages with syncKey.
Quick Start
Two tabs with a default selection.
React uses a virtual DOM and JSX syntax for building user interfaces.
Adding Options
Three tabs covering more frameworks.
React uses a virtual DOM and JSX syntax.
Advanced
Use syncKey to persist the selection across pages.
npm install next
Options
Tabs
defaultValuestringDefault: first tabsyncKeystringPersists the selected tab across pages via localStorage.
childrenReactNoderequiredOne or more TabItem components.
TabItem
valuestringrequiredUnique identifier for the tab.
labelstringrequiredDisplay text on the tab button.
childrenReactNoderequiredContent shown when the tab is active.
Related pages
Was this page helpful?