Skip to main content
Tabs
@coinbase/cds-web@8.56.1
Tabs is a flexible, accessible tab navigation component for switching between content sections. It supports custom tab components, animated active indicators, and full keyboard navigation.
import { Tabs } from '@coinbase/cds-web/tabs/Tabs'
Peer dependencies
  • framer-motion: ^10.18.0
Related components

Tabs is a low-level primitive for building custom tab interfaces. It requires a TabComponent and TabsActiveIndicatorComponent to render. For a ready-to-use tab experience, see SegmentedTabs.

Basics

Initial Value

Use useTabsContext inside your TabComponent to access the active tab state. Pair with TabLabel for consistent label styling and TabsActiveIndicator for the animated indicator.

Loading...

Tabs can also start with no active selection by passing null.

Loading...

Disabled

The entire component can be disabled with the disabled prop.

Loading...

Individual tabs can also be disabled while keeping others interactive.

Loading...

Custom Components

Tab

Pass additional data through the tab definitions and access it in your TabComponent to render custom content like icons.

Loading...

Is this page useful?

Coinbase Design is an open-source, adaptable system of guidelines, components, and tools that aid the best practices of user interface design for crypto products.