Ripple Button
ProEmits a ripple from the point of press, or from the center on keyboard activation.
Installation
pnpm dlx shadcn@latest add @viewport/ripple-button
First time? Add the @viewport registry to components.json. Setup takes one minute.
Usage
The code behind the preview above comes with Truffle Pro.
Props
| Prop | Type | Default |
|---|---|---|
| rippleColor | stringRipple color. | "currentColor" |
Accessibility
- Ripples also fire for Enter and Space.
- Ripples are aria-hidden and hidden under reduced motion.
- A native button with a visible focus ring.