Skip to content
Navigation & LayoutPro

Segment

A pill-shaped single-select toggle group, like a compact tab bar.

Usage

Installation

bash
npm install @wunderui/react

Then import what you need:

tsx
import { Segment, SegmentOption, SegmentSize } from "@wunderui/react"

Examples

Two options

Works just as well as a simple binary switcher, not just multi-way.

Size

Extra small 32 (charts and chart cards), small 28, medium 40 and large 44 px — with an optional icon before each label.

Items

Two to five options.

In context

How the component is used inside real screens — the same compositions as the Usage section of the Figma page.

Chart period switcher

Segmented control in a widget header.

Revenue

€48.2K

+12.4% vs. previous period