# Knitted Fair Isle sweater

> Wool V stitches with diamond and star bands that knit their way upwards, while the pointer stretches the fabric, on canvas.

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

## Where to use it

A Fair Isle sweater rendered stitch by stitch. Each stitch is two shaded wool loops drawn once into a small sprite, then stamped across the canvas in a pattern of rows, checks, diamonds and stars. The whole piece scrolls upwards slowly, as if new rows were being knitted at the bottom. Cozy for winter campaigns, craft shops and slow living brands.

The first color is the yarn for the motifs, the second the accent and the third the background wool. Density changes the stitch size and speed the knitting pace. Move the pointer over it and the stitches swell and spread like stretched fabric.

## Code

### HTML

```html
<div class="pt-uvq16-knit"><canvas></canvas></div>
```

### CSS

```css
.pt-uvq16-knit {
  --c1: #f2e6cf;
  --c2: #b4442f;
  --c3: #2f5d50;
  --k: 1;
  /* velocidad */
  --d: 1;
  /* densidad / escala */
  --o: 1;
  /* opacidad */
  --bg: #05060a;
  --fg: #ffffff;
  --blend: screen;
  min-height: 100vh;
}

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

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

.pt-uvq16-knit canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
```

### JavaScript

```js
(function (el) {
const cv=el.querySelector("canvas"),x=cv.getContext("2d");let W=0,H=0,raf=0,LF=null,pend=null,vis=true,dead=false,RF=0;
const RM=matchMedia("(prefers-reduced-motion: reduce)").matches;
const fit=()=>{const r=Math.min(window.devicePixelRatio||1,2),w=el.clientWidth,h=el.clientHeight;if(w===W&&h===H&&cv.width===Math.round(w*r))return;W=w;H=h;cv.width=Math.round(w*r);cv.height=Math.round(h*r);x.setTransform(r,0,0,r,0,0);if(RM&&LF){RF=0;LF()}};
const ro=new ResizeObserver(fit);ro.observe(el);fit();
const io=new IntersectionObserver(e=>{vis=e[e.length-1].isIntersecting;if(vis&&pend&&!dead){const f=pend;pend=null;raf=window.requestAnimationFrame(f)}});io.observe(el);
const requestAnimationFrame=f=>{LF=f;if(dead)return 0;if(RM){if(++RF<90)f();return 0}if(!vis){pend=f;return 0}return window.requestAnimationFrame(f)};
const V=()=>{const s=getComputedStyle(el),g=n=>s.getPropertyValue(n).trim();return{c1:g("--c1"),c2:g("--c2"),c3:g("--c3"),bg:g("--bg")||"#05060a",k:+g("--k")||1,d:+g("--d")||1}};
const pc=document.createElement("canvas").getContext("2d"),CC={};
const rgb=c=>{if(CC[c])return CC[c];pc.fillStyle="#000";pc.fillStyle=c;const s=pc.fillStyle;return CC[c]=s[0]==="#"?[1,3,5].map(i=>parseInt(s.slice(i,i+2),16)):s.slice(s.indexOf("(")+1).split(",").slice(0,3).map(parseFloat)};
const mix=(a,b,p)=>[a[0]+(b[0]-a[0])*p,a[1]+(b[1]-a[1])*p,a[2]+(b[2]-a[2])*p];
const css=(a,o)=>o===undefined?"rgb("+(a[0]|0)+","+(a[1]|0)+","+(a[2]|0)+")":"rgba("+(a[0]|0)+","+(a[1]|0)+","+(a[2]|0)+","+o+")";
const lum=a=>(a[0]*.299+a[1]*.587+a[2]*.114)/255;const m={x:-1e4,y:-1e4,vx:0,vy:0,on:false};const mv=e=>{const r=el.getBoundingClientRect();if(!r.width)return;const nx=(e.clientX-r.left)*W/r.width,ny=(e.clientY-r.top)*H/r.height;if(m.on){m.vx=nx-m.x;m.vy=ny-m.y}m.x=nx;m.y=ny;m.on=true};const lv=()=>{m.on=false;m.x=m.y=-1e4;m.vx=m.vy=0};el.addEventListener("pointermove",mv);el.addEventListener("pointerdown",mv);el.addEventListener("pointerleave",lv);el.addEventListener("pointercancel",lv);
const PAT=(i,r)=>{const b=((r%32)+32)%32,q=((i%12)+12)%12;if(b<2||b===31)return 0;if(b===2||b===14||b===16||b===30)return 1;if(b===3||b===13||b===17||b===29)return (i+b)%2?1:0;
if(b>=4&&b<=12){const s=Math.abs(b-8)+Math.abs(q-6);return s<=4?(s%2?2:1):0}if(b===15)return 2;
const dy=Math.abs(b-23),dx=Math.abs(((i+6)%12+12)%12-6);return dy<=4&&dx<=4&&(dx===dy||dx===0||dy===0)?1:0};
let SP=[],key="",off=0,px=-1e4,py=-1e4,pa=0;
const sprite=(c,w,h)=>{const r=Math.min(window.devicePixelRatio||1,2),o=document.createElement("canvas");o.width=Math.ceil(w*r);o.height=Math.ceil(h*1.5*r);const g=o.getContext("2d");g.scale(r,r);const b=rgb(c),lt=css(mix(b,[255,255,255],.32)),dk=css(mix(b,[0,0,0],.42));
for(const s of[-1,1]){g.save();g.translate(w/2+s*w*.21,h*.74);g.rotate(s*.5);const gr=g.createRadialGradient(-w*.05,-h*.15,0,0,0,h*.62);gr.addColorStop(0,lt);gr.addColorStop(.5,css(b));gr.addColorStop(1,dk);g.fillStyle=gr;g.beginPath();g.ellipse(0,0,w*.25,h*.6,0,0,6.2832);g.fill();g.lineWidth=.7;g.strokeStyle="rgba(0,0,0,.3)";g.stroke();g.lineWidth=.6;g.strokeStyle="rgba(255,255,255,.22)";g.beginPath();g.moveTo(-w*.06,-h*.38);g.quadraticCurveTo(w*.05,0,-w*.02,h*.36);g.stroke();g.restore()}return o};
const loop=()=>{const v=V(),w=Math.max(9,Math.round(17/v.d)),h=Math.round(w*.8),k=v.c1+v.c2+v.c3+w;if(k!==key){key=k;SP=[v.c3,v.c1,v.c2].map(c=>sprite(c,w,h))}
off+=.28*v.k;const r0=Math.floor(off/h),fy=off-r0*h;pa+=((m.on?1:0)-pa)*.1;if(m.on){if(px<-9e3){px=m.x;py=m.y}px+=(m.x-px)*.3;py+=(m.y-py)*.3}
x.fillStyle=css(mix(rgb(v.c3),[0,0,0],.6));x.fillRect(0,0,W,H);
const nx=Math.ceil(W/w)+1,ny=Math.ceil(H/h)+2,R=Math.max(W,H)*.15,R2=R*R;
for(let j=-1;j<ny;j++){const row=j+r0,y=j*h-fy;for(let i=0;i<nx;i++){let sc=1,dx=0,dy=0;
if(pa>.01){const ex=i*w+w/2-px,ey=y+h/2-py,d2=ex*ex+ey*ey;if(d2<R2*4){const f=Math.exp(-d2/R2)*pa;sc=1+.32*f;dx=ex*.22*f;dy=ey*.22*f}}
const S=SP[PAT(i,row)],ww=w*sc,hh=h*1.5*sc;x.drawImage(S,i*w+dx-(ww-w)/2,y-h*.3+dy-(hh-h*1.5)/2,ww,hh)}}
raf=requestAnimationFrame(loop)};loop();
return()=>{dead=true;cancelAnimationFrame(raf);ro.disconnect();io.disconnect();el.removeEventListener("pointermove",mv);el.removeEventListener("pointerdown",mv);el.removeEventListener("pointerleave",lv);el.removeEventListener("pointercancel",lv)};
})(document.querySelector(".pt-uvq16-knit"));
```

