# Profile photo crop modal

> A dark editor with a round mask: drag to frame, zoom and rotate, and the small previews update as you go.

- Category: [Overlays](https://library.aimran.es/components/overlays)
- Built with: HTML + CSS
- Live editor: https://library.aimran.es/blocks/uv-ov-avatar-crop
- Library: AIMRAN Library (https://library.aimran.es), free, no sign-up, by Aimran Oukham

## Where to use it

Uploading a profile picture usually ends in a crop step, and this modal makes it pleasant. The photo sits under a circular mask with the outside dimmed, a rule of thirds grid appears while you drag, and the zoom slider, the mouse wheel and a rotate button change the framing. Two small round previews show how it will look in lists. It suits sign up flows, settings and team directories.

The main color is the save button and the focus ring, the second one the editor background. The image cannot leave the circle, arrows and plus or minus keys work from the keyboard, and saving copies the framing to the avatar on the page.

## Code

### HTML

```html
<div class="uvq13-crp"><div class="pf"><span class="pv cur" aria-hidden="true"><i class="im"></i></span><span class="who"><b>Ana Torres</b><small>Interior designer</small></span><button type="button" class="fire" aria-haspopup="dialog">Change photo</button></div><div class="ln" aria-hidden="true"><i></i><i></i><i class="s"></i></div><div class="scr"></div><div class="dl" role="dialog" aria-modal="true" aria-labelledby="uvq13-crp-t"><header><b id="uvq13-crp-t">Crop photo</b><span class="pvs" aria-hidden="true"><span class="pv p1"><i class="im"></i></span><span class="pv p2"><i class="im"></i></span></span></header><div class="ar" tabindex="0" role="group" aria-label="Crop area" aria-describedby="uvq13-crp-h"><i class="im"></i><i class="mk"></i></div><p class="hn" id="uvq13-crp-h">Drag to frame</p><div class="zm"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="6.5"/><path d="M20 20l-4.2-4.2M8.5 11h5"/></svg><input type="range" min="100" max="300" step="1" aria-label="Zoom"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="6.5"/><path d="M20 20l-4.2-4.2M8.5 11h5M11 8.5v5"/></svg><button type="button" class="rt" aria-label="Rotate 90 degrees"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4.5 12a7.5 7.5 0 1 0 2.2-5.3M4.5 4v4h4"/></svg></button></div><div class="ac"><button type="button" class="cn">Cancel</button><button type="button" class="ok">Save photo</button></div></div></div>
```

### CSS

```css
.uvq13-crp {
  --c1: #2dd4bf;
  --c2: #101418;
  --s: 16px;
  /* tamaño */
  --k: 1;
  /* velocidad */
  --fg: #1d1d1f;
  /* texto */
  --bg: #f5f5f7;
  /* fondo */
}

.uvq13-crp {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  font-size: var(--s);
  color: var(--fg);
  -webkit-tap-highlight-color: transparent;
  position: relative;
  width: 22em;
  height: 20em;
  border-radius: 1.2em;
  overflow: hidden;
  background: color-mix(in srgb,var(--fg) 3%,var(--bg));
  box-shadow: 0 0 0 1px color-mix(in srgb,var(--fg) 9%,transparent);
}

.uvq13-crp .pf {
  display: flex;
  align-items: center;
  gap: .8em;
  padding: 1.2em;
}

.uvq13-crp .who {
  flex: 1;
  min-width: 0;
  display: grid;
}

.uvq13-crp .who small {
  font-size: .74em;
  color: color-mix(in srgb,var(--fg) 55%,transparent);
}

.uvq13-crp .fire {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  padding: .55em .9em;
  border-radius: 2em;
  font-size: .78em;
  font-weight: 700;
  color: var(--bg);
  background: var(--fg);
  transition: transform calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq13-crp .fire:active {
  transform: scale(.95);
}

.uvq13-crp .ln {
  display: grid;
  gap: .55em;
  padding: 0 1.2em;
}

.uvq13-crp .ln i {
  height: .6em;
  border-radius: 1em;
  background: color-mix(in srgb,var(--fg) 6%,transparent);
}

.uvq13-crp .ln .s {
  width: 60%;
}

.uvq13-crp .im {
  position: absolute;
  left: 0;
  top: 0;
  width: 11em;
  height: 11em;
  background: radial-gradient(circle at 45.5% 40%,#1f1f1f 0 .8%,transparent 1%),radial-gradient(circle at 54.5% 40%,#1f1f1f 0 .8%,transparent 1%),radial-gradient(circle at 50% 41%,#f2c6a0 0 13%,transparent 13.4%),radial-gradient(circle at 50% 35%,#3b2314 0 17.5%,transparent 18%),radial-gradient(ellipse 7% 9% at 50% 57%,#e3ad83 0 98%,transparent 100%),radial-gradient(ellipse 31% 22% at 50% 84%,#0f766e 0 98%,transparent 100%),radial-gradient(circle at 18% 22%,rgba(255,255,255,.55) 0 6%,transparent 6.5%),radial-gradient(circle at 84% 68%,rgba(255,255,255,.35) 0 9%,transparent 9.5%),linear-gradient(160deg,#fcd34d,#fb7185 55%,#a855f7);
  transform: translate(calc(var(--x,0) * 1em),calc(var(--y,0) * 1em)) rotate(calc(var(--r,0) * 1deg)) scale(var(--z,1));
  transition: transform calc(0.3s / var(--k)) cubic-bezier(.22,1,.36,1);
}

.uvq13-crp .dr .im {
  transition: none;
}

.uvq13-crp .pv {
  position: relative;
  display: block;
  flex: none;
  width: 8.6em;
  height: 8.6em;
  border-radius: 50%;
  overflow: hidden;
  font-size: .42em;
  box-shadow: 0 0 0 .3em var(--bg),0 0 0 .5em color-mix(in srgb,var(--fg) 9%,transparent);
}

.uvq13-crp .pv .im {
  left: -1.2em;
  top: -1.2em;
}

.uvq13-crp .cur.pop {
  animation: uvq13-crp-p calc(0.5s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq13-crp .scr {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: rgba(10,12,20,.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq13-crp.open .scr {
  opacity: 1;
  pointer-events: auto;
}

.uvq13-crp .dl {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  box-sizing: border-box;
  transform: translate(-50%,-46%) scale(.95);
  opacity: 0;
  pointer-events: none;
  transition: transform calc(0.35s / var(--k)) cubic-bezier(.22,1,.36,1),opacity calc(0.25s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq13-crp.open .dl {
  transform: translate(-50%,-50%);
  opacity: 1;
  pointer-events: auto;
}

.uvq13-crp .dl {
  font-size: .86em;
  width: 13.4em;
  padding: .9em;
  border-radius: 1.2em;
  color: #f4f4f5;
  background: var(--c2);
  box-shadow: 0 1.6em 3em -1em rgba(0,0,0,.6),0 0 0 1px rgba(255,255,255,.07);
}

.uvq13-crp header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .7em;
}

.uvq13-crp header b {
  font-size: .92em;
}

.uvq13-crp .pvs {
  display: flex;
  align-items: center;
  gap: .6em;
}

.uvq13-crp .pvs .pv {
  box-shadow: 0 0 0 .3em var(--c2),0 0 0 .5em rgba(255,255,255,.25);
}

.uvq13-crp .p1 {
  font-size: .28em;
}

.uvq13-crp .p2 {
  font-size: .17em;
}

.uvq13-crp .ar {
  position: relative;
  width: 11em;
  height: 11em;
  margin: 0 auto;
  border-radius: .7em;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  outline: 0;
  background: #000;
}

.uvq13-crp .ar:focus-visible {
  box-shadow: 0 0 0 2px var(--c1);
}

.uvq13-crp .dr .ar {
  cursor: grabbing;
}

.uvq13-crp .mk {
  position: absolute;
  left: 1.2em;
  top: 1.2em;
  width: 8.6em;
  height: 8.6em;
  border-radius: 50%;
  box-shadow: 0 0 0 12em rgba(0,0,0,.58),inset 0 0 0 2px rgba(255,255,255,.9);
  pointer-events: none;
}

.uvq13-crp .mk::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(90deg,transparent calc(33.3% - .5px),rgba(255,255,255,.5) 0 calc(33.3% + .5px),transparent 0 calc(66.6% - .5px),rgba(255,255,255,.5) 0 calc(66.6% + .5px),transparent 0),linear-gradient(180deg,transparent calc(33.3% - .5px),rgba(255,255,255,.5) 0 calc(33.3% + .5px),transparent 0 calc(66.6% - .5px),rgba(255,255,255,.5) 0 calc(66.6% + .5px),transparent 0);
  opacity: 0;
  transition: opacity calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq13-crp .dr .mk::before {
  opacity: 1;
}

.uvq13-crp .hn {
  margin: .55em 0 .3em;
  text-align: center;
  font-size: .64em;
  color: rgba(255,255,255,.55);
}

.uvq13-crp .zm {
  display: flex;
  align-items: center;
  gap: .45em;
}

.uvq13-crp .zm svg {
  flex: none;
  width: 1em;
  height: 1em;
  color: rgba(255,255,255,.6);
}

.uvq13-crp .zm input {
  flex: 1;
  min-width: 0;
  accent-color: var(--c1);
}

.uvq13-crp .rt {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: grid;
  place-items: center;
  flex: none;
  width: 2em;
  height: 2em;
  border-radius: 50%;
  color: #fff;
  background: rgba(255,255,255,.1);
  transition: transform calc(0.3s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq13-crp .rt:active {
  transform: rotate(30deg);
}

.uvq13-crp .rt svg {
  width: 1.05em;
  height: 1.05em;
  color: #fff;
}

.uvq13-crp .ac {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: .45em;
  margin-top: .8em;
}

.uvq13-crp .ac button {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  padding: .65em;
  border-radius: .7em;
  font-size: .78em;
  font-weight: 700;
  color: #fff;
  background: rgba(255,255,255,.1);
}

.uvq13-crp .ac .ok {
  color: #04221f;
  background: var(--c1);
}

.uvq13-crp button:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

@keyframes uvq13-crp-p {
  40% {
    transform: scale(1.15);
  }
}

@media (prefers-reduced-motion:reduce) {
  .uvq13-crp,.uvq13-crp *,.uvq13-crp *::before,.uvq13-crp *::after {
    animation-duration: .01ms!important;
    animation-iteration-count: 1!important;
    transition-duration: .01ms!important;
  }
}
```

### JavaScript

```js
document.querySelectorAll(".uvq13-crp").forEach(el => {
  const fire=el.querySelector(".fire"),scr=el.querySelector(".scr"),pnl=el.querySelector(".dl");let tms=[];const later=(f,ms)=>tms.push(setTimeout(f,ms));
const foc=(t,ms)=>later(()=>{const n=typeof t==="string"?el.querySelector(t):t;n&&n.focus({preventScroll:true})},ms||0);
const isOpen=()=>el.classList.contains("open");
const open=u=>{if(isOpen())return;el.classList.add("open");pnl.inert=false;fire&&fire.setAttribute("aria-expanded","true");load();u&&foc(ar,300)};
const close=()=>{if(!isOpen())return;el.classList.remove("open");pnl.inert=true;fire&&fire.setAttribute("aria-expanded","false");;fire&&fire.focus({preventScroll:true})};
fire&&fire.addEventListener("click",()=>isOpen()?close():open(true));scr&&scr.addEventListener("click",()=>close());
el.addEventListener("keydown",e=>{if(!isOpen())return;if(e.key==="Escape"){e.preventDefault();e.stopPropagation();close()}else if(e.key==="Tab"){const f=[...pnl.querySelectorAll('button:not([disabled]),input:not([disabled]),textarea,a[href],[tabindex="0"]')].filter(x=>x.getClientRects().length);if(!f.length){e.preventDefault();return}const a=f[0],z=f[f.length-1],ac=document.activeElement;if(e.shiftKey&&(ac===a||!pnl.contains(ac))){e.preventDefault();z.focus()}else if(!e.shiftKey&&(ac===z||!pnl.contains(ac))){e.preventDefault();a.focus()}}});
pnl.inert=true;later(()=>open(false),500);const dl=el.querySelector(".dl"),ar=el.querySelector(".ar"),rg=el.querySelector(".zm input"),cur=el.querySelector(".cur");const st={x:0,y:.2,z:1.15,r:0};let v={...st},d=null;
const lim=()=>{const m=Math.max(0,5.5*v.z-4.3);v.x=Math.max(-m,Math.min(m,v.x));v.y=Math.max(-m,Math.min(m,v.y))};
const paint=(n,o)=>{n.style.setProperty("--x",o.x.toFixed(3));n.style.setProperty("--y",o.y.toFixed(3));n.style.setProperty("--z",o.z.toFixed(3));n.style.setProperty("--r",String(o.r))};
const apply=()=>{lim();paint(dl,v);rg.value=String(Math.round(v.z*100))};
const load=()=>{v={...st};apply()};
const em=()=>parseFloat(getComputedStyle(ar).fontSize)*(el.getBoundingClientRect().width/el.offsetWidth||1);
ar.addEventListener("pointerdown",e=>{d={px:e.clientX,py:e.clientY,x:v.x,y:v.y,e:em()};ar.setPointerCapture(e.pointerId);dl.classList.add("dr")});
ar.addEventListener("pointermove",e=>{if(!d)return;v.x=d.x+(e.clientX-d.px)/d.e;v.y=d.y+(e.clientY-d.py)/d.e;apply()});
const up=()=>{d=null;dl.classList.remove("dr")};ar.addEventListener("pointerup",up);ar.addEventListener("pointercancel",up);
ar.addEventListener("wheel",e=>{if(!isOpen())return;e.preventDefault();v.z=Math.max(1,Math.min(3,v.z-e.deltaY*.002));apply()},{passive:false});
rg.addEventListener("input",()=>{v.z=+rg.value/100;apply()});el.querySelector(".rt").addEventListener("click",()=>{v.r+=90;apply()});
ar.addEventListener("keydown",e=>{const m={ArrowLeft:[-.3,0],ArrowRight:[.3,0],ArrowUp:[0,-.3],ArrowDown:[0,.3]}[e.key];if(m){e.preventDefault();v.x+=m[0];v.y+=m[1];apply()}else if(e.key==="+"||e.key==="="){e.preventDefault();v.z=Math.min(3,v.z+.1);apply()}else if(e.key==="-"){e.preventDefault();v.z=Math.max(1,v.z-.1);apply()}});
el.querySelector(".cn").addEventListener("click",close);
el.querySelector(".ok").addEventListener("click",()=>{Object.assign(st,v);paint(cur,st);cur.classList.remove("pop");void cur.offsetWidth;cur.classList.add("pop");close()});
paint(cur,st);load();return()=>tms.forEach(clearTimeout)
});
```

### React

```tsx
// @ts-nocheck: setup() es JavaScript del DOM sin tipos, el mismo de la pestaña JS.
import { useEffect, useRef, type CSSProperties } from "react";

const css = `
.uvq13-crp {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  font-size: var(--s);
  color: var(--fg);
  -webkit-tap-highlight-color: transparent;
  position: relative;
  width: 22em;
  height: 20em;
  border-radius: 1.2em;
  overflow: hidden;
  background: color-mix(in srgb,var(--fg) 3%,var(--bg));
  box-shadow: 0 0 0 1px color-mix(in srgb,var(--fg) 9%,transparent);
}

.uvq13-crp .pf {
  display: flex;
  align-items: center;
  gap: .8em;
  padding: 1.2em;
}

.uvq13-crp .who {
  flex: 1;
  min-width: 0;
  display: grid;
}

.uvq13-crp .who small {
  font-size: .74em;
  color: color-mix(in srgb,var(--fg) 55%,transparent);
}

.uvq13-crp .fire {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  padding: .55em .9em;
  border-radius: 2em;
  font-size: .78em;
  font-weight: 700;
  color: var(--bg);
  background: var(--fg);
  transition: transform calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq13-crp .fire:active {
  transform: scale(.95);
}

.uvq13-crp .ln {
  display: grid;
  gap: .55em;
  padding: 0 1.2em;
}

.uvq13-crp .ln i {
  height: .6em;
  border-radius: 1em;
  background: color-mix(in srgb,var(--fg) 6%,transparent);
}

.uvq13-crp .ln .s {
  width: 60%;
}

.uvq13-crp .im {
  position: absolute;
  left: 0;
  top: 0;
  width: 11em;
  height: 11em;
  background: radial-gradient(circle at 45.5% 40%,#1f1f1f 0 .8%,transparent 1%),radial-gradient(circle at 54.5% 40%,#1f1f1f 0 .8%,transparent 1%),radial-gradient(circle at 50% 41%,#f2c6a0 0 13%,transparent 13.4%),radial-gradient(circle at 50% 35%,#3b2314 0 17.5%,transparent 18%),radial-gradient(ellipse 7% 9% at 50% 57%,#e3ad83 0 98%,transparent 100%),radial-gradient(ellipse 31% 22% at 50% 84%,#0f766e 0 98%,transparent 100%),radial-gradient(circle at 18% 22%,rgba(255,255,255,.55) 0 6%,transparent 6.5%),radial-gradient(circle at 84% 68%,rgba(255,255,255,.35) 0 9%,transparent 9.5%),linear-gradient(160deg,#fcd34d,#fb7185 55%,#a855f7);
  transform: translate(calc(var(--x,0) * 1em),calc(var(--y,0) * 1em)) rotate(calc(var(--r,0) * 1deg)) scale(var(--z,1));
  transition: transform calc(0.3s / var(--k)) cubic-bezier(.22,1,.36,1);
}

.uvq13-crp .dr .im {
  transition: none;
}

.uvq13-crp .pv {
  position: relative;
  display: block;
  flex: none;
  width: 8.6em;
  height: 8.6em;
  border-radius: 50%;
  overflow: hidden;
  font-size: .42em;
  box-shadow: 0 0 0 .3em var(--bg),0 0 0 .5em color-mix(in srgb,var(--fg) 9%,transparent);
}

.uvq13-crp .pv .im {
  left: -1.2em;
  top: -1.2em;
}

.uvq13-crp .cur.pop {
  animation: uvq13-crp-p calc(0.5s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq13-crp .scr {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: rgba(10,12,20,.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq13-crp.open .scr {
  opacity: 1;
  pointer-events: auto;
}

.uvq13-crp .dl {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  box-sizing: border-box;
  transform: translate(-50%,-46%) scale(.95);
  opacity: 0;
  pointer-events: none;
  transition: transform calc(0.35s / var(--k)) cubic-bezier(.22,1,.36,1),opacity calc(0.25s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq13-crp.open .dl {
  transform: translate(-50%,-50%);
  opacity: 1;
  pointer-events: auto;
}

.uvq13-crp .dl {
  font-size: .86em;
  width: 13.4em;
  padding: .9em;
  border-radius: 1.2em;
  color: #f4f4f5;
  background: var(--c2);
  box-shadow: 0 1.6em 3em -1em rgba(0,0,0,.6),0 0 0 1px rgba(255,255,255,.07);
}

.uvq13-crp header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .7em;
}

.uvq13-crp header b {
  font-size: .92em;
}

.uvq13-crp .pvs {
  display: flex;
  align-items: center;
  gap: .6em;
}

.uvq13-crp .pvs .pv {
  box-shadow: 0 0 0 .3em var(--c2),0 0 0 .5em rgba(255,255,255,.25);
}

.uvq13-crp .p1 {
  font-size: .28em;
}

.uvq13-crp .p2 {
  font-size: .17em;
}

.uvq13-crp .ar {
  position: relative;
  width: 11em;
  height: 11em;
  margin: 0 auto;
  border-radius: .7em;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  outline: 0;
  background: #000;
}

.uvq13-crp .ar:focus-visible {
  box-shadow: 0 0 0 2px var(--c1);
}

.uvq13-crp .dr .ar {
  cursor: grabbing;
}

.uvq13-crp .mk {
  position: absolute;
  left: 1.2em;
  top: 1.2em;
  width: 8.6em;
  height: 8.6em;
  border-radius: 50%;
  box-shadow: 0 0 0 12em rgba(0,0,0,.58),inset 0 0 0 2px rgba(255,255,255,.9);
  pointer-events: none;
}

.uvq13-crp .mk::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(90deg,transparent calc(33.3% - .5px),rgba(255,255,255,.5) 0 calc(33.3% + .5px),transparent 0 calc(66.6% - .5px),rgba(255,255,255,.5) 0 calc(66.6% + .5px),transparent 0),linear-gradient(180deg,transparent calc(33.3% - .5px),rgba(255,255,255,.5) 0 calc(33.3% + .5px),transparent 0 calc(66.6% - .5px),rgba(255,255,255,.5) 0 calc(66.6% + .5px),transparent 0);
  opacity: 0;
  transition: opacity calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq13-crp .dr .mk::before {
  opacity: 1;
}

.uvq13-crp .hn {
  margin: .55em 0 .3em;
  text-align: center;
  font-size: .64em;
  color: rgba(255,255,255,.55);
}

.uvq13-crp .zm {
  display: flex;
  align-items: center;
  gap: .45em;
}

.uvq13-crp .zm svg {
  flex: none;
  width: 1em;
  height: 1em;
  color: rgba(255,255,255,.6);
}

.uvq13-crp .zm input {
  flex: 1;
  min-width: 0;
  accent-color: var(--c1);
}

.uvq13-crp .rt {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: grid;
  place-items: center;
  flex: none;
  width: 2em;
  height: 2em;
  border-radius: 50%;
  color: #fff;
  background: rgba(255,255,255,.1);
  transition: transform calc(0.3s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq13-crp .rt:active {
  transform: rotate(30deg);
}

.uvq13-crp .rt svg {
  width: 1.05em;
  height: 1.05em;
  color: #fff;
}

.uvq13-crp .ac {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: .45em;
  margin-top: .8em;
}

.uvq13-crp .ac button {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  padding: .65em;
  border-radius: .7em;
  font-size: .78em;
  font-weight: 700;
  color: #fff;
  background: rgba(255,255,255,.1);
}

.uvq13-crp .ac .ok {
  color: #04221f;
  background: var(--c1);
}

.uvq13-crp button:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

@keyframes uvq13-crp-p {
  40% {
    transform: scale(1.15);
  }
}

@media (prefers-reduced-motion:reduce) {
  .uvq13-crp,.uvq13-crp *,.uvq13-crp *::before,.uvq13-crp *::after {
    animation-duration: .01ms!important;
    animation-iteration-count: 1!important;
    transition-duration: .01ms!important;
  }
}
`;

// Interacción en JavaScript del DOM: la misma que en la pestaña JS.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function setup(el: any) {
  const fire=el.querySelector(".fire"),scr=el.querySelector(".scr"),pnl=el.querySelector(".dl");let tms=[];const later=(f,ms)=>tms.push(setTimeout(f,ms));
const foc=(t,ms)=>later(()=>{const n=typeof t==="string"?el.querySelector(t):t;n&&n.focus({preventScroll:true})},ms||0);
const isOpen=()=>el.classList.contains("open");
const open=u=>{if(isOpen())return;el.classList.add("open");pnl.inert=false;fire&&fire.setAttribute("aria-expanded","true");load();u&&foc(ar,300)};
const close=()=>{if(!isOpen())return;el.classList.remove("open");pnl.inert=true;fire&&fire.setAttribute("aria-expanded","false");;fire&&fire.focus({preventScroll:true})};
fire&&fire.addEventListener("click",()=>isOpen()?close():open(true));scr&&scr.addEventListener("click",()=>close());
el.addEventListener("keydown",e=>{if(!isOpen())return;if(e.key==="Escape"){e.preventDefault();e.stopPropagation();close()}else if(e.key==="Tab"){const f=[...pnl.querySelectorAll('button:not([disabled]),input:not([disabled]),textarea,a[href],[tabindex="0"]')].filter(x=>x.getClientRects().length);if(!f.length){e.preventDefault();return}const a=f[0],z=f[f.length-1],ac=document.activeElement;if(e.shiftKey&&(ac===a||!pnl.contains(ac))){e.preventDefault();z.focus()}else if(!e.shiftKey&&(ac===z||!pnl.contains(ac))){e.preventDefault();a.focus()}}});
pnl.inert=true;later(()=>open(false),500);const dl=el.querySelector(".dl"),ar=el.querySelector(".ar"),rg=el.querySelector(".zm input"),cur=el.querySelector(".cur");const st={x:0,y:.2,z:1.15,r:0};let v={...st},d=null;
const lim=()=>{const m=Math.max(0,5.5*v.z-4.3);v.x=Math.max(-m,Math.min(m,v.x));v.y=Math.max(-m,Math.min(m,v.y))};
const paint=(n,o)=>{n.style.setProperty("--x",o.x.toFixed(3));n.style.setProperty("--y",o.y.toFixed(3));n.style.setProperty("--z",o.z.toFixed(3));n.style.setProperty("--r",String(o.r))};
const apply=()=>{lim();paint(dl,v);rg.value=String(Math.round(v.z*100))};
const load=()=>{v={...st};apply()};
const em=()=>parseFloat(getComputedStyle(ar).fontSize)*(el.getBoundingClientRect().width/el.offsetWidth||1);
ar.addEventListener("pointerdown",e=>{d={px:e.clientX,py:e.clientY,x:v.x,y:v.y,e:em()};ar.setPointerCapture(e.pointerId);dl.classList.add("dr")});
ar.addEventListener("pointermove",e=>{if(!d)return;v.x=d.x+(e.clientX-d.px)/d.e;v.y=d.y+(e.clientY-d.py)/d.e;apply()});
const up=()=>{d=null;dl.classList.remove("dr")};ar.addEventListener("pointerup",up);ar.addEventListener("pointercancel",up);
ar.addEventListener("wheel",e=>{if(!isOpen())return;e.preventDefault();v.z=Math.max(1,Math.min(3,v.z-e.deltaY*.002));apply()},{passive:false});
rg.addEventListener("input",()=>{v.z=+rg.value/100;apply()});el.querySelector(".rt").addEventListener("click",()=>{v.r+=90;apply()});
ar.addEventListener("keydown",e=>{const m={ArrowLeft:[-.3,0],ArrowRight:[.3,0],ArrowUp:[0,-.3],ArrowDown:[0,.3]}[e.key];if(m){e.preventDefault();v.x+=m[0];v.y+=m[1];apply()}else if(e.key==="+"||e.key==="="){e.preventDefault();v.z=Math.min(3,v.z+.1);apply()}else if(e.key==="-"){e.preventDefault();v.z=Math.max(1,v.z-.1);apply()}});
el.querySelector(".cn").addEventListener("click",close);
el.querySelector(".ok").addEventListener("click",()=>{Object.assign(st,v);paint(cur,st);cur.classList.remove("pop");void cur.offsetWidth;cur.classList.add("pop");close()});
paint(cur,st);load();return()=>tms.forEach(clearTimeout)
}

export default function OvAvatarCrop() {
  const ref = useRef<HTMLDivElement>(null);

  useEffect(() => {
    const el = ref.current?.firstElementChild;
    return el ? setup(el) : undefined;
  }, []);

  return (
    <>
      <style>{css}</style>
      <div
        ref={ref} style={{
          "--c1": "#2dd4bf",
          "--c2": "#101418",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uvq13-crp"><div className="pf"><span className="pv cur" aria-hidden="true"><i className="im"></i></span><span className="who"><b>Ana Torres</b><small>Interior designer</small></span><button type="button" className="fire" aria-haspopup="dialog">Change photo</button></div><div className="ln" aria-hidden="true"><i></i><i></i><i className="s"></i></div><div className="scr"></div><div className="dl" role="dialog" aria-modal="true" aria-labelledby="uvq13-crp-t"><header><b id="uvq13-crp-t">Crop photo</b><span className="pvs" aria-hidden="true"><span className="pv p1"><i className="im"></i></span><span className="pv p2"><i className="im"></i></span></span></header><div className="ar" tabIndex={0} role="group" aria-label="Crop area" aria-describedby="uvq13-crp-h"><i className="im"></i><i className="mk"></i></div><p className="hn" id="uvq13-crp-h">Drag to frame</p><div className="zm"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="6.5" /><path d="M20 20l-4.2-4.2M8.5 11h5" /></svg><input type="range" min="100" max="300" step="1" aria-label="Zoom" /><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="6.5" /><path d="M20 20l-4.2-4.2M8.5 11h5M11 8.5v5" /></svg><button type="button" className="rt" aria-label="Rotate 90 degrees"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"><path d="M4.5 12a7.5 7.5 0 1 0 2.2-5.3M4.5 4v4h4" /></svg></button></div><div className="ac"><button type="button" className="cn">Cancel</button><button type="button" className="ok">Save photo</button></div></div></div>
      </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 “Profile photo crop modal” block (Overlays) from AIMRAN Library to my project.

## What it is
A dark editor with a round mask: drag to frame, zoom and rotate, and the small previews update as you go.

## Chosen settings
- Main color: #2dd4bf
- Secondary color: #101418
- Size: 16px (from 12 to 24px)
- Speed: 1x (from 0.5 to 2x)
- Text: "Recortar foto"

## 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: setup() es JavaScript del DOM sin tipos, el mismo de la pestaña JS.
import { useEffect, useRef, type CSSProperties } from "react";

const css = `
.uvq13-crp {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  font-size: var(--s);
  color: var(--fg);
  -webkit-tap-highlight-color: transparent;
  position: relative;
  width: 22em;
  height: 20em;
  border-radius: 1.2em;
  overflow: hidden;
  background: color-mix(in srgb,var(--fg) 3%,var(--bg));
  box-shadow: 0 0 0 1px color-mix(in srgb,var(--fg) 9%,transparent);
}

.uvq13-crp .pf {
  display: flex;
  align-items: center;
  gap: .8em;
  padding: 1.2em;
}

.uvq13-crp .who {
  flex: 1;
  min-width: 0;
  display: grid;
}

.uvq13-crp .who small {
  font-size: .74em;
  color: color-mix(in srgb,var(--fg) 55%,transparent);
}

.uvq13-crp .fire {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  padding: .55em .9em;
  border-radius: 2em;
  font-size: .78em;
  font-weight: 700;
  color: var(--bg);
  background: var(--fg);
  transition: transform calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq13-crp .fire:active {
  transform: scale(.95);
}

.uvq13-crp .ln {
  display: grid;
  gap: .55em;
  padding: 0 1.2em;
}

.uvq13-crp .ln i {
  height: .6em;
  border-radius: 1em;
  background: color-mix(in srgb,var(--fg) 6%,transparent);
}

.uvq13-crp .ln .s {
  width: 60%;
}

.uvq13-crp .im {
  position: absolute;
  left: 0;
  top: 0;
  width: 11em;
  height: 11em;
  background: radial-gradient(circle at 45.5% 40%,#1f1f1f 0 .8%,transparent 1%),radial-gradient(circle at 54.5% 40%,#1f1f1f 0 .8%,transparent 1%),radial-gradient(circle at 50% 41%,#f2c6a0 0 13%,transparent 13.4%),radial-gradient(circle at 50% 35%,#3b2314 0 17.5%,transparent 18%),radial-gradient(ellipse 7% 9% at 50% 57%,#e3ad83 0 98%,transparent 100%),radial-gradient(ellipse 31% 22% at 50% 84%,#0f766e 0 98%,transparent 100%),radial-gradient(circle at 18% 22%,rgba(255,255,255,.55) 0 6%,transparent 6.5%),radial-gradient(circle at 84% 68%,rgba(255,255,255,.35) 0 9%,transparent 9.5%),linear-gradient(160deg,#fcd34d,#fb7185 55%,#a855f7);
  transform: translate(calc(var(--x,0) * 1em),calc(var(--y,0) * 1em)) rotate(calc(var(--r,0) * 1deg)) scale(var(--z,1));
  transition: transform calc(0.3s / var(--k)) cubic-bezier(.22,1,.36,1);
}

.uvq13-crp .dr .im {
  transition: none;
}

.uvq13-crp .pv {
  position: relative;
  display: block;
  flex: none;
  width: 8.6em;
  height: 8.6em;
  border-radius: 50%;
  overflow: hidden;
  font-size: .42em;
  box-shadow: 0 0 0 .3em var(--bg),0 0 0 .5em color-mix(in srgb,var(--fg) 9%,transparent);
}

.uvq13-crp .pv .im {
  left: -1.2em;
  top: -1.2em;
}

.uvq13-crp .cur.pop {
  animation: uvq13-crp-p calc(0.5s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq13-crp .scr {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: rgba(10,12,20,.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq13-crp.open .scr {
  opacity: 1;
  pointer-events: auto;
}

.uvq13-crp .dl {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  box-sizing: border-box;
  transform: translate(-50%,-46%) scale(.95);
  opacity: 0;
  pointer-events: none;
  transition: transform calc(0.35s / var(--k)) cubic-bezier(.22,1,.36,1),opacity calc(0.25s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq13-crp.open .dl {
  transform: translate(-50%,-50%);
  opacity: 1;
  pointer-events: auto;
}

.uvq13-crp .dl {
  font-size: .86em;
  width: 13.4em;
  padding: .9em;
  border-radius: 1.2em;
  color: #f4f4f5;
  background: var(--c2);
  box-shadow: 0 1.6em 3em -1em rgba(0,0,0,.6),0 0 0 1px rgba(255,255,255,.07);
}

.uvq13-crp header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .7em;
}

.uvq13-crp header b {
  font-size: .92em;
}

.uvq13-crp .pvs {
  display: flex;
  align-items: center;
  gap: .6em;
}

.uvq13-crp .pvs .pv {
  box-shadow: 0 0 0 .3em var(--c2),0 0 0 .5em rgba(255,255,255,.25);
}

.uvq13-crp .p1 {
  font-size: .28em;
}

.uvq13-crp .p2 {
  font-size: .17em;
}

.uvq13-crp .ar {
  position: relative;
  width: 11em;
  height: 11em;
  margin: 0 auto;
  border-radius: .7em;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  outline: 0;
  background: #000;
}

.uvq13-crp .ar:focus-visible {
  box-shadow: 0 0 0 2px var(--c1);
}

.uvq13-crp .dr .ar {
  cursor: grabbing;
}

.uvq13-crp .mk {
  position: absolute;
  left: 1.2em;
  top: 1.2em;
  width: 8.6em;
  height: 8.6em;
  border-radius: 50%;
  box-shadow: 0 0 0 12em rgba(0,0,0,.58),inset 0 0 0 2px rgba(255,255,255,.9);
  pointer-events: none;
}

.uvq13-crp .mk::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(90deg,transparent calc(33.3% - .5px),rgba(255,255,255,.5) 0 calc(33.3% + .5px),transparent 0 calc(66.6% - .5px),rgba(255,255,255,.5) 0 calc(66.6% + .5px),transparent 0),linear-gradient(180deg,transparent calc(33.3% - .5px),rgba(255,255,255,.5) 0 calc(33.3% + .5px),transparent 0 calc(66.6% - .5px),rgba(255,255,255,.5) 0 calc(66.6% + .5px),transparent 0);
  opacity: 0;
  transition: opacity calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq13-crp .dr .mk::before {
  opacity: 1;
}

.uvq13-crp .hn {
  margin: .55em 0 .3em;
  text-align: center;
  font-size: .64em;
  color: rgba(255,255,255,.55);
}

.uvq13-crp .zm {
  display: flex;
  align-items: center;
  gap: .45em;
}

.uvq13-crp .zm svg {
  flex: none;
  width: 1em;
  height: 1em;
  color: rgba(255,255,255,.6);
}

.uvq13-crp .zm input {
  flex: 1;
  min-width: 0;
  accent-color: var(--c1);
}

.uvq13-crp .rt {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: grid;
  place-items: center;
  flex: none;
  width: 2em;
  height: 2em;
  border-radius: 50%;
  color: #fff;
  background: rgba(255,255,255,.1);
  transition: transform calc(0.3s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq13-crp .rt:active {
  transform: rotate(30deg);
}

.uvq13-crp .rt svg {
  width: 1.05em;
  height: 1.05em;
  color: #fff;
}

.uvq13-crp .ac {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: .45em;
  margin-top: .8em;
}

.uvq13-crp .ac button {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  padding: .65em;
  border-radius: .7em;
  font-size: .78em;
  font-weight: 700;
  color: #fff;
  background: rgba(255,255,255,.1);
}

.uvq13-crp .ac .ok {
  color: #04221f;
  background: var(--c1);
}

.uvq13-crp button:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

@keyframes uvq13-crp-p {
  40% {
    transform: scale(1.15);
  }
}

@media (prefers-reduced-motion:reduce) {
  .uvq13-crp,.uvq13-crp *,.uvq13-crp *::before,.uvq13-crp *::after {
    animation-duration: .01ms!important;
    animation-iteration-count: 1!important;
    transition-duration: .01ms!important;
  }
}
`;

// Interacción en JavaScript del DOM: la misma que en la pestaña JS.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function setup(el: any) {
  const fire=el.querySelector(".fire"),scr=el.querySelector(".scr"),pnl=el.querySelector(".dl");let tms=[];const later=(f,ms)=>tms.push(setTimeout(f,ms));
const foc=(t,ms)=>later(()=>{const n=typeof t==="string"?el.querySelector(t):t;n&&n.focus({preventScroll:true})},ms||0);
const isOpen=()=>el.classList.contains("open");
const open=u=>{if(isOpen())return;el.classList.add("open");pnl.inert=false;fire&&fire.setAttribute("aria-expanded","true");load();u&&foc(ar,300)};
const close=()=>{if(!isOpen())return;el.classList.remove("open");pnl.inert=true;fire&&fire.setAttribute("aria-expanded","false");;fire&&fire.focus({preventScroll:true})};
fire&&fire.addEventListener("click",()=>isOpen()?close():open(true));scr&&scr.addEventListener("click",()=>close());
el.addEventListener("keydown",e=>{if(!isOpen())return;if(e.key==="Escape"){e.preventDefault();e.stopPropagation();close()}else if(e.key==="Tab"){const f=[...pnl.querySelectorAll('button:not([disabled]),input:not([disabled]),textarea,a[href],[tabindex="0"]')].filter(x=>x.getClientRects().length);if(!f.length){e.preventDefault();return}const a=f[0],z=f[f.length-1],ac=document.activeElement;if(e.shiftKey&&(ac===a||!pnl.contains(ac))){e.preventDefault();z.focus()}else if(!e.shiftKey&&(ac===z||!pnl.contains(ac))){e.preventDefault();a.focus()}}});
pnl.inert=true;later(()=>open(false),500);const dl=el.querySelector(".dl"),ar=el.querySelector(".ar"),rg=el.querySelector(".zm input"),cur=el.querySelector(".cur");const st={x:0,y:.2,z:1.15,r:0};let v={...st},d=null;
const lim=()=>{const m=Math.max(0,5.5*v.z-4.3);v.x=Math.max(-m,Math.min(m,v.x));v.y=Math.max(-m,Math.min(m,v.y))};
const paint=(n,o)=>{n.style.setProperty("--x",o.x.toFixed(3));n.style.setProperty("--y",o.y.toFixed(3));n.style.setProperty("--z",o.z.toFixed(3));n.style.setProperty("--r",String(o.r))};
const apply=()=>{lim();paint(dl,v);rg.value=String(Math.round(v.z*100))};
const load=()=>{v={...st};apply()};
const em=()=>parseFloat(getComputedStyle(ar).fontSize)*(el.getBoundingClientRect().width/el.offsetWidth||1);
ar.addEventListener("pointerdown",e=>{d={px:e.clientX,py:e.clientY,x:v.x,y:v.y,e:em()};ar.setPointerCapture(e.pointerId);dl.classList.add("dr")});
ar.addEventListener("pointermove",e=>{if(!d)return;v.x=d.x+(e.clientX-d.px)/d.e;v.y=d.y+(e.clientY-d.py)/d.e;apply()});
const up=()=>{d=null;dl.classList.remove("dr")};ar.addEventListener("pointerup",up);ar.addEventListener("pointercancel",up);
ar.addEventListener("wheel",e=>{if(!isOpen())return;e.preventDefault();v.z=Math.max(1,Math.min(3,v.z-e.deltaY*.002));apply()},{passive:false});
rg.addEventListener("input",()=>{v.z=+rg.value/100;apply()});el.querySelector(".rt").addEventListener("click",()=>{v.r+=90;apply()});
ar.addEventListener("keydown",e=>{const m={ArrowLeft:[-.3,0],ArrowRight:[.3,0],ArrowUp:[0,-.3],ArrowDown:[0,.3]}[e.key];if(m){e.preventDefault();v.x+=m[0];v.y+=m[1];apply()}else if(e.key==="+"||e.key==="="){e.preventDefault();v.z=Math.min(3,v.z+.1);apply()}else if(e.key==="-"){e.preventDefault();v.z=Math.max(1,v.z-.1);apply()}});
el.querySelector(".cn").addEventListener("click",close);
el.querySelector(".ok").addEventListener("click",()=>{Object.assign(st,v);paint(cur,st);cur.classList.remove("pop");void cur.offsetWidth;cur.classList.add("pop");close()});
paint(cur,st);load();return()=>tms.forEach(clearTimeout)
}

export default function OvAvatarCrop() {
  const ref = useRef<HTMLDivElement>(null);

  useEffect(() => {
    const el = ref.current?.firstElementChild;
    return el ? setup(el) : undefined;
  }, []);

  return (
    <>
      <style>{css}</style>
      <div
        ref={ref} style={{
          "--c1": "#2dd4bf",
          "--c2": "#101418",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uvq13-crp"><div className="pf"><span className="pv cur" aria-hidden="true"><i className="im"></i></span><span className="who"><b>Ana Torres</b><small>Interior designer</small></span><button type="button" className="fire" aria-haspopup="dialog">Change photo</button></div><div className="ln" aria-hidden="true"><i></i><i></i><i className="s"></i></div><div className="scr"></div><div className="dl" role="dialog" aria-modal="true" aria-labelledby="uvq13-crp-t"><header><b id="uvq13-crp-t">Crop photo</b><span className="pvs" aria-hidden="true"><span className="pv p1"><i className="im"></i></span><span className="pv p2"><i className="im"></i></span></span></header><div className="ar" tabIndex={0} role="group" aria-label="Crop area" aria-describedby="uvq13-crp-h"><i className="im"></i><i className="mk"></i></div><p className="hn" id="uvq13-crp-h">Drag to frame</p><div className="zm"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="6.5" /><path d="M20 20l-4.2-4.2M8.5 11h5" /></svg><input type="range" min="100" max="300" step="1" aria-label="Zoom" /><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="6.5" /><path d="M20 20l-4.2-4.2M8.5 11h5M11 8.5v5" /></svg><button type="button" className="rt" aria-label="Rotate 90 degrees"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"><path d="M4.5 12a7.5 7.5 0 1 0 2.2-5.3M4.5 4v4h4" /></svg></button></div><div className="ac"><button type="button" className="cn">Cancel</button><button type="button" className="ok">Save photo</button></div></div></div>
      </div>
    </>
  );
}
```

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