# Slider with liquid lens

> While dragging, the white thumb turns into a glass lens that magnifies the track; it adjusts brightness and warmth.

- Category: [Liquid Glass](https://library.aimran.es/components/liquid-glass)
- Built with: HTML + CSS
- Live editor: https://library.aimran.es/blocks/uv-lg-lens-slider
- Library: AIMRAN Library (https://library.aimran.es), free, no sign-up, by Aimran Oukham

## Where to use it

A slider in the spirit of the newest phone interfaces: at rest the thumb is a plain white pill, and while you drag it swells into a clear lens with colored fringes that magnifies the track beneath it. Two of them sit in a glass panel and adjust the brightness and warmth of a landscape photo.

Set the lens magnification with its own control and the fill color with the main color. Each slider has full keyboard support, including Home, End and Page keys, so it suits photo editors, settings screens and media apps.

## Code

### HTML

```html
<div class="uvq11-lsl" style="--br:.7;--wm:.35"><div class="ph" aria-hidden="true"><i class="sun"></i><i class="m1"></i><i class="m2"></i><i class="lk"></i></div><div class="pn"><p class="ti">Edit photo</p><div class="rw"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="4"/><path d="M12 2.5v2M12 19.5v2M2.5 12h2M19.5 12h2M5.3 5.3l1.4 1.4M17.3 17.3l1.4 1.4M5.3 18.7l1.4-1.4M17.3 6.7l1.4-1.4"/></svg><div class="sl" role="slider" tabindex="0" aria-label="Brightness" aria-valuemin="0" aria-valuemax="100" aria-valuenow="70" aria-valuetext="70 %" data-k="br" style="--v:0.7"><span class="tk"><span class="fi"></span></span><span class="th"><span class="lz"><span class="tc"><span class="fi"></span></span></span></span></div><output>70</output></div><div class="rw"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M10 14.5V5a2 2 0 0 1 4 0v9.5a4 4 0 1 1-4 0z"/><path d="M12 10v6"/></svg><div class="sl" role="slider" tabindex="0" aria-label="Warmth" aria-valuemin="0" aria-valuemax="100" aria-valuenow="35" aria-valuetext="35 %" data-k="wm" style="--v:0.35"><span class="tk"><span class="fi"></span></span><span class="th"><span class="lz"><span class="tc"><span class="fi"></span></span></span></span></div><output>35</output></div></div></div>
```

### CSS

```css
.uvq11-lsl {
  --c1: #ffd60a;
  --c2: #ff7eb3;
  --s: 16px;
  /* tamaño */
  --k: 1;
  /* velocidad */
  --mg: 1.9;
  /* aumento de la lente */
  --fg: #1d1d1f;
  /* texto */
  --bg: #f5f5f7;
  /* fondo */
}

.uvq11-lsl {
  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: 20em;
  height: 14em;
  border-radius: 1.6em;
  overflow: hidden;
  color: #fff;
  isolation: isolate;
  -webkit-user-select: none;
  user-select: none;
  --tw: 11.4em;
}

.uvq11-lsl .ph {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,#4f5dff 0%,#c26fd8 30%,var(--c2) 46%,#ffd29d 56%,#ffd29d 57%);
  filter: brightness(calc(.45 + var(--br) * .8)) sepia(calc(var(--wm) * .55)) saturate(calc(.9 + var(--wm) * .5)) hue-rotate(calc(var(--wm) * -10deg));
}

.uvq11-lsl .sun {
  position: absolute;
  left: 58%;
  top: 38%;
  width: 3em;
  height: 3em;
  border-radius: 50%;
  background: radial-gradient(circle,#fff8d6 0 35%,#ffd29d 60%,transparent 72%);
}

.uvq11-lsl .m1 {
  position: absolute;
  left: -5%;
  right: 35%;
  top: 30%;
  height: 27%;
  background: #5a3f86;
  clip-path: polygon(0 100%,30% 20%,48% 60%,70% 0,100% 100%);
}

.uvq11-lsl .m2 {
  position: absolute;
  left: 30%;
  right: -5%;
  top: 36%;
  height: 21%;
  background: #3e2c66;
  clip-path: polygon(0 100%,35% 10%,60% 55%,80% 25%,100% 100%);
}

.uvq11-lsl .lk {
  position: absolute;
  left: 0;
  right: 0;
  top: 57%;
  bottom: 0;
  background: repeating-linear-gradient(180deg,rgba(255,255,255,.18) 0 1px,transparent 1px .5em),linear-gradient(180deg,#ffb48a,#6f4fa8 55%,#2d2a6b);
}

.uvq11-lsl .pn {
  position: absolute;
  left: .8em;
  right: .8em;
  bottom: .8em;
  padding: .7em 1em .8em;
  border-radius: 1.3em;
  background: rgba(255,255,255,.16);
  -webkit-backdrop-filter: blur(14px) saturate(1.8);
  backdrop-filter: blur(14px) saturate(1.8);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55),inset 0 0 0 1px rgba(255,255,255,.22),0 .8em 2em -.6em rgba(0,0,0,.35);
}

.uvq11-lsl .ti {
  margin: 0 0 .35em;
  font-size: .72em;
  font-weight: 700;
  opacity: .85;
}

.uvq11-lsl .rw {
  display: flex;
  align-items: center;
  gap: .6em;
  height: 2.2em;
}

.uvq11-lsl .rw>svg {
  flex: none;
  width: 1.15em;
  height: 1.15em;
}

.uvq11-lsl .rw output {
  flex: none;
  width: 1.8em;
  text-align: right;
  font-size: .8em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.uvq11-lsl .sl {
  position: relative;
  flex: none;
  width: var(--tw);
  height: 2.2em;
  cursor: pointer;
  touch-action: none;
  outline: 0;
}

.uvq11-lsl .tk,.uvq11-lsl .tc {
  position: absolute;
  top: 50%;
  height: .42em;
  margin-top: -.21em;
  border-radius: 1em;
  background: rgba(255,255,255,.32);
  overflow: hidden;
}

.uvq11-lsl .tk {
  left: 0;
  right: 0;
}

.uvq11-lsl .fi {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: calc(var(--v) * 100%);
  background: var(--c1);
}

.uvq11-lsl .th {
  position: absolute;
  left: calc(var(--v) * 100%);
  top: 50%;
  width: 1.9em;
  height: 1.15em;
  border-radius: 1em;
  transform: translate(-50%,-50%);
  background: #fff;
  box-shadow: 0 .15em .4em rgba(0,0,0,.25);
  transition: width calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1),height calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1),background calc(0.25s / var(--k)) cubic-bezier(.25,.1,.25,1),box-shadow calc(0.25s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq11-lsl .lz {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  opacity: 0;
  transition: opacity calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq11-lsl .tc {
  left: calc(50% - var(--v) * var(--tw));
  width: var(--tw);
  transform-origin: calc(var(--v) * var(--tw)) 50%;
  transform: scale(var(--mg));
  background: rgba(255,255,255,.45);
}

.uvq11-lsl .sl.dr .th {
  width: 3.6em;
  height: 2.3em;
  background: rgba(255,255,255,.08);
  -webkit-backdrop-filter: blur(.5px) saturate(1.6) brightness(1.1);
  backdrop-filter: blur(.5px) saturate(1.6) brightness(1.1);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.75),inset 0 .2em .35em rgba(255,255,255,.55),inset 0 -.25em .4em rgba(0,0,0,.18),inset .15em 0 .25em rgba(255,60,150,.3),inset -.15em 0 .25em rgba(0,200,255,.3),0 .5em 1.2em -.4em rgba(0,0,0,.4);
}

.uvq11-lsl .sl.dr .lz {
  opacity: 1;
}

.uvq11-lsl .sl:focus-visible .th {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

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

### JavaScript

```js
document.querySelectorAll(".uvq11-lsl").forEach(el => {
  const ss=[...el.querySelectorAll(".sl")],ts=[];
ss.forEach(s=>{const o=s.parentElement.querySelector("output"),k=s.dataset.k;let v=parseFloat(s.style.getPropertyValue("--v"))||0;
const set=n=>{v=Math.max(0,Math.min(1,n));const p=Math.round(v*100);s.style.setProperty("--v",v.toFixed(4));el.style.setProperty("--"+k,v.toFixed(3));o.textContent=String(p);s.setAttribute("aria-valuenow",String(p));s.setAttribute("aria-valuetext",p+" %")};
const at=e=>{const r=s.getBoundingClientRect();set((e.clientX-r.left)/r.width)};
s.addEventListener("pointerdown",e=>{s.setPointerCapture(e.pointerId);s.classList.add("dr");at(e)});
s.addEventListener("pointermove",e=>{if(s.hasPointerCapture(e.pointerId))at(e)});
const up=()=>s.classList.remove("dr");s.addEventListener("pointerup",up);s.addEventListener("pointercancel",up);s.addEventListener("blur",up);
s.addEventListener("keydown",e=>{const d={ArrowRight:.05,ArrowUp:.05,ArrowLeft:-.05,ArrowDown:-.05,PageUp:.2,PageDown:-.2}[e.key];if(d===undefined&&e.key!=="Home"&&e.key!=="End")return;e.preventDefault();set(e.key==="Home"?0:e.key==="End"?1:v+d);s.classList.add("dr");clearTimeout(s._t);s._t=setTimeout(up,800);ts.push(s._t)})});
ts.push(setTimeout(()=>{ss[0].classList.add("dr");ts.push(setTimeout(()=>ss[0].classList.remove("dr"),1800))},400));
return()=>ts.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 = `
.uvq11-lsl {
  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: 20em;
  height: 14em;
  border-radius: 1.6em;
  overflow: hidden;
  color: #fff;
  isolation: isolate;
  -webkit-user-select: none;
  user-select: none;
  --tw: 11.4em;
}

.uvq11-lsl .ph {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,#4f5dff 0%,#c26fd8 30%,var(--c2) 46%,#ffd29d 56%,#ffd29d 57%);
  filter: brightness(calc(.45 + var(--br) * .8)) sepia(calc(var(--wm) * .55)) saturate(calc(.9 + var(--wm) * .5)) hue-rotate(calc(var(--wm) * -10deg));
}

.uvq11-lsl .sun {
  position: absolute;
  left: 58%;
  top: 38%;
  width: 3em;
  height: 3em;
  border-radius: 50%;
  background: radial-gradient(circle,#fff8d6 0 35%,#ffd29d 60%,transparent 72%);
}

.uvq11-lsl .m1 {
  position: absolute;
  left: -5%;
  right: 35%;
  top: 30%;
  height: 27%;
  background: #5a3f86;
  clip-path: polygon(0 100%,30% 20%,48% 60%,70% 0,100% 100%);
}

.uvq11-lsl .m2 {
  position: absolute;
  left: 30%;
  right: -5%;
  top: 36%;
  height: 21%;
  background: #3e2c66;
  clip-path: polygon(0 100%,35% 10%,60% 55%,80% 25%,100% 100%);
}

.uvq11-lsl .lk {
  position: absolute;
  left: 0;
  right: 0;
  top: 57%;
  bottom: 0;
  background: repeating-linear-gradient(180deg,rgba(255,255,255,.18) 0 1px,transparent 1px .5em),linear-gradient(180deg,#ffb48a,#6f4fa8 55%,#2d2a6b);
}

.uvq11-lsl .pn {
  position: absolute;
  left: .8em;
  right: .8em;
  bottom: .8em;
  padding: .7em 1em .8em;
  border-radius: 1.3em;
  background: rgba(255,255,255,.16);
  -webkit-backdrop-filter: blur(14px) saturate(1.8);
  backdrop-filter: blur(14px) saturate(1.8);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55),inset 0 0 0 1px rgba(255,255,255,.22),0 .8em 2em -.6em rgba(0,0,0,.35);
}

.uvq11-lsl .ti {
  margin: 0 0 .35em;
  font-size: .72em;
  font-weight: 700;
  opacity: .85;
}

.uvq11-lsl .rw {
  display: flex;
  align-items: center;
  gap: .6em;
  height: 2.2em;
}

.uvq11-lsl .rw>svg {
  flex: none;
  width: 1.15em;
  height: 1.15em;
}

.uvq11-lsl .rw output {
  flex: none;
  width: 1.8em;
  text-align: right;
  font-size: .8em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.uvq11-lsl .sl {
  position: relative;
  flex: none;
  width: var(--tw);
  height: 2.2em;
  cursor: pointer;
  touch-action: none;
  outline: 0;
}

.uvq11-lsl .tk,.uvq11-lsl .tc {
  position: absolute;
  top: 50%;
  height: .42em;
  margin-top: -.21em;
  border-radius: 1em;
  background: rgba(255,255,255,.32);
  overflow: hidden;
}

.uvq11-lsl .tk {
  left: 0;
  right: 0;
}

.uvq11-lsl .fi {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: calc(var(--v) * 100%);
  background: var(--c1);
}

.uvq11-lsl .th {
  position: absolute;
  left: calc(var(--v) * 100%);
  top: 50%;
  width: 1.9em;
  height: 1.15em;
  border-radius: 1em;
  transform: translate(-50%,-50%);
  background: #fff;
  box-shadow: 0 .15em .4em rgba(0,0,0,.25);
  transition: width calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1),height calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1),background calc(0.25s / var(--k)) cubic-bezier(.25,.1,.25,1),box-shadow calc(0.25s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq11-lsl .lz {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  opacity: 0;
  transition: opacity calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq11-lsl .tc {
  left: calc(50% - var(--v) * var(--tw));
  width: var(--tw);
  transform-origin: calc(var(--v) * var(--tw)) 50%;
  transform: scale(var(--mg));
  background: rgba(255,255,255,.45);
}

.uvq11-lsl .sl.dr .th {
  width: 3.6em;
  height: 2.3em;
  background: rgba(255,255,255,.08);
  -webkit-backdrop-filter: blur(.5px) saturate(1.6) brightness(1.1);
  backdrop-filter: blur(.5px) saturate(1.6) brightness(1.1);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.75),inset 0 .2em .35em rgba(255,255,255,.55),inset 0 -.25em .4em rgba(0,0,0,.18),inset .15em 0 .25em rgba(255,60,150,.3),inset -.15em 0 .25em rgba(0,200,255,.3),0 .5em 1.2em -.4em rgba(0,0,0,.4);
}

.uvq11-lsl .sl.dr .lz {
  opacity: 1;
}

.uvq11-lsl .sl:focus-visible .th {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

@media (prefers-reduced-motion:reduce) {
  .uvq11-lsl,.uvq11-lsl *,.uvq11-lsl *::before,.uvq11-lsl *::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 ss=[...el.querySelectorAll(".sl")],ts=[];
ss.forEach(s=>{const o=s.parentElement.querySelector("output"),k=s.dataset.k;let v=parseFloat(s.style.getPropertyValue("--v"))||0;
const set=n=>{v=Math.max(0,Math.min(1,n));const p=Math.round(v*100);s.style.setProperty("--v",v.toFixed(4));el.style.setProperty("--"+k,v.toFixed(3));o.textContent=String(p);s.setAttribute("aria-valuenow",String(p));s.setAttribute("aria-valuetext",p+" %")};
const at=e=>{const r=s.getBoundingClientRect();set((e.clientX-r.left)/r.width)};
s.addEventListener("pointerdown",e=>{s.setPointerCapture(e.pointerId);s.classList.add("dr");at(e)});
s.addEventListener("pointermove",e=>{if(s.hasPointerCapture(e.pointerId))at(e)});
const up=()=>s.classList.remove("dr");s.addEventListener("pointerup",up);s.addEventListener("pointercancel",up);s.addEventListener("blur",up);
s.addEventListener("keydown",e=>{const d={ArrowRight:.05,ArrowUp:.05,ArrowLeft:-.05,ArrowDown:-.05,PageUp:.2,PageDown:-.2}[e.key];if(d===undefined&&e.key!=="Home"&&e.key!=="End")return;e.preventDefault();set(e.key==="Home"?0:e.key==="End"?1:v+d);s.classList.add("dr");clearTimeout(s._t);s._t=setTimeout(up,800);ts.push(s._t)})});
ts.push(setTimeout(()=>{ss[0].classList.add("dr");ts.push(setTimeout(()=>ss[0].classList.remove("dr"),1800))},400));
return()=>ts.forEach(clearTimeout)
}

export default function LgLensSlider() {
  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": "#ffd60a",
          "--c2": "#ff7eb3",
          "--s": "16px",
          "--k": "1",
          "--mg": "1.9",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uvq11-lsl" style={{ "--br": ".7", "--wm": ".35" } as CSSProperties}><div className="ph" aria-hidden="true"><i className="sun"></i><i className="m1"></i><i className="m2"></i><i className="lk"></i></div><div className="pn"><p className="ti">Edit photo</p><div className="rw"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="4" /><path d="M12 2.5v2M12 19.5v2M2.5 12h2M19.5 12h2M5.3 5.3l1.4 1.4M17.3 17.3l1.4 1.4M5.3 18.7l1.4-1.4M17.3 6.7l1.4-1.4" /></svg><div className="sl" role="slider" tabIndex={0} aria-label="Brightness" aria-valuemin="0" aria-valuemax="100" aria-valuenow="70" aria-valuetext="70 %" data-k="br" style={{ "--v": "0.7" } as CSSProperties}><span className="tk"><span className="fi"></span></span><span className="th"><span className="lz"><span className="tc"><span className="fi"></span></span></span></span></div><output>70</output></div><div className="rw"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"><path d="M10 14.5V5a2 2 0 0 1 4 0v9.5a4 4 0 1 1-4 0z" /><path d="M12 10v6" /></svg><div className="sl" role="slider" tabIndex={0} aria-label="Warmth" aria-valuemin="0" aria-valuemax="100" aria-valuenow="35" aria-valuetext="35 %" data-k="wm" style={{ "--v": "0.35" } as CSSProperties}><span className="tk"><span className="fi"></span></span><span className="th"><span className="lz"><span className="tc"><span className="fi"></span></span></span></span></div><output>35</output></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 “Slider with liquid lens” block (Liquid Glass) from AIMRAN Library to my project.

## What it is
While dragging, the white thumb turns into a glass lens that magnifies the track; it adjusts brightness and warmth.

## Chosen settings
- Main color: #ffd60a
- Secondary color: #ff7eb3
- Size: 16px (from 12 to 24px)
- Speed: 1x (from 0.5 to 2x)
- Lens magnification: 1.9x (from 1.3 to 2.6x)
- Text: "Editar 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 = `
.uvq11-lsl {
  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: 20em;
  height: 14em;
  border-radius: 1.6em;
  overflow: hidden;
  color: #fff;
  isolation: isolate;
  -webkit-user-select: none;
  user-select: none;
  --tw: 11.4em;
}

.uvq11-lsl .ph {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,#4f5dff 0%,#c26fd8 30%,var(--c2) 46%,#ffd29d 56%,#ffd29d 57%);
  filter: brightness(calc(.45 + var(--br) * .8)) sepia(calc(var(--wm) * .55)) saturate(calc(.9 + var(--wm) * .5)) hue-rotate(calc(var(--wm) * -10deg));
}

.uvq11-lsl .sun {
  position: absolute;
  left: 58%;
  top: 38%;
  width: 3em;
  height: 3em;
  border-radius: 50%;
  background: radial-gradient(circle,#fff8d6 0 35%,#ffd29d 60%,transparent 72%);
}

.uvq11-lsl .m1 {
  position: absolute;
  left: -5%;
  right: 35%;
  top: 30%;
  height: 27%;
  background: #5a3f86;
  clip-path: polygon(0 100%,30% 20%,48% 60%,70% 0,100% 100%);
}

.uvq11-lsl .m2 {
  position: absolute;
  left: 30%;
  right: -5%;
  top: 36%;
  height: 21%;
  background: #3e2c66;
  clip-path: polygon(0 100%,35% 10%,60% 55%,80% 25%,100% 100%);
}

.uvq11-lsl .lk {
  position: absolute;
  left: 0;
  right: 0;
  top: 57%;
  bottom: 0;
  background: repeating-linear-gradient(180deg,rgba(255,255,255,.18) 0 1px,transparent 1px .5em),linear-gradient(180deg,#ffb48a,#6f4fa8 55%,#2d2a6b);
}

.uvq11-lsl .pn {
  position: absolute;
  left: .8em;
  right: .8em;
  bottom: .8em;
  padding: .7em 1em .8em;
  border-radius: 1.3em;
  background: rgba(255,255,255,.16);
  -webkit-backdrop-filter: blur(14px) saturate(1.8);
  backdrop-filter: blur(14px) saturate(1.8);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55),inset 0 0 0 1px rgba(255,255,255,.22),0 .8em 2em -.6em rgba(0,0,0,.35);
}

.uvq11-lsl .ti {
  margin: 0 0 .35em;
  font-size: .72em;
  font-weight: 700;
  opacity: .85;
}

.uvq11-lsl .rw {
  display: flex;
  align-items: center;
  gap: .6em;
  height: 2.2em;
}

.uvq11-lsl .rw>svg {
  flex: none;
  width: 1.15em;
  height: 1.15em;
}

.uvq11-lsl .rw output {
  flex: none;
  width: 1.8em;
  text-align: right;
  font-size: .8em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.uvq11-lsl .sl {
  position: relative;
  flex: none;
  width: var(--tw);
  height: 2.2em;
  cursor: pointer;
  touch-action: none;
  outline: 0;
}

.uvq11-lsl .tk,.uvq11-lsl .tc {
  position: absolute;
  top: 50%;
  height: .42em;
  margin-top: -.21em;
  border-radius: 1em;
  background: rgba(255,255,255,.32);
  overflow: hidden;
}

.uvq11-lsl .tk {
  left: 0;
  right: 0;
}

.uvq11-lsl .fi {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: calc(var(--v) * 100%);
  background: var(--c1);
}

.uvq11-lsl .th {
  position: absolute;
  left: calc(var(--v) * 100%);
  top: 50%;
  width: 1.9em;
  height: 1.15em;
  border-radius: 1em;
  transform: translate(-50%,-50%);
  background: #fff;
  box-shadow: 0 .15em .4em rgba(0,0,0,.25);
  transition: width calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1),height calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1),background calc(0.25s / var(--k)) cubic-bezier(.25,.1,.25,1),box-shadow calc(0.25s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq11-lsl .lz {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  opacity: 0;
  transition: opacity calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq11-lsl .tc {
  left: calc(50% - var(--v) * var(--tw));
  width: var(--tw);
  transform-origin: calc(var(--v) * var(--tw)) 50%;
  transform: scale(var(--mg));
  background: rgba(255,255,255,.45);
}

.uvq11-lsl .sl.dr .th {
  width: 3.6em;
  height: 2.3em;
  background: rgba(255,255,255,.08);
  -webkit-backdrop-filter: blur(.5px) saturate(1.6) brightness(1.1);
  backdrop-filter: blur(.5px) saturate(1.6) brightness(1.1);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.75),inset 0 .2em .35em rgba(255,255,255,.55),inset 0 -.25em .4em rgba(0,0,0,.18),inset .15em 0 .25em rgba(255,60,150,.3),inset -.15em 0 .25em rgba(0,200,255,.3),0 .5em 1.2em -.4em rgba(0,0,0,.4);
}

.uvq11-lsl .sl.dr .lz {
  opacity: 1;
}

.uvq11-lsl .sl:focus-visible .th {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

@media (prefers-reduced-motion:reduce) {
  .uvq11-lsl,.uvq11-lsl *,.uvq11-lsl *::before,.uvq11-lsl *::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 ss=[...el.querySelectorAll(".sl")],ts=[];
ss.forEach(s=>{const o=s.parentElement.querySelector("output"),k=s.dataset.k;let v=parseFloat(s.style.getPropertyValue("--v"))||0;
const set=n=>{v=Math.max(0,Math.min(1,n));const p=Math.round(v*100);s.style.setProperty("--v",v.toFixed(4));el.style.setProperty("--"+k,v.toFixed(3));o.textContent=String(p);s.setAttribute("aria-valuenow",String(p));s.setAttribute("aria-valuetext",p+" %")};
const at=e=>{const r=s.getBoundingClientRect();set((e.clientX-r.left)/r.width)};
s.addEventListener("pointerdown",e=>{s.setPointerCapture(e.pointerId);s.classList.add("dr");at(e)});
s.addEventListener("pointermove",e=>{if(s.hasPointerCapture(e.pointerId))at(e)});
const up=()=>s.classList.remove("dr");s.addEventListener("pointerup",up);s.addEventListener("pointercancel",up);s.addEventListener("blur",up);
s.addEventListener("keydown",e=>{const d={ArrowRight:.05,ArrowUp:.05,ArrowLeft:-.05,ArrowDown:-.05,PageUp:.2,PageDown:-.2}[e.key];if(d===undefined&&e.key!=="Home"&&e.key!=="End")return;e.preventDefault();set(e.key==="Home"?0:e.key==="End"?1:v+d);s.classList.add("dr");clearTimeout(s._t);s._t=setTimeout(up,800);ts.push(s._t)})});
ts.push(setTimeout(()=>{ss[0].classList.add("dr");ts.push(setTimeout(()=>ss[0].classList.remove("dr"),1800))},400));
return()=>ts.forEach(clearTimeout)
}

export default function LgLensSlider() {
  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": "#ffd60a",
          "--c2": "#ff7eb3",
          "--s": "16px",
          "--k": "1",
          "--mg": "1.9",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uvq11-lsl" style={{ "--br": ".7", "--wm": ".35" } as CSSProperties}><div className="ph" aria-hidden="true"><i className="sun"></i><i className="m1"></i><i className="m2"></i><i className="lk"></i></div><div className="pn"><p className="ti">Edit photo</p><div className="rw"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="4" /><path d="M12 2.5v2M12 19.5v2M2.5 12h2M19.5 12h2M5.3 5.3l1.4 1.4M17.3 17.3l1.4 1.4M5.3 18.7l1.4-1.4M17.3 6.7l1.4-1.4" /></svg><div className="sl" role="slider" tabIndex={0} aria-label="Brightness" aria-valuemin="0" aria-valuemax="100" aria-valuenow="70" aria-valuetext="70 %" data-k="br" style={{ "--v": "0.7" } as CSSProperties}><span className="tk"><span className="fi"></span></span><span className="th"><span className="lz"><span className="tc"><span className="fi"></span></span></span></span></div><output>70</output></div><div className="rw"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"><path d="M10 14.5V5a2 2 0 0 1 4 0v9.5a4 4 0 1 1-4 0z" /><path d="M12 10v6" /></svg><div className="sl" role="slider" tabIndex={0} aria-label="Warmth" aria-valuemin="0" aria-valuemax="100" aria-valuenow="35" aria-valuetext="35 %" data-k="wm" style={{ "--v": "0.35" } as CSSProperties}><span className="tk"><span className="fi"></span></span><span className="th"><span className="lz"><span className="tc"><span className="fi"></span></span></span></span></div><output>35</output></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.
````
