Components
Starting preview...
Recreation of iOS's switch control built with React Aria Components and Tailwind.
npx shadcn@latest add https://21st.dev/r/builduilabs/ios-animated-switchimport { 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 };