properui

Toggle

Component

About

A labeled on/off switch for instantly applying a single setting, with optional hint text, sizes, and a slim track variant.

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

Code

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

Usage.tsx

"use client";

import Toggle from "@/components/ui/toggle";

export default function ToggleWithLabelAndHintDemo() {
  return (
    <div className="flex min-h-screen w-full items-center justify-center bg-white p-8">
      <Toggle
        size="sm"
        label="Remember me"
        hint="Save my login details for next time."
      />
    </div>
  );
}

Dependencies

More by properui

View all
  • Command Menu

    Command Menu

    13
  • Loading Indicator

    Loading Indicator

    7
  • Breadcrumbs

    Breadcrumbs

  • Tags

    Tags

  • Progress Indicators

    Progress Indicators

  • Radio Buttons

    Radio Buttons

  • Button

    Button

  • Badge

    Badge