Glass Segmented Control

An iOS-style segmented control whose selected thumb is a lifted glass pill that springs between segments with a press squish — native radio semantics, arrow keys and an opaque reduced-transparency fallback.

Try it: Click a segment or focus it and use ← → Home End.

Installation

Install with the shadcn CLI:

npx shadcn@latest add https://www.framekitui.live/r/glass-segmented-control.json

Or, with the @framekit namespace registered: npx shadcn@latest add @framekit/glass-segmented-control. You can also copy the source into components/ui/glass-segmented-control.tsx (view on GitHub).

Usage

import { GlassSegmentedControl } from '@/components/ui/glass-segmented-control'

Props

Component props
PropTypeDefaultNotes
optionsSegmentOption[]DEFAULT_SEGMENTS{ value, label, icon?, disabled? } per segment.
value / defaultValue / onValueChangestringfirst optionControlled or uncontrolled selection.
labelstring'Time range'Accessible name of the radio group.
size'sm' | 'md''md'32 or 40 px tall (44 px on touch).
fullWidth / disabledbooleanfalseStretch to the container; disable the whole control.
classNamestring—Extra classes merged onto the root.

Dependencies

  • motion
  • lucide-react
  • Dynamic Status Island

    A black capsule that morphs its silhouette between live activities — recording with a level meter, a focus timer with pause, an upload with a progress hairline, a success tick — size and radius on…

  • File Drop Uploader

    A calm dropzone that lifts and tints on drag-over, then gives each file its own row with a spring progress hairline, a tick that pops on completion, and errors that say what went wrong with one-tap…

  • Detent Sheet

    An Apple-style bottom sheet resting at peek, half and full detents — velocity-aware drag with rubber-banding, the background recedes and dims as it rises, and a grabber that also works with tap and…

  • Rolling Number Stepper

    A quantity field whose changed digits roll in the direction of travel, accelerates on press-and-hold like a hardware stepper, and nudges sideways with a reason at its bounds. A real spinbutton you…

  • Vibrancy Context Menu

    A macOS-grade context menu on regular glass that blooms from the exact pointer position, flips near the edges, glides a highlight capsule between rows, and blinks the chosen item once before…

  • Inset Settings List

    An iOS-style grouped inset list with tinted icon tiles, hairlines inset to the label edge, switches whose knob stretches on press, and choice rows that push a detail page with a parallax slide and…

See all 14 Product UI components