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>
);
}
















