ComponentsButtonsSegmented ControlSegmented ControlA single choice between a few options, with a pill that slides to the pick.DependenciesmotionPreviewCodeOpen inMonthlyYearly−20%Installation#CLIManualpnpmnpmyarnbunpnpm dlx shadcn@latest add @balick/segmented-controlOr pass the full URL: https://ui.balick.me/r/segmented-control.jsonUsage#"use client" import * as React from "react" import { SegmentedControl } from "@/components/ui/segmented-control" export function BillingToggle() { const [billing, setBilling] = React.useState("yearly") return ( <SegmentedControl aria-label="Billing period" value={billing} onValueChange={setBilling} options={[ { value: "monthly", label: "Monthly" }, { value: "yearly", label: "Yearly", badge: "−20%" }, ]} /> ) }Props#PropTypeDefaultDescriptionvalueThe selected option. Required.string—The selected option. Required.onValueChangeCalled with the option the user picks. Required.(value: string) => void—Called with the option the user picks. Required.optionsThe options, in order. Required.{ value: string; label: ReactNode; badge?: ReactNode }[]—The options, in order. Required.aria-labelNames the group for assistive technology.string—Names the group for assistive technology. PreviousRipple ButtonNext Shimmer Button