Materialize waves effect is an external library that is included in Materialize to allow us to create the ink effect outlined in Material Design.
Follow the step by step process to create a Materialize waves.
.waves-effect
class to the HTML element i.e (button (<button>) or hyperlink element (<a>
)) base class.
<a class="waves-effect" href="#">Wave Effect</a>
.waves-*
class to the HTML element class.
<a class="waves-effect waves-*" href="#">Wave Effect</a>
There are following available wave effect color classes and their effects.
Class Name | Description |
---|---|
waves-effect |
Wave effect on the control |
waves-light |
White colored wave effect |
waves-red |
Red colored wave effect |
waves-green |
Green colored wave effect |
waves-yellow |
Yellow colored wave effect |
waves-orange |
Orange colored wave effect |
waves-purple |
Purple colored wave effect |
waves-teal |
Teal colored wave effect |
General Syntax
<a class="waves-effect waves-light" href="#">Wave Effect</a>
<button class="waves-effect waves-light">Wave Effect</button>
Source Code
<div class="row">
<div class="col s12">
<a class="waves-effect blue waves-light btn" href="#!">Click Here ! </a>
</div>
</div>
Source Code : Output
Follow the following steps to create a circular waves.
.wave-effect
class to the HTML element such as button (<button>) or hyperlink element (<a>) base class.
<a class="waves-effect" href="#">Wave Effect</a>
.waves-circle
class to the HTML element such as button or link element to create circular waves.
<a class="waves-effect waves-circle" href="#">Wave Effect</a>
General Syntax
<a href="#!" class="waves-effect waves-circle waves-light btn-floating secondary-content">
<i class="material-icons">add</i>
</a>
Source Code
<div class="row">
<div class="col s12">
<a href="#!" class="waves-effect waves-circle waves-light btn-floating secondary-content">
<i class="material-icons">add</i>
</a>
</div>
</div>
Source Code : Output
Materialize waves are used to create an ink effect inside the linear or non rectangular shapes. You can use any element to create a wave effect. A linear web effect can be created using the waves-effect
and waves-*
classes, where *
denotes the color name, like red, green, etc.
Circular wave effects can be created using the waves-effect
and waves-circle
classes.