htmladvancedmit

Wave Divider

An SVG wave that gently undulates.

3.7k2.0k1.1k509

About this module

An SVG wave divider whose path animates along the X axis, creating a slow ocean-like undulation between sections.

#svg#wave#divider

Source code

Installation

  1. 1

    Create the files

    Create `index.html` and `style.css` in the same folder.

  2. 2

    Paste the code

    Copy each file's source into its matching file.

  3. 3

    Open in the browser

    Open `index.html` in any modern browser.

Usage

  1. 1

    Copy the HTML

    Paste the markup where you need it.

    <link rel="stylesheet" href="style.css" />
    <div class="mh-wave" aria-hidden="true">
      <svg viewBox="0 0 1200 120" preserveAspectRatio="none">
        <path class="mh-wave-path" d="M0,64 C150,110 350,10 600,64 C850,118 1050,20 1200,64 L1200,120 L0,120 Z"></path>
      </svg>
    </div>
Overview
Categoryanimations
Frameworkhtml
Difficultyadvanced
Licensemit
Versionv1.0.0
Features
  • `prefers-reduced-motion` respected
  • GPU-friendly transforms
  • No dependencies
Traits
  • ResponsiveYes
  • Dark modeYes
  • AccessibleYes
  • Production readyYes
Browser support
  • Chrome 90+
  • Firefox 90+
  • Safari 15+
  • Edge 90+

Related modules

Command Palette

Search modules and jump anywhere