ComponentsDot Morph Button
Dot Morph Button
A pill-shaped button with a dot that morphs into a checkmark on click, featuring smooth Framer Motion animation.
Code
1
Install with shadcn Beta
Terminal
npx shadcn@latest add "https://smoothui.dev/r/dot-morph-button.json"
Or install the demo
Terminal
npx shadcn@latest add "https://smoothui.dev/r/dot-morph-button-demo.json"
How to use
Demo.tsx
import DotMorphButton from "@/components/smoothui/ui/DotMorphButton"
export default function DotMorphButtonDemo() {
return (
<div className="flex min-h-[200px] flex-col items-center justify-center gap-6">
<DotMorphButton label="Dot-Morph" />
</div>
)
}
Props
Prop | Type | Description |
---|---|---|
label | string | Button label text. |
onClick? | () => void | Optional click handler. |
className? | string | Optional additional class names for the button. |