Back to components
Soft Switch React component

What is this?

A small on/off switch with a label. The thumb slides across while the gray track crossfades to near-black. Space and Enter toggle it. Swap the label and add a short description, then drop it into a settings list or notification preferences.

Component

Soft Switch

A small on/off switch with a label. The thumb slides across while the gray track crossfades to near-black. Space and Enter toggle it. Swap the label and add a short description, then drop it into a settings list or notification preferences.

Checking access…
Live Preview

Verified Technical Spec

Animation
CSS / Tailwind
Reduced motion
Verified
Keyboard focus
Verified
Compatibility
Tailwind CSS v3.4 + v4 · React 19 / Next.js 15 App Router + Vite / Remix compatible

Included

  • Copy source into Cursor or Claude for agent install
  • Finished React · TypeScript · Tailwind CSS UI

Dependencies

  • React 19.0.0
  • Typescript 5.7.2
  • Tailwindcss 3.4.16

Tech Stack

  • React
  • TypeScript
  • Tailwind CSS

Version 1.0.0