Velora UI

Ripple Button

Expands a ripple from the exact point you pressed.

  • 1.2 KB gzipped
  • Zero dependencies
  • Reduced-motion safe
  • Base UI & Radix compatible
Open in v0

Preview

Installation

pnpm dlx shadcn@latest add https://velora.colorlib.com/r/ripple-button.json

Adds components/velora/ripple-button.tsx and merges the keyframes and tokens into your CSS.

Props

PropTypeDefault
duration

Milliseconds for a ripple to finish expanding

number600
rippleColor

Any CSS colour; defaults to a translucent version of the text colour

string"currentColor"
children*React.ReactNode—

Also accepts every <button> attribute, forwarded to the root element.

Accessibility

Reduced motion
No ripple is created on click; the button keeps its hover background change only.
Keyboard
A native <button>: Enter or Space activate it, with a visible focus-visible outline. Keyboard activation ripples from the centre.
Screen readers
Announced as a button named by its text; the ripple layer is aria-hidden.