# Memphis confetti

> Eighties squiggles, zigzags, triangles and dot grids float around and bounce out of the way when the pointer gets close.

- Category: [Backgrounds](https://library.aimran.es/components/patterns)
- Built with: HTML + CSS
- Live editor: https://library.aimran.es/blocks/pt-uvq16-memphis
- Library: AIMRAN Library (https://library.aimran.es), free, no sign-up, by Aimran Oukham

## Where to use it

A nod to the Memphis Group and the bold graphics of the eighties. Thirty small SVG shapes, from squiggles and zigzags to striped squares, half circles and dot grids, are spread over a fine dot pattern with a little randomness. Each one floats and rocks on its own rhythm, and outlined pieces use the text color so they work in light and dark themes.

Pick three loud colors for the shapes. Density scales them up or down. A short script pushes nearby shapes away from the pointer with an elastic overshoot, so the confetti reacts as you move. Fun for events, music, kids' products and creative agencies.

## Code

### HTML

```html
<div class="pt-uvq16-memphis"><svg class="b" viewBox="0 0 48 20" aria-hidden="true" style="--x:11.9%;--y:11.0%;--w:3.45;--r:273deg;--t:5.0;--dl:-5.0;--dx:3px;--dy:2px"><path d="M3 10q5.25-9 10.5 0t10.5 0t10.5 0t10.5 0" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="round"/></svg><svg class="f" viewBox="0 0 28 28" aria-hidden="true" style="--x:21.4%;--y:9.8%;--w:2.18;--r:121deg;--t:6.7;--dl:-1.5;--dx:1px;--dy:-1px"><path d="M14 3v22M3 14h22" fill="none" stroke="currentColor" stroke-width="5" stroke-linecap="round"/></svg><svg class="a" viewBox="0 0 48 20" aria-hidden="true" style="--x:44.3%;--y:6.3%;--w:3.24;--r:305deg;--t:4.9;--dl:-2.5;--dx:-6px;--dy:-7px"><path d="M3 10q5.25-9 10.5 0t10.5 0t10.5 0t10.5 0" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="round"/></svg><svg class="f" viewBox="0 0 30 30" aria-hidden="true" style="--x:62.5%;--y:4.3%;--w:1.66;--r:84deg;--t:5.3;--dl:-2.7;--dx:-4px;--dy:4px"><circle cx="15" cy="15" r="13" fill="currentColor"/></svg><svg class="a" viewBox="0 0 30 30" aria-hidden="true" style="--x:75.9%;--y:8.8%;--w:2.00;--r:357deg;--t:5.3;--dl:-3.6;--dx:-4px;--dy:0px"><circle cx="15" cy="15" r="13" fill="currentColor"/></svg><svg class="c" viewBox="0 0 30 30" aria-hidden="true" style="--x:87.0%;--y:11.1%;--w:2.26;--r:306deg;--t:8.0;--dl:-1.5;--dx:-6px;--dy:8px"><circle cx="15" cy="15" r="11" fill="none" stroke="currentColor" stroke-width="5"/></svg><svg class="a" viewBox="0 0 48 20" aria-hidden="true" style="--x:11.1%;--y:24.1%;--w:3.62;--r:204deg;--t:5.2;--dl:-4.5;--dx:0px;--dy:-6px"><path d="M3 16L11 4L19 16L27 4L35 16L43 4" fill="none" stroke="currentColor" stroke-width="4" stroke-linejoin="round" stroke-linecap="round"/></svg><svg class="f" viewBox="0 0 44 16" aria-hidden="true" style="--x:29.0%;--y:27.3%;--w:3.07;--r:24deg;--t:4.4;--dl:-1.3;--dx:1px;--dy:4px"><rect x="2" y="2" width="40" height="12" rx="6" fill="currentColor"/></svg><svg class="c" viewBox="0 0 44 16" aria-hidden="true" style="--x:41.0%;--y:34.0%;--w:3.75;--r:45deg;--t:6.3;--dl:-0.2;--dx:7px;--dy:-4px"><rect x="2" y="2" width="40" height="12" rx="6" fill="currentColor"/></svg><svg class="c" viewBox="0 0 44 16" aria-hidden="true" style="--x:56.9%;--y:33.5%;--w:3.75;--r:320deg;--t:5.7;--dl:-0.2;--dx:0px;--dy:6px"><rect x="2" y="2" width="40" height="12" rx="6" fill="currentColor"/></svg><svg class="f" viewBox="0 0 30 30" aria-hidden="true" style="--x:79.7%;--y:27.2%;--w:1.90;--r:161deg;--t:6.8;--dl:-2.9;--dx:4px;--dy:0px"><circle cx="15" cy="15" r="13" fill="currentColor"/></svg><svg class="c" viewBox="0 0 44 24" aria-hidden="true" style="--x:93.0%;--y:30.6%;--w:3.07;--r:29deg;--t:6.5;--dl:-2.8;--dx:5px;--dy:-2px"><path d="M4 22A18 18 0 0 1 40 22Z" fill="currentColor"/><path class="k" d="M4 22H40"/></svg><svg class="f" viewBox="0 0 44 40" aria-hidden="true" style="--x:12.8%;--y:52.6%;--w:2.46;--r:55deg;--t:8.9;--dl:-1.6;--dx:-2px;--dy:-7px"><path class="k" d="M24 7L41 37H7Z"/><path d="M20 3L37 33H3Z" fill="currentColor"/></svg><svg class="c" viewBox="0 0 48 20" aria-hidden="true" style="--x:28.1%;--y:53.0%;--w:3.30;--r:30deg;--t:8.9;--dl:-1.6;--dx:-5px;--dy:-7px"><path d="M3 16L11 4L19 16L27 4L35 16L43 4" fill="none" stroke="currentColor" stroke-width="4" stroke-linejoin="round" stroke-linecap="round"/></svg><svg class="b" viewBox="0 0 48 20" aria-hidden="true" style="--x:43.9%;--y:49.9%;--w:4.15;--r:276deg;--t:8.7;--dl:-0.4;--dx:-1px;--dy:4px"><path d="M3 10q5.25-9 10.5 0t10.5 0t10.5 0t10.5 0" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="round"/></svg><svg class="f" viewBox="0 0 44 40" aria-hidden="true" style="--x:60.0%;--y:52.6%;--w:2.66;--r:210deg;--t:4.1;--dl:-0.8;--dx:-1px;--dy:6px"><path class="k" d="M24 7L41 37H7Z"/><path d="M20 3L37 33H3Z" fill="currentColor"/></svg><svg class="c" viewBox="0 0 44 16" aria-hidden="true" style="--x:72.3%;--y:51.7%;--w:2.80;--r:77deg;--t:8.5;--dl:-2.1;--dx:8px;--dy:5px"><rect x="2" y="2" width="40" height="12" rx="6" fill="currentColor"/></svg><svg class="a" viewBox="0 0 30 30" aria-hidden="true" style="--x:92.6%;--y:47.8%;--w:2.55;--r:265deg;--t:5.5;--dl:-3.9;--dx:-1px;--dy:7px"><path d="M2 28L28 2M2 16L16 2M14 28L28 14" fill="none" stroke="currentColor" stroke-width="3"/><path class="k" d="M2 2H28V28H2Z"/></svg><svg class="a" viewBox="0 0 30 30" aria-hidden="true" style="--x:8.5%;--y:71.8%;--w:2.43;--r:147deg;--t:5.4;--dl:-3.4;--dx:0px;--dy:-2px"><circle cx="15" cy="15" r="11" fill="none" stroke="currentColor" stroke-width="5"/></svg><svg class="c" viewBox="0 0 44 24" aria-hidden="true" style="--x:23.8%;--y:71.1%;--w:2.55;--r:255deg;--t:7.3;--dl:-2.7;--dx:-3px;--dy:4px"><path d="M4 22A18 18 0 0 1 40 22Z" fill="currentColor"/><path class="k" d="M4 22H40"/></svg><svg class="a" viewBox="0 0 30 30" aria-hidden="true" style="--x:42.0%;--y:72.4%;--w:2.19;--r:49deg;--t:7.2;--dl:-0.6;--dx:6px;--dy:-5px"><path d="M2 28L28 2M2 16L16 2M14 28L28 14" fill="none" stroke="currentColor" stroke-width="3"/><path class="k" d="M2 2H28V28H2Z"/></svg><svg class="a" viewBox="0 0 30 30" aria-hidden="true" style="--x:60.5%;--y:71.6%;--w:1.71;--r:247deg;--t:5.1;--dl:-3.9;--dx:-3px;--dy:5px"><circle cx="15" cy="15" r="11" fill="none" stroke="currentColor" stroke-width="5"/></svg><svg class="a" viewBox="0 0 44 40" aria-hidden="true" style="--x:78.4%;--y:65.8%;--w:2.51;--r:215deg;--t:7.4;--dl:-0.8;--dx:-3px;--dy:6px"><path class="k" d="M24 7L41 37H7Z"/><path d="M20 3L37 33H3Z" fill="currentColor"/></svg><svg class="a" viewBox="0 0 30 30" aria-hidden="true" style="--x:92.3%;--y:72.9%;--w:1.63;--r:334deg;--t:8.8;--dl:-3.4;--dx:-1px;--dy:1px"><circle cx="15" cy="15" r="13" fill="currentColor"/></svg><svg class="a" viewBox="0 0 44 40" aria-hidden="true" style="--x:5.1%;--y:95.7%;--w:2.60;--r:7deg;--t:5.3;--dl:-1.7;--dx:8px;--dy:8px"><path class="k" d="M24 7L41 37H7Z"/><path d="M20 3L37 33H3Z" fill="currentColor"/></svg><svg class="c" viewBox="0 0 48 20" aria-hidden="true" style="--x:20.1%;--y:94.2%;--w:3.29;--r:184deg;--t:4.1;--dl:-1.2;--dx:2px;--dy:7px"><path d="M3 16L11 4L19 16L27 4L35 16L43 4" fill="none" stroke="currentColor" stroke-width="4" stroke-linejoin="round" stroke-linecap="round"/></svg><svg class="b" viewBox="0 0 30 30" aria-hidden="true" style="--x:39.7%;--y:95.1%;--w:1.89;--r:65deg;--t:7.2;--dl:-0.2;--dx:1px;--dy:-4px"><circle cx="15" cy="15" r="13" fill="currentColor"/></svg><svg class="a" viewBox="0 0 44 40" aria-hidden="true" style="--x:56.3%;--y:87.8%;--w:2.40;--r:242deg;--t:8.9;--dl:-5.0;--dx:6px;--dy:7px"><path class="k" d="M24 7L41 37H7Z"/><path d="M20 3L37 33H3Z" fill="currentColor"/></svg><svg class="c" viewBox="0 0 44 40" aria-hidden="true" style="--x:70.0%;--y:93.5%;--w:2.70;--r:316deg;--t:5.6;--dl:-4.3;--dx:2px;--dy:-2px"><path class="k" d="M24 7L41 37H7Z"/><path d="M20 3L37 33H3Z" fill="currentColor"/></svg><svg class="a" viewBox="0 0 44 16" aria-hidden="true" style="--x:87.7%;--y:89.4%;--w:3.46;--r:124deg;--t:7.3;--dl:-2.3;--dx:5px;--dy:-1px"><rect x="2" y="2" width="40" height="12" rx="6" fill="currentColor"/></svg></div>
```

### CSS

```css
.pt-uvq16-memphis {
  --c1: #ffc845;
  --c2: #16b3a0;
  --c3: #ff5c8a;
  --k: 1;
  /* velocidad */
  --d: 1;
  /* densidad / escala */
  --o: 1;
  /* opacidad */
  --bg: #05060a;
  --fg: #ffffff;
  --blend: screen;
  min-height: 100vh;
}

.pt-uvq16-memphis {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg);
  container-type: size;
  isolation: isolate;
}

.pt-uvq16-memphis>* {
  opacity: var(--o);
}

.pt-uvq16-memphis {
  font-size: 14px;
  background-image: radial-gradient(color-mix(in srgb,var(--fg) 16%,transparent) 1.2px,transparent 1.7px);
  background-size: calc(22px * var(--d)) calc(22px * var(--d));
}

.pt-uvq16-memphis svg {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: calc(var(--w) * 1em * var(--d));
  overflow: visible;
  rotate: var(--r);
  translate: calc(-50% + var(--px,0px)) calc(-50% + var(--py,0px));
  transition: translate .6s cubic-bezier(.34,1.56,.64,1);
  animation: uvq16-mp-f calc(var(--t) * 1s / var(--k)) ease-in-out infinite alternate;
  animation-delay: calc(var(--dl) * 1s / var(--k));
}

.pt-uvq16-memphis .a {
  color: var(--c1);
}

.pt-uvq16-memphis .b {
  color: var(--c2);
}

.pt-uvq16-memphis .c {
  color: var(--c3);
}

.pt-uvq16-memphis .f {
  color: var(--fg);
}

.pt-uvq16-memphis .k {
  fill: none;
  stroke: var(--fg);
  stroke-width: 2.5;
  stroke-linejoin: round;
}

.pt-uvq16-memphis .kd {
  fill: var(--fg);
}

@keyframes uvq16-mp-f {
  from {
    transform: translate(0,0) rotate(-7deg);
  }
  to {
    transform: translate(var(--dx),var(--dy)) rotate(9deg);
  }
}

@media (prefers-reduced-motion:reduce) {
  .pt-uvq16-memphis svg {
    animation: none;
    transition: none;
  }
}
```

### JavaScript

```js
(function (el) {
const S=[...el.querySelectorAll("svg")];let q=0,ex=0,ey=0,on=false;
const ap=()=>{q=0;const r=el.getBoundingClientRect(),R=Math.max(60,r.width*.22),k=el.offsetWidth?r.width/el.offsetWidth:1;S.forEach(s=>{const b=s.getBoundingClientRect(),dx=b.left+b.width/2-ex,dy=b.top+b.height/2-ey,d=Math.hypot(dx,dy)||1,f=on?Math.max(0,1-d/R):0;s.style.setProperty("--px",(dx/d*f*30/k).toFixed(1)+"px");s.style.setProperty("--py",(dy/d*f*30/k).toFixed(1)+"px")})};
const mv=e=>{ex=e.clientX;ey=e.clientY;on=true;if(!q)q=requestAnimationFrame(ap)};const lv=()=>{on=false;if(!q)q=requestAnimationFrame(ap)};
el.addEventListener("pointermove",mv);el.addEventListener("pointerdown",mv);el.addEventListener("pointerleave",lv);
return()=>{cancelAnimationFrame(q);el.removeEventListener("pointermove",mv);el.removeEventListener("pointerdown",mv);el.removeEventListener("pointerleave",lv)};
})(document.querySelector(".pt-uvq16-memphis"));
```

### React

```tsx
// @ts-nocheck
import { useEffect, useRef } from "react";

const css = `
.pt-uvq16-memphis {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg);
  container-type: size;
  isolation: isolate;
}

.pt-uvq16-memphis>* {
  opacity: var(--o);
}

.pt-uvq16-memphis {
  font-size: 14px;
  background-image: radial-gradient(color-mix(in srgb,var(--fg) 16%,transparent) 1.2px,transparent 1.7px);
  background-size: calc(22px * var(--d)) calc(22px * var(--d));
}

.pt-uvq16-memphis svg {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: calc(var(--w) * 1em * var(--d));
  overflow: visible;
  rotate: var(--r);
  translate: calc(-50% + var(--px,0px)) calc(-50% + var(--py,0px));
  transition: translate .6s cubic-bezier(.34,1.56,.64,1);
  animation: uvq16-mp-f calc(var(--t) * 1s / var(--k)) ease-in-out infinite alternate;
  animation-delay: calc(var(--dl) * 1s / var(--k));
}

.pt-uvq16-memphis .a {
  color: var(--c1);
}

.pt-uvq16-memphis .b {
  color: var(--c2);
}

.pt-uvq16-memphis .c {
  color: var(--c3);
}

.pt-uvq16-memphis .f {
  color: var(--fg);
}

.pt-uvq16-memphis .k {
  fill: none;
  stroke: var(--fg);
  stroke-width: 2.5;
  stroke-linejoin: round;
}

.pt-uvq16-memphis .kd {
  fill: var(--fg);
}

@keyframes uvq16-mp-f {
  from {
    transform: translate(0,0) rotate(-7deg);
  }
  to {
    transform: translate(var(--dx),var(--dy)) rotate(9deg);
  }
}

@media (prefers-reduced-motion:reduce) {
  .pt-uvq16-memphis svg {
    animation: none;
    transition: none;
  }
}

`;

export default function PatternUvq16Memphis() {
  const ref = useRef(null);
  useEffect(() => {
    const el = ref.current;
    if (!el) return;
const S=[...el.querySelectorAll("svg")];let q=0,ex=0,ey=0,on=false;
const ap=()=>{q=0;const r=el.getBoundingClientRect(),R=Math.max(60,r.width*.22),k=el.offsetWidth?r.width/el.offsetWidth:1;S.forEach(s=>{const b=s.getBoundingClientRect(),dx=b.left+b.width/2-ex,dy=b.top+b.height/2-ey,d=Math.hypot(dx,dy)||1,f=on?Math.max(0,1-d/R):0;s.style.setProperty("--px",(dx/d*f*30/k).toFixed(1)+"px");s.style.setProperty("--py",(dy/d*f*30/k).toFixed(1)+"px")})};
const mv=e=>{ex=e.clientX;ey=e.clientY;on=true;if(!q)q=requestAnimationFrame(ap)};const lv=()=>{on=false;if(!q)q=requestAnimationFrame(ap)};
el.addEventListener("pointermove",mv);el.addEventListener("pointerdown",mv);el.addEventListener("pointerleave",lv);
return()=>{cancelAnimationFrame(q);el.removeEventListener("pointermove",mv);el.removeEventListener("pointerdown",mv);el.removeEventListener("pointerleave",lv)};
  }, []);
  return (
    <>
      <style>{css}</style>
      <div
        ref={ref}
        className="pt-uvq16-memphis"
        style={{
          "--c1": "#ffc845",
          "--c2": "#16b3a0",
          "--c3": "#ff5c8a",
          "--k": 1,
          "--d": 1,
          "--o": 1,
          "--bg": "#05060a",
          "--fg": "#ffffff",
          "--blend": "screen",
          minHeight: "100vh",
        }}
      >
        <svg className="b" viewBox="0 0 48 20" aria-hidden="true" style={{ "--x": "11.9%", "--y": "11.0%", "--w": "3.45", "--r": "273deg", "--t": "5.0", "--dl": "-5.0", "--dx": "3px", "--dy": "2px" } as CSSProperties}><path d="M3 10q5.25-9 10.5 0t10.5 0t10.5 0t10.5 0" fill="none" stroke="currentColor" strokeWidth="4" strokeLinecap="round" /></svg><svg className="f" viewBox="0 0 28 28" aria-hidden="true" style={{ "--x": "21.4%", "--y": "9.8%", "--w": "2.18", "--r": "121deg", "--t": "6.7", "--dl": "-1.5", "--dx": "1px", "--dy": "-1px" } as CSSProperties}><path d="M14 3v22M3 14h22" fill="none" stroke="currentColor" strokeWidth="5" strokeLinecap="round" /></svg><svg className="a" viewBox="0 0 48 20" aria-hidden="true" style={{ "--x": "44.3%", "--y": "6.3%", "--w": "3.24", "--r": "305deg", "--t": "4.9", "--dl": "-2.5", "--dx": "-6px", "--dy": "-7px" } as CSSProperties}><path d="M3 10q5.25-9 10.5 0t10.5 0t10.5 0t10.5 0" fill="none" stroke="currentColor" strokeWidth="4" strokeLinecap="round" /></svg><svg className="f" viewBox="0 0 30 30" aria-hidden="true" style={{ "--x": "62.5%", "--y": "4.3%", "--w": "1.66", "--r": "84deg", "--t": "5.3", "--dl": "-2.7", "--dx": "-4px", "--dy": "4px" } as CSSProperties}><circle cx="15" cy="15" r="13" fill="currentColor" /></svg><svg className="a" viewBox="0 0 30 30" aria-hidden="true" style={{ "--x": "75.9%", "--y": "8.8%", "--w": "2.00", "--r": "357deg", "--t": "5.3", "--dl": "-3.6", "--dx": "-4px", "--dy": "0px" } as CSSProperties}><circle cx="15" cy="15" r="13" fill="currentColor" /></svg><svg className="c" viewBox="0 0 30 30" aria-hidden="true" style={{ "--x": "87.0%", "--y": "11.1%", "--w": "2.26", "--r": "306deg", "--t": "8.0", "--dl": "-1.5", "--dx": "-6px", "--dy": "8px" } as CSSProperties}><circle cx="15" cy="15" r="11" fill="none" stroke="currentColor" strokeWidth="5" /></svg><svg className="a" viewBox="0 0 48 20" aria-hidden="true" style={{ "--x": "11.1%", "--y": "24.1%", "--w": "3.62", "--r": "204deg", "--t": "5.2", "--dl": "-4.5", "--dx": "0px", "--dy": "-6px" } as CSSProperties}><path d="M3 16L11 4L19 16L27 4L35 16L43 4" fill="none" stroke="currentColor" strokeWidth="4" strokeLinejoin="round" strokeLinecap="round" /></svg><svg className="f" viewBox="0 0 44 16" aria-hidden="true" style={{ "--x": "29.0%", "--y": "27.3%", "--w": "3.07", "--r": "24deg", "--t": "4.4", "--dl": "-1.3", "--dx": "1px", "--dy": "4px" } as CSSProperties}><rect x="2" y="2" width="40" height="12" rx="6" fill="currentColor" /></svg><svg className="c" viewBox="0 0 44 16" aria-hidden="true" style={{ "--x": "41.0%", "--y": "34.0%", "--w": "3.75", "--r": "45deg", "--t": "6.3", "--dl": "-0.2", "--dx": "7px", "--dy": "-4px" } as CSSProperties}><rect x="2" y="2" width="40" height="12" rx="6" fill="currentColor" /></svg><svg className="c" viewBox="0 0 44 16" aria-hidden="true" style={{ "--x": "56.9%", "--y": "33.5%", "--w": "3.75", "--r": "320deg", "--t": "5.7", "--dl": "-0.2", "--dx": "0px", "--dy": "6px" } as CSSProperties}><rect x="2" y="2" width="40" height="12" rx="6" fill="currentColor" /></svg><svg className="f" viewBox="0 0 30 30" aria-hidden="true" style={{ "--x": "79.7%", "--y": "27.2%", "--w": "1.90", "--r": "161deg", "--t": "6.8", "--dl": "-2.9", "--dx": "4px", "--dy": "0px" } as CSSProperties}><circle cx="15" cy="15" r="13" fill="currentColor" /></svg><svg className="c" viewBox="0 0 44 24" aria-hidden="true" style={{ "--x": "93.0%", "--y": "30.6%", "--w": "3.07", "--r": "29deg", "--t": "6.5", "--dl": "-2.8", "--dx": "5px", "--dy": "-2px" } as CSSProperties}><path d="M4 22A18 18 0 0 1 40 22Z" fill="currentColor" /><path className="k" d="M4 22H40" /></svg><svg className="f" viewBox="0 0 44 40" aria-hidden="true" style={{ "--x": "12.8%", "--y": "52.6%", "--w": "2.46", "--r": "55deg", "--t": "8.9", "--dl": "-1.6", "--dx": "-2px", "--dy": "-7px" } as CSSProperties}><path className="k" d="M24 7L41 37H7Z" /><path d="M20 3L37 33H3Z" fill="currentColor" /></svg><svg className="c" viewBox="0 0 48 20" aria-hidden="true" style={{ "--x": "28.1%", "--y": "53.0%", "--w": "3.30", "--r": "30deg", "--t": "8.9", "--dl": "-1.6", "--dx": "-5px", "--dy": "-7px" } as CSSProperties}><path d="M3 16L11 4L19 16L27 4L35 16L43 4" fill="none" stroke="currentColor" strokeWidth="4" strokeLinejoin="round" strokeLinecap="round" /></svg><svg className="b" viewBox="0 0 48 20" aria-hidden="true" style={{ "--x": "43.9%", "--y": "49.9%", "--w": "4.15", "--r": "276deg", "--t": "8.7", "--dl": "-0.4", "--dx": "-1px", "--dy": "4px" } as CSSProperties}><path d="M3 10q5.25-9 10.5 0t10.5 0t10.5 0t10.5 0" fill="none" stroke="currentColor" strokeWidth="4" strokeLinecap="round" /></svg><svg className="f" viewBox="0 0 44 40" aria-hidden="true" style={{ "--x": "60.0%", "--y": "52.6%", "--w": "2.66", "--r": "210deg", "--t": "4.1", "--dl": "-0.8", "--dx": "-1px", "--dy": "6px" } as CSSProperties}><path className="k" d="M24 7L41 37H7Z" /><path d="M20 3L37 33H3Z" fill="currentColor" /></svg><svg className="c" viewBox="0 0 44 16" aria-hidden="true" style={{ "--x": "72.3%", "--y": "51.7%", "--w": "2.80", "--r": "77deg", "--t": "8.5", "--dl": "-2.1", "--dx": "8px", "--dy": "5px" } as CSSProperties}><rect x="2" y="2" width="40" height="12" rx="6" fill="currentColor" /></svg><svg className="a" viewBox="0 0 30 30" aria-hidden="true" style={{ "--x": "92.6%", "--y": "47.8%", "--w": "2.55", "--r": "265deg", "--t": "5.5", "--dl": "-3.9", "--dx": "-1px", "--dy": "7px" } as CSSProperties}><path d="M2 28L28 2M2 16L16 2M14 28L28 14" fill="none" stroke="currentColor" strokeWidth="3" /><path className="k" d="M2 2H28V28H2Z" /></svg><svg className="a" viewBox="0 0 30 30" aria-hidden="true" style={{ "--x": "8.5%", "--y": "71.8%", "--w": "2.43", "--r": "147deg", "--t": "5.4", "--dl": "-3.4", "--dx": "0px", "--dy": "-2px" } as CSSProperties}><circle cx="15" cy="15" r="11" fill="none" stroke="currentColor" strokeWidth="5" /></svg><svg className="c" viewBox="0 0 44 24" aria-hidden="true" style={{ "--x": "23.8%", "--y": "71.1%", "--w": "2.55", "--r": "255deg", "--t": "7.3", "--dl": "-2.7", "--dx": "-3px", "--dy": "4px" } as CSSProperties}><path d="M4 22A18 18 0 0 1 40 22Z" fill="currentColor" /><path className="k" d="M4 22H40" /></svg><svg className="a" viewBox="0 0 30 30" aria-hidden="true" style={{ "--x": "42.0%", "--y": "72.4%", "--w": "2.19", "--r": "49deg", "--t": "7.2", "--dl": "-0.6", "--dx": "6px", "--dy": "-5px" } as CSSProperties}><path d="M2 28L28 2M2 16L16 2M14 28L28 14" fill="none" stroke="currentColor" strokeWidth="3" /><path className="k" d="M2 2H28V28H2Z" /></svg><svg className="a" viewBox="0 0 30 30" aria-hidden="true" style={{ "--x": "60.5%", "--y": "71.6%", "--w": "1.71", "--r": "247deg", "--t": "5.1", "--dl": "-3.9", "--dx": "-3px", "--dy": "5px" } as CSSProperties}><circle cx="15" cy="15" r="11" fill="none" stroke="currentColor" strokeWidth="5" /></svg><svg className="a" viewBox="0 0 44 40" aria-hidden="true" style={{ "--x": "78.4%", "--y": "65.8%", "--w": "2.51", "--r": "215deg", "--t": "7.4", "--dl": "-0.8", "--dx": "-3px", "--dy": "6px" } as CSSProperties}><path className="k" d="M24 7L41 37H7Z" /><path d="M20 3L37 33H3Z" fill="currentColor" /></svg><svg className="a" viewBox="0 0 30 30" aria-hidden="true" style={{ "--x": "92.3%", "--y": "72.9%", "--w": "1.63", "--r": "334deg", "--t": "8.8", "--dl": "-3.4", "--dx": "-1px", "--dy": "1px" } as CSSProperties}><circle cx="15" cy="15" r="13" fill="currentColor" /></svg><svg className="a" viewBox="0 0 44 40" aria-hidden="true" style={{ "--x": "5.1%", "--y": "95.7%", "--w": "2.60", "--r": "7deg", "--t": "5.3", "--dl": "-1.7", "--dx": "8px", "--dy": "8px" } as CSSProperties}><path className="k" d="M24 7L41 37H7Z" /><path d="M20 3L37 33H3Z" fill="currentColor" /></svg><svg className="c" viewBox="0 0 48 20" aria-hidden="true" style={{ "--x": "20.1%", "--y": "94.2%", "--w": "3.29", "--r": "184deg", "--t": "4.1", "--dl": "-1.2", "--dx": "2px", "--dy": "7px" } as CSSProperties}><path d="M3 16L11 4L19 16L27 4L35 16L43 4" fill="none" stroke="currentColor" strokeWidth="4" strokeLinejoin="round" strokeLinecap="round" /></svg><svg className="b" viewBox="0 0 30 30" aria-hidden="true" style={{ "--x": "39.7%", "--y": "95.1%", "--w": "1.89", "--r": "65deg", "--t": "7.2", "--dl": "-0.2", "--dx": "1px", "--dy": "-4px" } as CSSProperties}><circle cx="15" cy="15" r="13" fill="currentColor" /></svg><svg className="a" viewBox="0 0 44 40" aria-hidden="true" style={{ "--x": "56.3%", "--y": "87.8%", "--w": "2.40", "--r": "242deg", "--t": "8.9", "--dl": "-5.0", "--dx": "6px", "--dy": "7px" } as CSSProperties}><path className="k" d="M24 7L41 37H7Z" /><path d="M20 3L37 33H3Z" fill="currentColor" /></svg><svg className="c" viewBox="0 0 44 40" aria-hidden="true" style={{ "--x": "70.0%", "--y": "93.5%", "--w": "2.70", "--r": "316deg", "--t": "5.6", "--dl": "-4.3", "--dx": "2px", "--dy": "-2px" } as CSSProperties}><path className="k" d="M24 7L41 37H7Z" /><path d="M20 3L37 33H3Z" fill="currentColor" /></svg><svg className="a" viewBox="0 0 44 16" aria-hidden="true" style={{ "--x": "87.7%", "--y": "89.4%", "--w": "3.46", "--r": "124deg", "--t": "7.3", "--dl": "-2.3", "--dx": "5px", "--dy": "-1px" } as CSSProperties}><rect x="2" y="2" width="40" height="12" rx="6" fill="currentColor" /></svg>
      </div>
    </>
  );
}
```

## Prompt for AI assistants

Paste this into ChatGPT, Claude, Cursor, v0 or Lovable to adapt the block to your stack (Tailwind, Vue, Svelte…):

````text
I want to add the “Memphis confetti” block (Backgrounds) from AIMRAN Library to my project.

## What it is
Eighties squiggles, zigzags, triangles and dot grids float around and bounce out of the way when the pointer gets close.

## Chosen settings
- Color 1: #ffc845
- Color 2: #16b3a0
- Color 3: #ff5c8a
- Speed: 1x (from 0.2 to 3x)
- Density / scale: 1x (from 0.5 to 2x)
- Opacity: 1 (from 0.2 to 1)

## What I need
1. Add it to my project with the same look and animation as the reference code: same sizes, colours, radii, shadows, timings and easing.
2. It is built with plain HTML and CSS (the reference wraps it in a React component with its CSS). If my project uses something else (Vue, Svelte, Astro, plain HTML…), translate it without losing any behaviour. If I use Tailwind, turn the styles into classes; if not, keep the CSS in its own file.
3. Expose the settings above as props (or CSS variables) with those values as defaults.
4. Make it work well on phones: nothing that depends only on hover, touch targets of at least 44 px and no overflow on 320 px screens.
5. Make it look right in light and dark mode.
6. Keep it accessible: semantic HTML, roles and aria-* where needed, visible focus and keyboard support.
7. Respect prefers-reduced-motion: with reduced motion, no big animations but the same end result.

## Reference code
```tsx
// @ts-nocheck
import { useEffect, useRef } from "react";

const css = `
.pt-uvq16-memphis {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg);
  container-type: size;
  isolation: isolate;
}