### React

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

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

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

.pt-uvq16-knit canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

`;

export default function PatternUvq16Knit() {
  const ref = useRef(null);
  useEffect(() => {
    const el = ref.current;
    if (!el) return;
const cv=el.querySelector("canvas"),x=cv.getContext("2d");let W=0,H=0,raf=0,LF=null,pend=null,vis=true,dead=false,RF=0;
const RM=matchMedia("(prefers-reduced-motion: reduce)").matches;
const fit=()=>{const r=Math.min(window.devicePixelRatio||1,2),w=el.clientWidth,h=el.clientHeight;if(w===W&&h===H&&cv.width===Math.round(w*r))return;W=w;H=h;cv.width=Math.round(w*r);cv.height=Math.round(h*r);x.setTransform(r,0,0,r,0,0);if(RM&&LF){RF=0;LF()}};
const ro=new ResizeObserver(fit);ro.observe(el);fit();
const io=new IntersectionObserver(e=>{vis=e[e.length-1].isIntersecting;if(vis&&pend&&!dead){const f=pend;pend=null;raf=window.requestAnimationFrame(f)}});io.observe(el);
const requestAnimationFrame=f=>{LF=f;if(dead)return 0;if(RM){if(++RF<90)f();return 0}if(!vis){pend=f;return 0}return window.requestAnimationFrame(f)};
const V=()=>{const s=getComputedStyle(el),g=n=>s.getPropertyValue(n).trim();return{c1:g("--c1"),c2:g("--c2"),c3:g("--c3"),bg:g("--bg")||"#05060a",k:+g("--k")||1,d:+g("--d")||1}};
const pc=document.createElement("canvas").getContext("2d"),CC={};
const rgb=c=>{if(CC[c])return CC[c];pc.fillStyle="#000";pc.fillStyle=c;const s=pc.fillStyle;return CC[c]=s[0]==="#"?[1,3,5].map(i=>parseInt(s.slice(i,i+2),16)):s.slice(s.indexOf("(")+1).split(",").slice(0,3).map(parseFloat)};
const mix=(a,b,p)=>[a[0]+(b[0]-a[0])*p,a[1]+(b[1]-a[1])*p,a[2]+(b[2]-a[2])*p];
const css=(a,o)=>o===undefined?"rgb("+(a[0]|0)+","+(a[1]|0)+","+(a[2]|0)+")":"rgba("+(a[0]|0)+","+(a[1]|0)+","+(a[2]|0)+","+o+")";
const lum=a=>(a[0]*.299+a[1]*.587+a[2]*.114)/255;const m={x:-1e4,y:-1e4,vx:0,vy:0,on:false};const mv=e=>{const r=el.getBoundingClientRect();if(!r.width)return;const nx=(e.clientX-r.left)*W/r.width,ny=(e.clientY-r.top)*H/r.height;if(m.on){m.vx=nx-m.x;m.vy=ny-m.y}m.x=nx;m.y=ny;m.on=true};const lv=()=>{m.on=false;m.x=m.y=-1e4;m.vx=m.vy=0};el.addEventListener("pointermove",mv);el.addEventListener("pointerdown",mv);el.addEventListener("pointerleave",lv);el.addEventListener("pointercancel",lv);
const PAT=(i,r)=>{const b=((r%32)+32)%32,q=((i%12)+12)%12;if(b<2||b===31)return 0;if(b===2||b===14||b===16||b===30)return 1;if(b===3||b===13||b===17||b===29)return (i+b)%2?1:0;
if(b>=4&&b<=12){const s=Math.abs(b-8)+Math.abs(q-6);return s<=4?(s%2?2:1):0}if(b===15)return 2;
const dy=Math.abs(b-23),dx=Math.abs(((i+6)%12+12)%12-6);return dy<=4&&dx<=4&&(dx===dy||dx===0||dy===0)?1:0};
let SP=[],key="",off=0,px=-1e4,py=-1e4,pa=0;
const sprite=(c,w,h)=>{const r=Math.min(window.devicePixelRatio||1,2),o=document.createElement("canvas");o.width=Math.ceil(w*r);o.height=Math.ceil(h*1.5*r);const g=o.getContext("2d");g.scale(r,r);const b=rgb(c),lt=css(mix(b,[255,255,255],.32)),dk=css(mix(b,[0,0,0],.42));
for(const s of[-1,1]){g.save();g.translate(w/2+s*w*.21,h*.74);g.rotate(s*.5);const gr=g.createRadialGradient(-w*.05,-h*.15,0,0,0,h*.62);gr.addColorStop(0,lt);gr.addColorStop(.5,css(b));gr.addColorStop(1,dk);g.fillStyle=gr;g.beginPath();g.ellipse(0,0,w*.25,h*.6,0,0,6.2832);g.fill();g.lineWidth=.7;g.strokeStyle="rgba(0,0,0,.3)";g.stroke();g.lineWidth=.6;g.strokeStyle="rgba(255,255,255,.22)";g.beginPath();g.moveTo(-w*.06,-h*.38);g.quadraticCurveTo(w*.05,0,-w*.02,h*.36);g.stroke();g.restore()}return o};
const loop=()=>{const v=V(),w=Math.max(9,Math.round(17/v.d)),h=Math.round(w*.8),k=v.c1+v.c2+v.c3+w;if(k!==key){key=k;SP=[v.c3,v.c1,v.c2].map(c=>sprite(c,w,h))}
off+=.28*v.k;const r0=Math.floor(off/h),fy=off-r0*h;pa+=((m.on?1:0)-pa)*.1;if(m.on){if(px<-9e3){px=m.x;py=m.y}px+=(m.x-px)*.3;py+=(m.y-py)*.3}
x.fillStyle=css(mix(rgb(v.c3),[0,0,0],.6));x.fillRect(0,0,W,H);
const nx=Math.ceil(W/w)+1,ny=Math.ceil(H/h)+2,R=Math.max(W,H)*.15,R2=R*R;
for(let j=-1;j<ny;j++){const row=j+r0,y=j*h-fy;for(let i=0;i<nx;i++){let sc=1,dx=0,dy=0;
if(pa>.01){const ex=i*w+w/2-px,ey=y+h/2-py,d2=ex*ex+ey*ey;if(d2<R2*4){const f=Math.exp(-d2/R2)*pa;sc=1+.32*f;dx=ex*.22*f;dy=ey*.22*f}}
const S=SP[PAT(i,row)],ww=w*sc,hh=h*1.5*sc;x.drawImage(S,i*w+dx-(ww-w)/2,y-h*.3+dy-(hh-h*1.5)/2,ww,hh)}}
raf=requestAnimationFrame(loop)};loop();
return()=>{dead=true;cancelAnimationFrame(raf);ro.disconnect();io.disconnect();el.removeEventListener("pointermove",mv);el.removeEventListener("pointerdown",mv);el.removeEventListener("pointerleave",lv);el.removeEventListener("pointercancel",lv)};
  }, []);
  return (
    <>
      <style>{css}</style>
      <div
        ref={ref}
        className="pt-uvq16-knit"
        style={{
          "--c1": "#f2e6cf",
          "--c2": "#b4442f",
          "--c3": "#2f5d50",
          "--k": 1,
          "--d": 1,
          "--o": 1,
          "--bg": "#05060a",
          "--fg": "#ffffff",
          "--blend": "screen",
          minHeight: "100vh",
        }}
      >
        <canvas></canvas>
      </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 “Knitted Fair Isle sweater” block (Backgrounds) from AIMRAN Library to my project.

## What it is
Wool V stitches with diamond and star bands that knit their way upwards, while the pointer stretches the fabric, on canvas.

## Chosen settings
- Color 1: #f2e6cf
- Color 2: #b4442f
- Color 3: #2f5d50
- 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-knit {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg);
  container-type: size;
  isolation: isolate;
}

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

.pt-uvq16-knit canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

`;

