Components / Buttons
Ripple Button
A button that sends a ripple wave out from exactly where you press it.
Installation
Requires React 18+ and Tailwind CSS.
- 1
Install dependencies
$ npm install motion - 2
Add the component
Copy the code from the Code tab above into
components/ui/ripple-button.tsx. - 3
Use it
example.tsximport { RippleButton } from "@/components/ui/ripple-button"; export default function RippleButtonDemo() { return <RippleButton>Click me anywhere</RippleButton>; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| rippleColor | string | "rgba(255,255,255,0.35)" | Color of the ripple wave. |
| ...props | ComponentProps<"button"> | — | Any native button prop. |