Dithered wave

The designs.here hero background: solid colour that breaks into a dot grid and dissolves into the page, with a slow tide.

Your headline here.

Put a nav, a headline and your buttons on top. The wave sits behind them.

Options

Screen
Colour

Code

import "./dither-wave.css";

const WAVE = "M-200 -60H1480V250C1380 215 1150 200 1040 250C960 290 940 330 860 350C700 395 560 400 420 360C280 320 120 300 -200 340Z";
const FOAM = "M-200 -60H1480V282C1380 247 1150 232 1040 282C960 322 940 362 860 382C700 427 560 432 420 392C280 352 120 332 -200 372Z";
const SOLID = "M-200 -60H1480V140C1380 105 1150 90 1040 140C960 180 940 220 860 240C700 285 560 290 420 250C280 210 120 190 -200 230Z";

export function DitherWave({ children }) {
  return (
    <section className="dh-wave">
      <svg className="dh-wave-art" viewBox="0 0 1280 620" preserveAspectRatio="xMidYMin slice" fill="none" aria-hidden="true">
        <defs>
          <linearGradient id="dhw-sea" x1="0" y1="0" x2="0" y2="600" gradientUnits="userSpaceOnUse">
            <stop className="dh-wave-deep" offset="0" />
            <stop className="dh-wave-mid" offset=".55" />
            <stop className="dh-wave-pale" offset="1" />
          </linearGradient>
          <pattern id="dhw-dots" width="5" height="5" patternUnits="userSpaceOnUse">
            <rect width="3.6" height="3.6" fill="#fff" />
          </pattern>
          <filter id="dhw-dither" x="-10%" y="-20%" width="120%" height="160%" colorInterpolationFilters="sRGB">
            <feGaussianBlur in="SourceAlpha" stdDeviation="30" result="blur" />
            <feTurbulence type="fractalNoise" baseFrequency="0.21" numOctaves="1" seed="11" result="noise" />
            <feColorMatrix in="noise" type="matrix" values="0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  1.7 0 0 0 -0.35" result="grain" />
            <feComposite in="blur" in2="grain" operator="arithmetic" k1="0" k2="1" k3="1" k4="-1" result="sum" />
            <feComponentTransfer in="sum">
              <feFuncA type="linear" slope="60" intercept="0" />
            </feComponentTransfer>
          </filter>
          <filter id="dhw-soft" x="-10%" y="-20%" width="120%" height="160%">
            <feGaussianBlur stdDeviation="22" />
          </filter>
          <mask id="dhw-grid" maskUnits="userSpaceOnUse" x="0" y="0" width="1280" height="520">
            <rect width="1280" height="520" fill="url(#dhw-dots)" />
          </mask>
          <mask id="dhw-sea-mask" maskUnits="userSpaceOnUse" x="0" y="0" width="1280" height="520" style={{ maskType: "alpha" }}>
            <g mask="url(#dhw-grid)">
              <path filter="url(#dhw-dither)" fill="#fff" d={WAVE} />
            </g>
          </mask>
          <mask id="dhw-foam-mask" maskUnits="userSpaceOnUse" x="0" y="0" width="1280" height="520" style={{ maskType: "alpha" }}>
            <g mask="url(#dhw-grid)">
              <path filter="url(#dhw-dither)" fill="#fff" d={FOAM} />
            </g>
          </mask>
        </defs>
        <rect className="dh-wave-top" width="1280" height="200" />
        <g transform="translate(0 100)">
          <rect className="dh-wave-foam dh-wave-tide dh-wave-tide--slow" width="1280" height="520" mask="url(#dhw-foam-mask)" />
          <rect className="dh-wave-tide" width="1280" height="520" fill="url(#dhw-sea)" mask="url(#dhw-sea-mask)" />
          <path className="dh-wave-tide" filter="url(#dhw-soft)" fill="url(#dhw-sea)" d={SOLID} />
        </g>
      </svg>
      <div className="dh-wave-content">{children}</div>
    </section>
  );
}

Your headline here.

Put a nav, a headline and your buttons on top. The wave sits behind them.