Skip to content

Segmented Control

A recessed, borderless well with one raised thumb that glides between segments on a softly settling spring; labels brighten as the thumb passes under them.

$149 once · every Pro piece

Customize

Equal or content widths, icons, disabled segments, arrow-key and drag selection, and a fading scroll when there are too many options to fit.

Install

npx shadcn@latest add @obsyde/segmented

Needs your licence key · Get Pro

Usage

Import it from where the CLI puts it, or copy the files below by hand.

import { Segmented } from '@/components/obsyde/ember/segmented/Segmented';

export function Example() {
  return (
    <Segmented options="Day, Week, Month, Year" value="Week" />
  );
}

Files

What you get with Pro: plain React, TypeScript and CSS, with no dependencies.

  • ember/segmented/Segmented.tsxcomponent
  • ember/segmented/segmented.cssstyles
  • ember/segmented/SegmentedDemo.tsxdemo
  • ember/actions-kit/kit.tsshared
  • ember/shared/accent.tsshared
  • ember/shared/spring.tsshared
  • ember/shared/ember.cssshared

API

PropTypeDefault
accentAccent'ember' | 'volt' | 'arc''ember'
optionsOptionsstring'Day, Week, Month, Year'
valueValuestring'Week'
sizeSize'sm' | 'md''md'
widthsWidths'equal' | 'content''equal'
fullWidthFull widthbooleanfalse
iconsIconsbooleanfalse