.pt-uvq16-memphis>* {
  opacity: var(--o);
}

.pt-uvq16-memphis {
  font-size: 14px;
  background-image: radial-gradient(color-mix(in srgb,var(--fg) 16%,transparent) 1.2px,transparent 1.7px);
  background-size: calc(22px * var(--d)) calc(22px * var(--d));
}

.pt-uvq16-memphis svg {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: calc(var(--w) * 1em * var(--d));
  overflow: visible;
  rotate: var(--r);
  translate: calc(-50% + var(--px,0px)) calc(-50% + var(--py,0px));
  transition: translate .6s cubic-bezier(.34,1.56,.64,1);
  animation: uvq16-mp-f calc(var(--t) * 1s / var(--k)) ease-in-out infinite alternate;
  animation-delay: calc(var(--dl) * 1s / var(--k));
}

.pt-uvq16-memphis .a {
  color: var(--c1);
}

.pt-uvq16-memphis .b {
  color: var(--c2);
}

.pt-uvq16-memphis .c {
  color: var(--c3);
}

.pt-uvq16-memphis .f {
  color: var(--fg);
}

.pt-uvq16-memphis .k {
  fill: none;
  stroke: var(--fg);
  stroke-width: 2.5;
  stroke-linejoin: round;
}

.pt-uvq16-memphis .kd {
  fill: var(--fg);
}

