Skip to main content
SegmentedControl (Deprecated)
@coinbase/cds-web@8.52.2
A horizontal control composed of mutually exclusive segments, used to switch between related options.
SegmentedControl is deprecated and will be removed in a future version. Please use Tabs or SegmentedTabs instead.
import { SegmentedControl } from '@coinbase/cds-web/controls/SegmentedControl'

SegmentedControl uses native radio inputs with labels to provide an accessible, compact switch between options. It supports both text labels and icon options.

Basics

Pass an array of options with value and label properties. Use value and onChange for controlled usage, or omit them for uncontrolled behavior. The component manages its own state when uncontrolled.

Loading...

Uncontrolled

When you omit value and onChange, SegmentedControl manages selection internally. Use onChange only when you need to react to changes.

Loading...

Icons

For icon-only segments, set type="icon" and provide iconSize and options with label as an icon name. Use accessibilityLabel on each option for screen readers.

Loading...

You can also set active to true to apply an active icon style.

Loading...

Disabled

Disable the entire control with the disabled prop.

Loading...

Accessibility

Provide accessibilityLabel on each option when using icons so screen readers can announce the segment. For text options, the label text is used automatically.

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.