SShinUI

iOS Toggle

The iOS switch at its real dimensions — 51×31 with a 27px thumb — using Apple's system green and the spring-like easing curve from the platform.

switchtoggleiosform

Usage

Drop the file into your project and import it. There is no package to install.

usage.tsx
import { IosToggle } from "@/registry/components/ios-toggle";

export function Example() {
  return <IosToggle />;
}

Install prerequisites

Every component here relies only on Tailwind and the cn helper from shadcn/ui.

terminal
npm i clsx tailwind-merge

More in Mobile