Framework7 - Touch Ripple



Description

Touch Ripple is an effect that is supported only in Framework7 material theme. By default, it is enabled in material theme and you can disable it by using the materialRipple:false parameter.

Ripple Elements

You can enable the ripple elements to match some CSS selectors such as −

  • ripple
  • a.link
  • a.item-link
  • .button
  • .tab-link
  • .label-radio
  • .label-checkbox etc.

These are specified in the materialRippleElements parameter. You need to enable the touch ripple, add the element's selector to materialRippleElements parameter to make use of ripple effect, or just use the ripple class.

Ripple Wave Color

The color of the ripple can be changed on the element by adding the ripple-[color] class to the element.

For instance −

<a href = "#" class = "button ripple-orange">Ripple Button</a>

or you can define the ripple wave color by using the CSS as shown below −

.button .ripple-wave {
   background-color: #FFFF00;
}

Disable Ripple Elements

You can disable the ripple for some specified elements by adding the no-ripple class to those elements. For instance −

<a href = "#" class = "button no-ripple">Ripple Button</a>
Advertisements