export default function PatternUvq16Knit() {
  const ref = useRef(null);
  useEffect(() => {
    const el = ref.current;
    if (!el) return;
const cv=el.querySelector("canvas"),x=cv.getContext("2d");let W=0,H=0,raf=0,LF=null,pend=null,vis=true,dead=false,RF=0;
const RM=matchMedia("(prefers-reduced-motion: reduce)").matches;
const fit=()=>{const r=Math.min(window.devicePixelRatio||1,2),w=el.clientWidth,h=el.clientHeight;if(w===W&&h===H&&cv.width===Math.round(w*r))return;W=w;H=h;cv.width=Math.round(w*r);cv.height=Math.round(h*r);x.setTransform(r,0,0,r,0,0);if(RM&&LF){RF=0;LF()}};
const ro=new ResizeObserver(fit);ro.observe(el);fit();
const io=new IntersectionObserver(e=>{vis=e[e.length-1].isIntersecting;if(vis&&pend&&!dead){const f=pend;pend=null;raf=window.requestAnimationFrame(f)}});io.observe(el);
const requestAnimationFrame=f=>{LF=f;if(dead)return 0;if(RM){if(++RF<90)f();return 0}if(!vis){pend=f;return 0}return window.requestAnimationFrame(f)};
const V=()=>{const s=getComputedStyle(el),g=n=>s.getPropertyValue(n).trim();return{c1:g("--c1"),c2:g("--c2"),c3:g("--c3"),bg:g("--bg")||"#05060a",k:+g("--k")||1,d:+g("--d")||1}};
const pc=document.createElement("canvas").getContext("2d"),CC={};
const rgb=c=>{if(CC[c])return CC[c];pc.fillStyle="#000";pc.fillStyle=c;const s=pc.fillStyle;return CC[c]=s[0]==="#"?[1,3,5].map(i=>parseInt(s.slice(i,i+2),16)):s.slice(s.indexOf("(")+1).split(",").slice(0,3).map(parseFloat)};
const mix=(a,b,p)=>[a[0]+(b[0]-a[0])*p,a[1]+(b[1]-a[1])*p,a[2]+(b[2]-a[2])*p];
const css=(a,o)=>o===undefined?"rgb("+(a[0]|0)+","+(a[1]|0)+","+(a[2]|0)+")":"rgba("+(a[0]|0)+","+(a[1]|0)+","+(a[2]|0)+","+o+")";
const lum=a=>(a[0]*.299+a[1]*.587+a[2]*.114)/255;const m={x:-1e4,y:-1e4,vx:0,vy:0,on:false};const mv=e=>{const r=el.getBoundingClientRect();if(!r.width)return;const nx=(e.clientX-r.left)*W/r.width,ny=(e.clientY-r.top)*H/r.height;if(m.on){m.vx=nx-m.x;m.vy=ny-m.y}m.x=nx;m.y=ny;m.on=true};const lv=()=>{m.on=false;m.x=m.y=-1e4;m.vx=m.vy=0};el.addEventListener("pointermove",mv);el.addEventListener("pointerdown",mv);el.addEventListener("pointerleave",lv);el.addEventListener("pointercancel",lv);
const PAT=(i,r)=>{const b=((r%32)+32)%32,q=((i%12)+12)%12;if(b<2||b===31)return 0;if(b===2||b===14||b===16||b===30)return 1;if(b===3||b===13||b===17||b===29)return (i+b)%2?1:0;
if(b>=4&&b<=12){const s=Math.abs(b-8)+Math.abs(q-6);return s<=4?(s%2?2:1):0}if(b===15)return 2;
const dy=Math.abs(b-23),dx=Math.abs(((i+6)%12+12)%12-6);return dy<=4&&dx<=4&&(dx===dy||dx===0||dy===0)?1:0};
let SP=[],key="",off=0,px=-1e4,py=-1e4,pa=0;
const sprite=(c,w,h)=>{const r=Math.min(window.devicePixelRatio||1,2),o=document.createElement("canvas");o.width=Math.ceil(w*r);o.height=Math.ceil(h*1.5*r);const g=o.getContext("2d");g.scale(r,r);const b=rgb(c),lt=css(mix(b,[255,255,255],.32)),dk=css(mix(b,[0,0,0],.42));
for(const s of[-1,1]){g.save();g.translate(w/2+s*w*.21,h*.74);g.rotate(s*.5);const gr=g.createRadialGradient(-w*.05,-h*.15,0,0,0,h*.62);gr.addColorStop(0,lt);gr.addColorStop(.5,css(b));gr.addColorStop(1,dk);g.fillStyle=gr;g.beginPath();g.ellipse(0,0,w*.25,h*.6,0,0,6.2832);g.fill();g.lineWidth=.7;g.strokeStyle="rgba(0,0,0,.3)";g.stroke();g.lineWidth=.6;g.strokeStyle="rgba(255,255,255,.22)";g.beginPath();g.moveTo(-w*.06,-h*.38);g.quadraticCurveTo(w*.05,0,-w*.02,h*.36);g.stroke();g.restore()}return o};
const loop=()=>{const v=V(),w=Math.max(9,Math.round(17/v.d)),h=Math.round(w*.8),k=v.c1+v.c2+v.c3+w;if(k!==key){key=k;SP=[v.c3,v.c1,v.c2].map(c=>sprite(c,w,h))}
off+=.28*v.k;const r0=Math.floor(off/h),fy=off-r0*h;pa+=((m.on?1:0)-pa)*.1;if(m.on){if(px<-9e3){px=m.x;py=m.y}px+=(m.x-px)*.3;py+=(m.y-py)*.3}
x.fillStyle=css(mix(rgb(v.c3),[0,0,0],.6));x.fillRect(0,0,W,H);
const nx=Math.ceil(W/w)+1,ny=Math.ceil(H/h)+2,R=Math.max(W,H)*.15,R2=R*R;
for(let j=-1;j<ny;j++){const row=j+r0,y=j*h-fy;for(let i=0;i<nx;i++){let sc=1,dx=0,dy=0;
if(pa>.01){const ex=i*w+w/2-px,ey=y+h/2-py,d2=ex*ex+ey*ey;if(d2<R2*4){const f=Math.exp(-d2/R2)*pa;sc=1+.32*f;dx=ex*.22*f;dy=ey*.22*f}}
const S=SP[PAT(i,row)],ww=w*sc,hh=h*1.5*sc;x.drawImage(S,i*w+dx-(ww-w)/2,y-h*.3+dy-(hh-h*1.5)/2,ww,hh)}}
raf=requestAnimationFrame(loop)};loop();
return()=>{dead=true;cancelAnimationFrame(raf);ro.disconnect();io.disconnect();el.removeEventListener("pointermove",mv);el.removeEventListener("pointerdown",mv);el.removeEventListener("pointerleave",lv);el.removeEventListener("pointercancel",lv)};
  }, []);
  return (
    <>
      <style>{css}</style>
      <div
        ref={ref}
        className="pt-uvq16-knit"
        style={{
          "--c1": "#f2e6cf",
          "--c2": "#b4442f",
          "--c3": "#2f5d50",
          "--k": 1,
          "--d": 1,
          "--o": 1,
          "--bg": "#05060a",
          "--fg": "#ffffff",
          "--blend": "screen",
          minHeight: "100vh",
        }}
      >
        <canvas></canvas>
      </div>
    </>
  );
}
```

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