Dimple Switch
Dimple Switch: Tactile switch with a dimpled knob, metallic track, and amber on-state fill. Hidden checkbox drives the slide — controlled or uncontrolled. Free MIT React & Next.js source with Motion and Tailwind CSS, live preview, CLI install and docs.
Install Dimple Switch
npx motion-ui-skill add dimple-switchComponents install as source into your project. The interactive page also includes preview, code, documentation and install tabs.
Dependencies
clsxreacttailwind-merge
Source files
Dimple Switch
Tactile switch with a dimpled knob, metallic track, and amber on-state fill. Hidden checkbox drives the slide — controlled or uncontrolled.
Install
npx motion-ui-skill add dimple-switch
Dependencies
clsxreacttailwind-merge
Usage
"use client";
import { DimpleSwitch } from "@/components/buttons/dimple-switch";
export function DimpleSwitchDemo() {
return (
<div className="flex items-center justify-center p-6">
<DimpleSwitch />
</div>
);
}
API Reference
DimpleSwitch
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
className |
string |
— | No | Additional CSS classes |