Toggle
Toggle: Two-state toggle button with pressed state animation. Free MIT React & Next.js source with Motion and Tailwind CSS, live preview, CLI install and docs.
Install Toggle
npx motion-ui-skill add toggleComponents install as source into your project. The interactive page also includes preview, code, documentation and install tabs.
Dependencies
@radix-ui/react-toggleclass-variance-authorityclsxreacttailwind-merge
Source files
Toggle
Component from Motion UI: toggle
Install
npx motion-ui-skill add toggle
Dependencies
@radix-ui/react-toggleclass-variance-authorityclsxreacttailwind-merge
Usage
"use client";
import Toggle from "@/components/craft/toggle";
export function Example() {
return (
<div className="p-6">
<Toggle />
</div>
);
}