Skip to main content
TabbedChips (Alpha)
@coinbase/cds-web@8.34.1
A chip component commonly used in filter context to refine a date source
Alpha componentAlpha components are stable and safe to use. They allow us to provide new and powerful features quickly, without forcing breaking changes. Components will exit the alpha status when their deprecated counterpart is removed in the next major version.
Import
import { TabbedChips } from '@coinbase/cds-web/alpha/tabbed-chips/TabbedChips'
SourceView source codeStorybookView StorybookFigmaView Figma (internal only)
Related components
View as Markdown

Basic usage

Loading...

Compact

function ExampleCompactNoStart() {
const tabs = [
{ id: 'all', label: 'All' },
{ id: 'swap', label: 'Swap' },
{ id: 'collect', label: 'Collect' },
{ id: 'bridge', label: 'Bridge' },
];
const [activeTab, setActiveTab] = useState(tabs[0]);
return <TabbedChips activeTab={activeTab} compact onChange={setActiveTab} tabs={tabs} />;
}

Many tabs (paddles)

Paddles & overflow

Paddles appear automatically when the tab list overflows.

Loading...

With autoScrollOffset

Auto-scroll offset

The autoScrollOffset prop controls the X position offset when auto-scrolling to the active tab. This prevents the active tab from being covered by the paddle on the left side. Try clicking tabs near the edges to see the difference.

Loading...

With custom sized paddles

Paddle styling

You can adjust the size of the paddles via styles.paddle.

Loading...

Long text tabs

Loading...

Disabled tab

Loading...

With start media

Media sizing

For start media, use circular images sized 24×24 for regular chips and 16×16 for compact chips.

Loading...

Custom TabComponent

Custom Tab behavior

When providing a custom TabComponent, use useTabsContext() and call updateActiveTab(id) to update selection state. Reflect the active state (e.g., end icon state) based on activeTab?.id === id.

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.