@keyframes uvq16-mp-f {
  from {
    transform: translate(0,0) rotate(-7deg);
  }
  to {
    transform: translate(var(--dx),var(--dy)) rotate(9deg);
  }
}

@media (prefers-reduced-motion:reduce) {
  .pt-uvq16-memphis svg {
    animation: none;
    transition: none;
  }
}

`;

export default function PatternUvq16Memphis() {
  const ref = useRef(null);
  useEffect(() => {
    const el = ref.current;
    if (!el) return;
const S=[...el.querySelectorAll("svg")];let q=0,ex=0,ey=0,on=false;
const ap=()=>{q=0;const r=el.getBoundingClientRect(),R=Math.max(60,r.width*.22),k=el.offsetWidth?r.width/el.offsetWidth:1;S.forEach(s=>{const b=s.getBoundingClientRect(),dx=b.left+b.width/2-ex,dy=b.top+b.height/2-ey,d=Math.hypot(dx,dy)||1,f=on?Math.max(0,1-d/R):0;s.style.setProperty("--px",(dx/d*f*30/k).toFixed(1)+"px");s.style.setProperty("--py",(dy/d*f*30/k).toFixed(1)+"px")})};
const mv=e=>{ex=e.clientX;ey=e.clientY;on=true;if(!q)q=requestAnimationFrame(ap)};const lv=()=>{on=false;if(!q)q=requestAnimationFrame(ap)};
el.addEventListener("pointermove",mv);el.addEventListener("pointerdown",mv);el.addEventListener("pointerleave",lv);
return()=>{cancelAnimationFrame(q);el.removeEventListener("pointermove",mv);el.removeEventListener("pointerdown",mv);el.removeEventListener("pointerleave",lv)};
  }, []);
  return (
    <>
      <style>{css}</style>
      <div
        ref={ref}
        className="pt-uvq16-memphis"
        style={{
          "--c1": "#ffc845",
          "--c2": "#16b3a0",
          "--c3": "#ff5c8a",
          "--k": 1,
          "--d": 1,
          "--o": 1,
          "--bg": "#05060a",
          "--fg": "#ffffff",
          "--blend": "screen",
          minHeight: "100vh",
        }}
      >
        <svg className="b" viewBox="0 0 48 20" aria-hidden="true" style={{ "--x": "11.9%", "--y": "11.0%", "--w": "3.45", "--r": "273deg", "--t": "5.0", "--dl": "-5.0", "--dx": "3px", "--dy": "2px" } as CSSProperties}><path d="M3 10q5.25-9 10.5 0t10.5 0t10.5 0t10.5 0" fill="none" stroke="currentColor" strokeWidth="4" strokeLinecap="round" /></svg><svg className="f" viewBox="0 0 28 28" aria-hidden="true" style={{ "--x": "21.4%", "--y": "9.8%", "--w": "2.18", "--r": "121deg", "--t": "6.7", "--dl": "-1.5", "--dx": "1px", "--dy": "-1px" } as CSSProperties}><path d="M14 3v22M3 14h22" fill="none" stroke="currentColor" strokeWidth="5" strokeLinecap="round" /></svg><svg className="a" viewBox="0 0 48 20" aria-hidden="true" style={{ "--x": "44.3%", "--y": "6.3%", "--w": "3.24", "--r": "305deg", "--t": "4.9", "--dl": "-2.5", "--dx": "-6px", "--dy": "-7px" } as CSSProperties}><path d="M3 10q5.25-9 10.5 0t10.5 0t10.5 0t10.5 0" fill="none" stroke="currentColor" strokeWidth="4" strokeLinecap="round" /></svg><svg className="f" viewBox="0 0 30 30" aria-hidden="true" style={{ "--x": "62.5%", "--y": "4.3%", "--w": "1.66", "--r": "84deg", "--t": "5.3", "--dl": "-2.7", "--dx": "-4px", "--dy": "4px" } as CSSProperties}><circle cx="15" cy="15" r="13" fill="currentColor" /></svg><svg className="a" viewBox="0 0 30 30" aria-hidden="true" style={{ "--x": "75.9%", "--y": "8.8%", "--w": "2.00", "--r": "357deg", "--t": "5.3", "--dl": "-3.6", "--dx": "-4px", "--dy": "0px" } as CSSProperties}><circle cx="15" cy="15" r="13" fill="currentColor" /></svg><svg className="c" viewBox="0 0 30 30" aria-hidden="true" style={{ "--x": "87.0%", "--y": "11.1%", "--w": "2.26", "--r": "306deg", "--t": "8.0", "--dl": "-1.5", "--dx": "-6px", "--dy": "8px" } as CSSProperties}><circle cx="15" cy="15" r="11" fill="none" stroke="currentColor" strokeWidth="5" /></svg><svg className="a" viewBox="0 0 48 20" aria-hidden="true" style={{ "--x": "11.1%", "--y": "24.1%", "--w": "3.62", "--r": "204deg", "--t": "5.2", "--dl": "-4.5", "--dx": "0px", "--dy": "-6px" } as CSSProperties}><path d="M3 16L11 4L19 16L27 4L35 16L43 4" fill="none" stroke="currentColor" strokeWidth="4" strokeLinejoin="round" strokeLinecap="round" /></svg><svg className="f" viewBox="0 0 44 16" aria-hidden="true" style={{ "--x": "29.0%", "--y": "27.3%", "--w": "3.07", "--r": "24deg", "--t": "4.4", "--dl": "-1.3", "--dx": "1px", "--dy": "4px" } as CSSProperties}><rect x="2" y="2" width="40" height="12" rx="6" fill="currentColor" /></svg><svg className="c" viewBox="0 0 44 16" aria-hidden="true" style={{ "--x": "41.0%", "--y": "34.0%", "--w": "3.75", "--r": "45deg", "--t": "6.3", "--dl": "-0.2", "--dx": "7px", "--dy": "-4px" } as CSSProperties}><rect x="2" y="2" width="40" height="12" rx="6" fill="currentColor" /></svg><svg className="c" viewBox="0 0 44 16" aria-hidden="true" style={{ "--x": "56.9%", "--y": "33.5%", "--w": "3.75", "--r": "320deg", "--t": "5.7", "--dl": "-0.2", "--dx": "0px", "--dy": "6px" } as CSSProperties}><rect x="2" y="2" width="40" height="12" rx="6" fill="currentColor" /></svg><svg className="f" viewBox="0 0 30 30" aria-hidden="true" style={{ "--x": "79.7%", "--y": "27.2%", "--w": "1.90", "--r": "161deg", "--t": "6.8", "--dl": "-2.9", "--dx": "4px", "--dy": "0px" } as CSSProperties}><circle cx="15" cy="15" r="13" fill="currentColor" /></svg><svg className="c" viewBox="0 0 44 24" aria-hidden="true" style={{ "--x": "93.0%", "--y": "30.6%", "--w": "3.07", "--r": "29deg", "--t": "6.5", "--dl": "-2.8", "--dx": "5px", "--dy": "-2px" } as CSSProperties}><path d="M4 22A18 18 0 0 1 40 22Z" fill="currentColor" /><path className="k" d="M4 22H40" /></svg><svg className="f" viewBox="0 0 44 40" aria-hidden="true" style={{ "--x": "12.8%", "--y": "52.6%", "--w": "2.46", "--r": "55deg", "--t": "8.9", "--dl": "-1.6", "--dx": "-2px", "--dy": "-7px" } as CSSProperties}><path className="k" d="M24 7L41 37H7Z" /><path d="M20 3L37 33H3Z" fill="currentColor" /></svg><svg className="c" viewBox="0 0 48 20" aria-hidden="true" style={{ "--x": "28.1%", "--y": "53.0%", "--w": "3.30", "--r": "30deg", "--t": "8.9", "--dl": "-1.6", "--dx": "-5px", "--dy": "-7px" } as CSSProperties}><path d="M3 16L11 4L19 16L27 4L35 16L43 4" fill="none" stroke="currentColor" strokeWidth="4" strokeLinejoin="round" strokeLinecap="round" /></svg><svg className="b" viewBox="0 0 48 20" aria-hidden="true" style={{ "--x": "43.9%", "--y": "49.9%", "--w": "4.15", "--r": "276deg", "--t": "8.7", "--dl": "-0.4", "--dx": "-1px", "--dy": "4px" } as CSSProperties}><path d="M3 10q5.25-9 10.5 0t10.5 0t10.5 0t10.5 0" fill="none" stroke="currentColor" strokeWidth="4" strokeLinecap="round" /></svg><svg className="f" viewBox="0 0 44 40" aria-hidden="true" style={{ "--x": "60.0%", "--y": "52.6%", "--w": "2.66", "--r": "210deg", "--t": "4.1", "--dl": "-0.8", "--dx": "-1px", "--dy": "6px" } as CSSProperties}><path className="k" d="M24 7L41 37H7Z" /><path d="M20 3L37 33H3Z" fill="currentColor" /></svg><svg className="c" viewBox="0 0 44 16" aria-hidden="true" style={{ "--x": "72.3%", "--y": "51.7%", "--w": "2.80", "--r": "77deg", "--t": "8.5", "--dl": "-2.1", "--dx": "8px", "--dy": "5px" } as CSSProperties}><rect x="2" y="2" width="40" height="12" rx="6" fill="currentColor" /></svg><svg className="a" viewBox="0 0 30 30" aria-hidden="true" style={{ "--x": "92.6%", "--y": "47.8%", "--w": "2.55", "--r": "265deg", "--t": "5.5", "--dl": "-3.9", "--dx": "-1px", "--dy": "7px" } as CSSProperties}><path d="M2 28L28 2M2 16L16 2M14 28L28 14" fill="none" stroke="currentColor" strokeWidth="3" /><path className="k" d="M2 2H28V28H2Z" /></svg><svg className="a" viewBox="0 0 30 30" aria-hidden="true" style={{ "--x": "8.5%", "--y": "71.8%", "--w": "2.43", "--r": "147deg", "--t": "5.4", "--dl": "-3.4", "--dx": "0px", "--dy": "-2px" } as CSSProperties}><circle cx="15" cy="15" r="11" fill="none" stroke="currentColor" strokeWidth="5" /></svg><svg className="c" viewBox="0 0 44 24" aria-hidden="true" style={{ "--x": "23.8%", "--y": "71.1%", "--w": "2.55", "--r": "255deg", "--t": "7.3", "--dl": "-2.7", "--dx": "-3px", "--dy": "4px" } as CSSProperties}><path d="M4 22A18 18 0 0 1 40 22Z" fill="currentColor" /><path className="k" d="M4 22H40" /></svg><svg className="a" viewBox="0 0 30 30" aria-hidden="true" style={{ "--x": "42.0%", "--y": "72.4%", "--w": "2.19", "--r": "49deg", "--t": "7.2", "--dl": "-0.6", "--dx": "6px", "--dy": "-5px" } as CSSProperties}><path d="M2 28L28 2M2 16L16 2M14 28L28 14" fill="none" stroke="currentColor" strokeWidth="3" /><path className="k" d="M2 2H28V28H2Z" /></svg><svg className="a" viewBox="0 0 30 30" aria-hidden="true" style={{ "--x": "60.5%", "--y": "71.6%", "--w": "1.71", "--r": "247deg", "--t": "5.1", "--dl": "-3.9", "--dx": "-3px", "--dy": "5px" } as CSSProperties}><circle cx="15" cy="15" r="11" fill="none" stroke="currentColor" strokeWidth="5" /></svg><svg className="a" viewBox="0 0 44 40" aria-hidden="true" style={{ "--x": "78.4%", "--y": "65.8%", "--w": "2.51", "--r": "215deg", "--t": "7.4", "--dl": "-0.8", "--dx": "-3px", "--dy": "6px" } as CSSProperties}><path className="k" d="M24 7L41 37H7Z" /><path d="M20 3L37 33H3Z" fill="currentColor" /></svg><svg className="a" viewBox="0 0 30 30" aria-hidden="true" style={{ "--x": "92.3%", "--y": "72.9%", "--w": "1.63", "--r": "334deg", "--t": "8.8", "--dl": "-3.4", "--dx": "-1px", "--dy": "1px" } as CSSProperties}><circle cx="15" cy="15" r="13" fill="currentColor" /></svg><svg className="a" viewBox="0 0 44 40" aria-hidden="true" style={{ "--x": "5.1%", "--y": "95.7%", "--w": "2.60", "--r": "7deg", "--t": "5.3", "--dl": "-1.7", "--dx": "8px", "--dy": "8px" } as CSSProperties}><path className="k" d="M24 7L41 37H7Z" /><path d="M20 3L37 33H3Z" fill="currentColor" /></svg><svg className="c" viewBox="0 0 48 20" aria-hidden="true" style={{ "--x": "20.1%", "--y": "94.2%", "--w": "3.29", "--r": "184deg", "--t": "4.1", "--dl": "-1.2", "--dx": "2px", "--dy": "7px" } as CSSProperties}><path d="M3 16L11 4L19 16L27 4L35 16L43 4" fill="none" stroke="currentColor" strokeWidth="4" strokeLinejoin="round" strokeLinecap="round" /></svg><svg className="b" viewBox="0 0 30 30" aria-hidden="true" style={{ "--x": "39.7%", "--y": "95.1%", "--w": "1.89", "--r": "65deg", "--t": "7.2", "--dl": "-0.2", "--dx": "1px", "--dy": "-4px" } as CSSProperties}><circle cx="15" cy="15" r="13" fill="currentColor" /></svg><svg className="a" viewBox="0 0 44 40" aria-hidden="true" style={{ "--x": "56.3%", "--y": "87.8%", "--w": "2.40", "--r": "242deg", "--t": "8.9", "--dl": "-5.0", "--dx": "6px", "--dy": "7px" } as CSSProperties}><path className="k" d="M24 7L41 37H7Z" /><path d="M20 3L37 33H3Z" fill="currentColor" /></svg><svg className="c" viewBox="0 0 44 40" aria-hidden="true" style={{ "--x": "70.0%", "--y": "93.5%", "--w": "2.70", "--r": "316deg", "--t": "5.6", "--dl": "-4.3", "--dx": "2px", "--dy": "-2px" } as CSSProperties}><path className="k" d="M24 7L41 37H7Z" /><path d="M20 3L37 33H3Z" fill="currentColor" /></svg><svg className="a" viewBox="0 0 44 16" aria-hidden="true" style={{ "--x": "87.7%", "--y": "89.4%", "--w": "3.46", "--r": "124deg", "--t": "7.3", "--dl": "-2.3", "--dx": "5px", "--dy": "-1px" } as CSSProperties}><rect x="2" y="2" width="40" height="12" rx="6" fill="currentColor" /></svg>
      </div>
    </>
  );
}
```

Give me the complete final code, ready to paste, and tell me in one line where to put it in my project.
````
