This widget allows you to create an elegant animated wave section by simply modifying a predefined data structure. Follow the steps below:
Instructions
-
Locate the Data Structure: In the JavaScript section, find the
wavePathsarray. This array contains the settings for each wave layer, such as color, opacity, and animation class. -
Customize Fill Colors: To change the wave colors, update the
fillproperty for each wave object. For example:{ fill:"#ff5733", opacity: "0.3", class: "path-0" }
-
Adjust Opacity: To make the waves more or less transparent, modify the
opacityproperty (e.g.,0.1for very transparent,1for fully opaque). -
Add or Remove Layers: You can add new wave layers by appending objects to the
wavePathsarray or remove layers by deleting an object. -
Example Data Structure:
-
Preview and Save:Preview and Save: Once changes are made, reload your webpage to preview the updated widget. Save your work after confirming it looks as desired.
const wavePaths = [
{ fill: "#ff5733", opacity: "0.2", class: "path-0" },
{ fill: "#33c1ff", opacity: "0.3", class: "path-1" },
{ fill: "#28a745", opacity: "0.4", class: "path-2" }
];