Ripple Button
betaA Button that sends a ripple out from wherever it is pressed — concurrent ripples stack, and Enter or Space ripple from the centre.
- Forms
- 1 file
- 1 npm package
- Accessibility notes
Loading the example…
pnpm dlx @dowel-ui/cli add ripple-buttonnpm packages installed: class-variance-authority.
import { RippleButton } from "@/components/ui/ripple-button";Default
Variants
Tones
Large Surface
<RippleButton>
| Prop | Type | Default |
|---|---|---|
rippleTone | "auto" | "primary" | "primary-foreground" | "foreground" | "background" | "success" | "destructive" | "auto" |
A native button with every Button behaviour, including loading and disabled. Ripples are aria-hidden, pointer-transparent spans that remove themselves when they finish, so they never reach the accessibility tree or block a click. Keyboard presses (Enter, Space) ripple from the centre, so the feedback does not depend on a pointer. Under reduced motion the ripple is collapsed to an instant and disappears.
7/7
checks passed
- Tested — passes
- axe assertion — passes
- Keyboard tested — does not apply
- Storybook examples — passes
- Accessibility documented — passes
- Semantic tokens only — passes
- Motion from tokens — does not apply
- className merged — passes
- Visible focus — does not apply
- No fixed widths — passes