py_ets

Tailwind Switch

Forms

About

An accessible toggle switch built on React Aria Components and styled with Tailwind CSS, for on/off settings like enabling Wi-Fi or notifications.

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

Code

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

Usage.tsx

"use client";
import Switch from "@/components/ui/tailwind-switch";

export default function SwitchDemo() {
  return (
    <div className="flex items-center justify-center w-full h-full p-10">
      <Switch defaultSelected>
        <span className="text-neutral-800 dark:text-neutral-200 text-sm">
          Wi-Fi
        </span>
      </Switch>
    </div>
  );
}

Dependencies

More by py_ets

View all
  • Alert Dialog

    Alert Dialog

    10
  • React Aria CheckboxGroup

    React Aria CheckboxGroup

    9
  • Command Palette

    Command Palette

    7
  • React Aria DatePicker

    React Aria DatePicker

    5
  • Progress Bar

    Progress Bar

    5
  • React Aria Tree

    React Aria Tree

    4
  • React Aria Switch

    React Aria Switch

    4
  • React Aria ColorArea

    React Aria ColorArea

    4

More in Forms

View all
  • Premium Auth

    Premium Auth

    518
  • Contact Card

    Contact Card

    1K
  • Book A Demo 1

    Book A Demo 1

    72
  • Login 1

    Login 1

    52
  • Authentication Card

    Authentication Card

    48
  • Form

    Form

    16
  • Login Card

    Login Card

    6
  • Modern & Stunning sign in

    Modern & Stunning sign in

    1.6K