Skip to main content
Brand and assets
Build
Monitor and contribute
/
Component library
  • All components
  • Buttons & actions
  • Forms & inputs
  • Layout & containers
    • Anchors
    • Box
    • Col
    • Container
    • ContainerNext
    • FullPageLayout
    • Grid
    • HStack
    • Header
    • Header
    • LayoutGrid
    • Navigation
    • Pagination
    • Row
    • Section
    • Spacer
    • TabList
    • TabList
    • Tabs
    • VStack
  • Overlays
  • Feedback & status
  • Data display
  • Typography
  • Accessibility
  • Contrib
  • Deprecated
  • Layout & containers
  • TabList

TabList

Switches between views, and can drive React routes. `TabListNext` is the successor for universal code.

Health
Component health
Source
View on Github
Design
View Figma
Storybook
View in Storybook
Playground
No Example
Accessibility

not-compliant

Platform
Web
Accessibility issues
The component misses an accessible representation of tabs. It misses to include the tab pannels content.
  • Overview
  • Props
  • Figma

Use React router links​

You can use the TabList to generate React router links.

In this case you don't have to take care about active state and onClick props, but only passing a NavLink component:

import { NavLink } from "react-router-dom";

function Playground() {
return (
<TabList
items={[
{
visual: "👋",
title: "Tab 1",
reactRouterElement: <Navlink to="/somewhere">
},
{
visual: "🤗",
title: "Tab 2",
reactRouterElement: <Navlink exact to="/somewhere/else">
},
]}
/>
);
}

Playground​

Loading...

TabList props

NameTypeDefault ValueDescriptionUsage count
addOnReactNode
bleedingbooleanundefinedfalseAdds a wrapper to extend the tabs border
bleedingOffsetnumberSizeTokensundefined$px40Define the width of the extend border
items*TabListItem[]
onPress((index: number) => void)undefined() => {}
variantVariantundefinedprimary
Edit this page
Previous
TabList
Next
Tabs
  • Use React router links
  • Playground