Théo Balick

Segmented Control

Pricing 57

About

A radio-group style switch between a few options with an animated pill that slides to the selected choice, used for things like billing period toggles.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Segmented Control to your project and fits it to your theme.

Code

How Segmented Control is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import * as React from "react";

import SegmentedControl from "@/components/ui/segmented-control";

const options = [
  { value: "monthly" as const, label: "Monthly" },
  { value: "yearly" as const, label: "Yearly", badge: "−20%" },
];

export default function SegmentedControlDemo() {
  const [billing, setBilling] = React.useState<"monthly" | "yearly">("yearly");

  return (
    <SegmentedControl
      aria-label="Billing period"
      value={billing}
      onValueChange={setBilling}
      options={options}
    />
  );
}

Dependencies

More by Théo Balick

View all
  • Footer With Newsletter

    Footer With Newsletter

    56
  • Interactive Grid

    Interactive Grid

    48
  • Services List

    Services List

    28
  • Expandable Text

    Expandable Text

    14
  • Wave Lines

    Wave Lines

    12
  • Underline Link

    Underline Link

    11
  • Mask Reveal

    Mask Reveal

    6
  • Newsletter Signup Card

    Newsletter Signup Card

    6

More in Pricing

View all
  • Pricing Section

    Pricing Section

    609
  • Pricing Section

    Pricing Section

    181
  • Pricing Card

    Pricing Card

    541
  • Single Pricing Card

    Single Pricing Card

    798
  • RuixenPricing05

    RuixenPricing05

    103
  • Pricing Card With Features

    Pricing Card With Features

    176
  • Pricing Cards

    Pricing Cards

    17
  • Boxly Pricing-1

    Boxly Pricing-1

    91