1. Domino UI
  2. Components
  3. Waves
Top Basic Docs

Waves

Provides a ripple (or "wave") effect on a given DOM element.

The ripple effect is typically used in material design to indicate user interaction.

Examples

Basic waves Add waves effects to an element.

API Docs: Waves

Constructors

public void Waves(Element target)
Constructs a wave effect wrapper for a given target.

target

The DOM element on which the ripple effect will be applied.

public void Waves(DominoElement<? extends Element> target)
Constructs a wave effect wrapper for a given DominoElement .

This constructor wraps the target in a sentinel div which is then used to handle the ripple effect. The sentinel div is appended as a child to the target element.

target

The DominoElement on which the ripple effect will be applied.

Static methods

public static Waves create(Element target)
Factory method for creating a wave effect for a given target.

target

The DOM element target.



Returns:

A new Waves instance.

public static Waves create(DominoElement<? extends Element> target)
Factory method to create a Waves instance for a given DominoElement .

This method provides a more expressive way to construct a `Waves` object compared to using the direct constructor.

target

The DominoElement on which the ripple effect will be applied.



Returns:

A new Waves instance associated with the provided target.

Public methods

public void removeWaves()
Removes the wave (ripple) effect from the target element.

This method detaches the wave event listener from the target and subsequently removes the sentinel div (used for the ripple effect) from the DOM.

We are a group of passionate people who love what we do

Donate & Support Us