Skip to main content
TabsScrollArea
@coinbase/cds-web@8.64.0
Horizontal scroll container for tab rows on web, with chevron controls, edge gradients, and automatic scroll-into-view for the active tab.
import { TabsScrollArea } from '@coinbase/cds-web/tabs'
Peer dependencies
  • framer-motion: ^10.18.0
Related components

TabsScrollArea is the recommended wrapper when a Tabs row may overflow horizontally. Pass a function child that receives onActiveTabElementChange and spread that onto Tabs (along with shared accessibility props) so the scroll region can measure tab positions and scroll the active tab into view.

Basics

Pair TabsScrollArea with Tabs, DefaultTab, and DefaultTabsActiveIndicator. Set width / maxWidth on TabsScrollArea so the row overflows on smaller viewports; chevron controls and edge gradients appear when there is offscreen content.

Loading...

Overflow indicator

On web, the default TabsScrollAreaOverflowIndicator combines a fade gradient with chevron controls.

Custom OverflowIndicatorComponent

Provide your own component that matches TabsScrollAreaOverflowIndicatorProps: direction ('left' | 'right'), show, onClick, plus optional styles / classNames slots. TabsScrollArea passes accessibilityLabel for the side control—forward it to a button or IconButton when you build a custom control.

Loading...

Styling

Use styles / classNames to target the root, scroll container, and overflow controls (overflowIndicator, overflowIndicatorButton, overflowIndicatorButtonContainer, overflowIndicatorGradient, and related slots on web).

Accessibility

Set accessibilityLabel on TabsScrollArea for the scrollable tab list region. On web, customize previousArrowAccessibilityLabel and nextArrowAccessibilityLabel for the default overflow controls. Ensure Tabs also has a meaningful accessibilityLabel for the tablist, as in the Tabs examples.

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.