About
Recreation of iOS's switch control built with React Aria Components and Tailwind.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds iOS Animated Switch to your project and fits it to your theme.
Code
How iOS Animated Switch is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import { Switch } from "@/components/ui/ios-animated-switch"
import { useState } from "react"
function SwitchDemo() {
let [airplaneMode, setAirplaneMode] = useState(false);
return (
<div className="text-foreground">
<Switch isSelected={airplaneMode} onChange={setAirplaneMode}>
Airplane Mode
</Switch>
</div>
);
}
export default { SwitchDemo };












