v-ripple

Directive

Applies a Material-style ripple animation emanating from the click position. Supports centered ripples, circular clipping, custom CSS classes and propagation stop.

API

Value / Arguments

Shape of the binding value and each property in the options object.

value
boolean | { class?: string; center?: boolean; circle?: boolean }
Pass false to disable. Pass an object to set a custom class on the ripple element or to override center/circle via the value (equivalent to using modifiers).

API

Modifiers

Dot-suffix modifiers that alter the directive behaviour.

.center
The ripple always starts from the geometric center of the element instead of the actual click position. Typically used for icon buttons.
.circle
Clips the ripple container to a perfect circle. Combine with .center for round icon buttons.
.stop
Calls stopPropagation() on the pointer event after spawning the ripple, preventing parent click handlers from firing.

Usage

Examples

Ready-to-paste code snippets for your templates.

Basic ripple

vue

Centered circle ripple on an icon button

vue