Skins UI

Chrome segmented control

A machined groove with a polished metal slider that moves to your choice.

Customize

Props
Size

Installation

npx shadcn@latest add https://skinsui.dev/r/segmented-chrome.json

Usage

usage.tsx
import { SegmentedControl } from "@/components/skins/segmented-chrome";<SegmentedControl options={[    "Day",    "Week",    "Month",    "Year",  ]} defaultValue="Week" />

Props

  • optionsNone
    array

    The choices, in order. Two to five short words work best.

  • defaultValueNone
    string

    The choice picked when it first renders. The first one if you leave it out.

  • size"md"
    "sm" | "md"

    32 or 40 pixels tall.

  • onValueChangeNone
    () => void

    Called with the new choice whenever it changes.