Primitives

Segmented

Pill, solid, outline, glass; three sizes; the thumb slides. Two or three options — beyond three it becomes a Select.

6 examples 1 animated · 1 Pro Code and Figma for each

Examples#

Each one on its own: copy its code into your app, or copy it to Figma and paste it on the canvas as layers.

Pill

The default: a quiet track for filters and view switches.

Solid

A raised thumb: for the main switch of a page.

Outline with icons

Icons and words for layout switches.

Sizes

sm in toolbars, md in forms, lg in heroes.

Glass

On a gradient or a photo: the monthly or yearly switch of a pricing hero.

Full width

Fills its container: for phones and narrow panels.

Animated#

Motion that earns its place: free ones to copy now, and Pro ones whose code and Figma copy come with a Wavi Pro licence. They respect the visitor's reduced-motion setting.

Pricing switch Pro

The saving pops in and every price rolls to its new number.

Save 20%

Starter

৳1,190/ month

Business

৳3,190/ month

Import#

Everything comes from the package root. The example above uses:

your-component.tsx
import { Segmented } from "@waveinno/ui";

Props#

Read from the source of this version, so they match the code exactly.

<Segmented>

src/components/ui/segmented.tsx
PropTypeDefaultDescription
valuerequiredT—
onChangerequired(v: T) => void—
optionsrequiredSegmentedOption<T>[]—
classNamestring—
ariaLabelstring—
variantkeyof typeof TRACK"pill"
sizekeyof typeof SIZES"sm"
fullWidthbooleanfalseStretch to the container, options sharing the width equally.

Install#

If the project does not have the package yet, add it, then follow the setup for Next.js or Vite once.

$ npm install @waveinno/ui