py_ets

Toggle Button

Buttons 1

About

A pressable two-state button that can be toggled on or off, styled with plain CSS and built on React Aria for full accessibility.

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

Code

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

Usage.tsx

import ToggleButton from "@/components/ui/css-togglebutton";

export default function ToggleButtonDemo() {
  return (
    <div className="flex items-center justify-center w-full h-screen bg-[var(--background-color,#f8f8f8)]">
      <ToggleButton>Pin</ToggleButton>
    </div>
  );
}

Dependencies

More by py_ets

View all
  • Alert Dialog

    Alert Dialog

    9
  • React Aria CheckboxGroup

    React Aria CheckboxGroup

    8
  • Command Palette

    Command Palette

    6
  • React Aria DatePicker

    React Aria DatePicker

    5
  • Progress Bar

    Progress Bar

    5
  • React Aria Tree

    React Aria Tree

    4
  • React Aria ColorArea

    React Aria ColorArea

    4
  • React Aria Switch

    React Aria Switch

    3

More in Buttons

View all
  • Button

    Button

    14
  • Button

    Button

    34
  • Texture Button

    Texture Button

    92
  • Button Save

    Button Save

    46
  • Button

    Button

    64
  • Button Group

    Button Group

    3
  • App Store Button

    App Store Button

    454
  • Notification Button

    Notification Button

    103