# Lava lamp with switch

> A glass bottle where warm wax rises, falls and melts together; switch it on and the wall glows with its light.

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

## Where to use it

A seventies lava lamp built from CSS shapes: a brass cap and base and a tapered glass bottle with vertical highlights. Inside, round blobs rise and sink at different speeds and an SVG gooey filter fuses them like real wax. Turning the switch off pauses the wax, dims the liquid and fades the warm glow on the wallpaper.

Pick the wax and liquid colors to go from classic orange and purple to green or blue. The speed control slows the drift for a calmer loader or ambient header, and the switch is an accessible toggle.

## Code

### HTML

```html
<div class="uvq11-lava on"><svg class="df" width="0" height="0" aria-hidden="true"><filter id="uvq11-goo"><feGaussianBlur stdDeviation="6"/><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 24 -10"/></filter></svg><i class="gw" aria-hidden="true"></i><div class="lp" aria-hidden="true"><i class="cap"></i><span class="vs"><span class="lq"><span class="bl"><i style="--x:22%;--s:1.7em;--d:11;--dl:-2"></i><i style="--x:55%;--s:1.3em;--d:14;--dl:-7"></i><i style="--x:38%;--s:2.1em;--d:17;--dl:-11"></i><i style="--x:62%;--s:1.1em;--d:9;--dl:-4"></i><i style="--x:30%;--s:1em;--d:12;--dl:-9"></i><i style="--x:48%;--s:1.5em;--d:20;--dl:-15"></i></span></span><i class="gx"></i></span><i class="bs"></i></div><div class="tx"><p class="nm">Model 1973</p><button type="button" class="ch" role="switch" aria-checked="true"><i class="led"></i>Light</button></div></div>
```

### CSS

```css
.uvq11-lava {
  --c1: #ff5a36;
  --c2: #5b21b6;
  --s: 16px;
  /* tamaño */
  --k: 1;
  /* velocidad */
  --fg: #1d1d1f;
  /* texto */
  --bg: #f5f5f7;
  /* fondo */
}

.uvq11-lava {
  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;
  background: radial-gradient(circle at 50% 50%,#5a3a24 0 .45em,transparent .5em) 0 0/2em 2em,radial-gradient(circle at 50% 50%,#4a2e1b 0 .3em,transparent .35em) 1em 1em/2em 2em,linear-gradient(#3b2518,#2a190f);
}

.uvq11-lava .df {
  position: absolute;
}

.uvq11-lava .gw {
  position: absolute;
  inset: 0;
  background: radial-gradient(40% 70% at 30% 55%,color-mix(in srgb,var(--c1) 55%,transparent),transparent 70%);
  opacity: 0;
  transition: opacity calc(1.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq11-lava.on .gw {
  opacity: 1;
}

.uvq11-lava .lp {
  position: absolute;
  left: 3.6em;
  top: .5em;
  width: 5.4em;
  height: 13em;
}

.uvq11-lava .cap {
  position: absolute;
  left: 1.55em;
  top: 0;
  width: 2.3em;
  height: 1.9em;
  clip-path: polygon(28% 0,72% 0,100% 100%,0 100%);
  background: linear-gradient(90deg,#6d5416,#f7e3a6 35%,#c9a24a 55%,#5e4612);
}

.uvq11-lava .vs {
  position: absolute;
  left: .2em;
  top: 1.85em;
  width: 5em;
  height: 7.5em;
  clip-path: polygon(32% 0,68% 0,97% 64%,88% 100%,12% 100%,3% 64%);
}

.uvq11-lava .lq {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,color-mix(in srgb,var(--c2) 70%,#000),var(--c2) 45%,color-mix(in srgb,var(--c2) 60%,var(--c1)) 100%);
  transition: filter calc(1s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq11-lava:not(.on) .lq {
  filter: brightness(.45) saturate(.6);
}

.uvq11-lava .bl {
  position: absolute;
  inset: 0;
  filter: url(#uvq11-goo);
}

.uvq11-lava .bl::after {
  content: "";
  position: absolute;
  left: 5%;
  right: 5%;
  bottom: -.6em;
  height: 1.6em;
  border-radius: 50%;
  background: var(--c1);
}

.uvq11-lava .bl i {
  position: absolute;
  left: var(--x);
  bottom: -.2em;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%,color-mix(in srgb,var(--c1) 60%,#ffd166),var(--c1));
  animation: uvq11-lava calc(var(--d) * 1s / var(--k)) ease-in-out infinite alternate;
  animation-delay: calc(var(--dl) * 1s / var(--k));
}

.uvq11-lava:not(.on) .bl i {
  animation-play-state: paused;
}

.uvq11-lava .gx {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,rgba(255,255,255,.05) 0,rgba(255,255,255,.5) 13%,rgba(255,255,255,.08) 21%,transparent 40% 74%,rgba(255,255,255,.25) 85%,rgba(255,255,255,.04)),linear-gradient(180deg,rgba(255,255,255,.18),transparent 20%);
}

.uvq11-lava .bs {
  position: absolute;
  left: .1em;
  top: 9.3em;
  width: 5.2em;
  height: 3.4em;
  clip-path: polygon(12% 0,88% 0,100% 100%,0 100%);
  background: linear-gradient(90deg,#5e4612,#f7e3a6 30%,#c9a24a 50%,#7a5c1e 75%,#4a370d);
}

.uvq11-lava .bs::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: .3em;
  background: color-mix(in srgb,var(--c1) 60%,transparent);
  opacity: 0;
  transition: opacity calc(1s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq11-lava.on .bs::after {
  opacity: 1;
}

.uvq11-lava .tx {
  position: absolute;
  left: 11em;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  justify-items: start;
  gap: .7em;
}

.uvq11-lava .nm {
  margin: 0;
  font-size: 1.3em;
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.1;
  color: #ffe9d6;
}

.uvq11-lava .ch {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4em;
  padding: .55em 1em;
  border-radius: 2em;
  font-size: .78em;
  font-weight: 650;
  line-height: 1;
  color: #fff;
  background: rgba(255,255,255,.16);
  -webkit-backdrop-filter: blur(10px) saturate(1.7);
  backdrop-filter: blur(10px) saturate(1.7);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55),inset 0 -1px 0 rgba(255,255,255,.1),inset 0 0 0 1px rgba(255,255,255,.24),0 .5em 1.2em -.5em rgba(0,0,0,.45);
  transition: transform calc(0.3s / var(--k)) cubic-bezier(.34,1.56,.64,1),background calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq11-lava .ch:hover {
  background: rgba(255,255,255,.28);
}

.uvq11-lava .ch:active {
  transform: scale(.92);
}

.uvq11-lava .ch:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.uvq11-lava .ch svg {
  width: 1.15em;
  height: 1.15em;
}

.uvq11-lava .led {
  width: .6em;
  height: .6em;
  border-radius: 50%;
  background: #555;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.4);
  transition: all calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq11-lava .ch[aria-checked=true] .led {
  background: var(--c1);
  box-shadow: 0 0 .5em var(--c1);
}

@keyframes uvq11-lava {
  0% {
    transform: translateY(0) scale(1);
  }
  45% {
    transform: translateY(-5.5em) scale(.85,1.15);
  }
  100% {
    transform: translateY(-7.6em) scale(1.05,.9);
  }
}

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

### JavaScript

```js
document.querySelectorAll(".uvq11-lava").forEach(el => {
  const b=el.querySelector(".ch");b.addEventListener("click",()=>{const o=!el.classList.contains("on");el.classList.toggle("on",o);b.setAttribute("aria-checked",String(o))})
});
```

### 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-lava {
  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;
  background: radial-gradient(circle at 50% 50%,#5a3a24 0 .45em,transparent .5em) 0 0/2em 2em,radial-gradient(circle at 50% 50%,#4a2e1b 0 .3em,transparent .35em) 1em 1em/2em 2em,linear-gradient(#3b2518,#2a190f);
}

.uvq11-lava .df {
  position: absolute;
}

.uvq11-lava .gw {
  position: absolute;
  inset: 0;
  background: radial-gradient(40% 70% at 30% 55%,color-mix(in srgb,var(--c1) 55%,transparent),transparent 70%);
  opacity: 0;
  transition: opacity calc(1.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq11-lava.on .gw {
  opacity: 1;
}

.uvq11-lava .lp {
  position: absolute;
  left: 3.6em;
  top: .5em;
  width: 5.4em;
  height: 13em;
}

.uvq11-lava .cap {
  position: absolute;
  left: 1.55em;
  top: 0;
  width: 2.3em;
  height: 1.9em;
  clip-path: polygon(28% 0,72% 0,100% 100%,0 100%);
  background: linear-gradient(90deg,#6d5416,#f7e3a6 35%,#c9a24a 55%,#5e4612);
}

.uvq11-lava .vs {
  position: absolute;
  left: .2em;
  top: 1.85em;
  width: 5em;
  height: 7.5em;
  clip-path: polygon(32% 0,68% 0,97% 64%,88% 100%,12% 100%,3% 64%);
}

.uvq11-lava .lq {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,color-mix(in srgb,var(--c2) 70%,#000),var(--c2) 45%,color-mix(in srgb,var(--c2) 60%,var(--c1)) 100%);
  transition: filter calc(1s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq11-lava:not(.on) .lq {
  filter: brightness(.45) saturate(.6);
}

.uvq11-lava .bl {
  position: absolute;
  inset: 0;
  filter: url(#uvq11-goo);
}

.uvq11-lava .bl::after {
  content: "";
  position: absolute;
  left: 5%;
  right: 5%;
  bottom: -.6em;
  height: 1.6em;
  border-radius: 50%;
  background: var(--c1);
}

.uvq11-lava .bl i {
  position: absolute;
  left: var(--x);
  bottom: -.2em;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%,color-mix(in srgb,var(--c1) 60%,#ffd166),var(--c1));
  animation: uvq11-lava calc(var(--d) * 1s / var(--k)) ease-in-out infinite alternate;
  animation-delay: calc(var(--dl) * 1s / var(--k));
}

.uvq11-lava:not(.on) .bl i {
  animation-play-state: paused;
}

.uvq11-lava .gx {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,rgba(255,255,255,.05) 0,rgba(255,255,255,.5) 13%,rgba(255,255,255,.08) 21%,transparent 40% 74%,rgba(255,255,255,.25) 85%,rgba(255,255,255,.04)),linear-gradient(180deg,rgba(255,255,255,.18),transparent 20%);
}

.uvq11-lava .bs {
  position: absolute;
  left: .1em;
  top: 9.3em;
  width: 5.2em;
  height: 3.4em;
  clip-path: polygon(12% 0,88% 0,100% 100%,0 100%);
  background: linear-gradient(90deg,#5e4612,#f7e3a6 30%,#c9a24a 50%,#7a5c1e 75%,#4a370d);
}

.uvq11-lava .bs::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: .3em;
  background: color-mix(in srgb,var(--c1) 60%,transparent);
  opacity: 0;
  transition: opacity calc(1s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq11-lava.on .bs::after {
  opacity: 1;
}

.uvq11-lava .tx {
  position: absolute;
  left: 11em;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  justify-items: start;
  gap: .7em;
}

.uvq11-lava .nm {
  margin: 0;
  font-size: 1.3em;
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.1;
  color: #ffe9d6;
}

.uvq11-lava .ch {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4em;
  padding: .55em 1em;
  border-radius: 2em;
  font-size: .78em;
  font-weight: 650;
  line-height: 1;
  color: #fff;
  background: rgba(255,255,255,.16);
  -webkit-backdrop-filter: blur(10px) saturate(1.7);
  backdrop-filter: blur(10px) saturate(1.7);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55),inset 0 -1px 0 rgba(255,255,255,.1),inset 0 0 0 1px rgba(255,255,255,.24),0 .5em 1.2em -.5em rgba(0,0,0,.45);
  transition: transform calc(0.3s / var(--k)) cubic-bezier(.34,1.56,.64,1),background calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq11-lava .ch:hover {
  background: rgba(255,255,255,.28);
}

.uvq11-lava .ch:active {
  transform: scale(.92);
}

.uvq11-lava .ch:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.uvq11-lava .ch svg {
  width: 1.15em;
  height: 1.15em;
}

.uvq11-lava .led {
  width: .6em;
  height: .6em;
  border-radius: 50%;
  background: #555;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.4);
  transition: all calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq11-lava .ch[aria-checked=true] .led {
  background: var(--c1);
  box-shadow: 0 0 .5em var(--c1);
}

@keyframes uvq11-lava {
  0% {
    transform: translateY(0) scale(1);
  }
  45% {
    transform: translateY(-5.5em) scale(.85,1.15);
  }
  100% {
    transform: translateY(-7.6em) scale(1.05,.9);
  }
}

@media (prefers-reduced-motion:reduce) {
  .uvq11-lava,.uvq11-lava *,.uvq11-lava *::before,.uvq11-lava *::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 b=el.querySelector(".ch");b.addEventListener("click",()=>{const o=!el.classList.contains("on");el.classList.toggle("on",o);b.setAttribute("aria-checked",String(o))})
}

export default function LgLavaLamp() {
  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": "#ff5a36",
          "--c2": "#5b21b6",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uvq11-lava on"><svg className="df" width="0" height="0" aria-hidden="true"><filter id="uvq11-goo"><feGaussianBlur stdDeviation="6" /><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 24 -10" /></filter></svg><i className="gw" aria-hidden="true"></i><div className="lp" aria-hidden="true"><i className="cap"></i><span className="vs"><span className="lq"><span className="bl"><i style={{ "--x": "22%", "--s": "1.7em", "--d": "11", "--dl": "-2" } as CSSProperties}></i><i style={{ "--x": "55%", "--s": "1.3em", "--d": "14", "--dl": "-7" } as CSSProperties}></i><i style={{ "--x": "38%", "--s": "2.1em", "--d": "17", "--dl": "-11" } as CSSProperties}></i><i style={{ "--x": "62%", "--s": "1.1em", "--d": "9", "--dl": "-4" } as CSSProperties}></i><i style={{ "--x": "30%", "--s": "1em", "--d": "12", "--dl": "-9" } as CSSProperties}></i><i style={{ "--x": "48%", "--s": "1.5em", "--d": "20", "--dl": "-15" } as CSSProperties}></i></span></span><i className="gx"></i></span><i className="bs"></i></div><div className="tx"><p className="nm">Model 1973</p><button type="button" className="ch" role="switch" aria-checked="true"><i className="led"></i>Light</button></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 “Lava lamp with switch” block (Liquid Glass) from AIMRAN Library to my project.

## What it is
A glass bottle where warm wax rises, falls and melts together; switch it on and the wall glows with its light.

## Chosen settings
- Main color: #ff5a36
- Secondary color: #5b21b6
- Size: 16px (from 12 to 24px)
- Speed: 1x (from 0.5 to 2x)
- Text: "Modelo 1973"

## 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-lava {
  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;
  background: radial-gradient(circle at 50% 50%,#5a3a24 0 .45em,transparent .5em) 0 0/2em 2em,radial-gradient(circle at 50% 50%,#4a2e1b 0 .3em,transparent .35em) 1em 1em/2em 2em,linear-gradient(#3b2518,#2a190f);
}

.uvq11-lava .df {
  position: absolute;
}

.uvq11-lava .gw {
  position: absolute;
  inset: 0;
  background: radial-gradient(40% 70% at 30% 55%,color-mix(in srgb,var(--c1) 55%,transparent),transparent 70%);
  opacity: 0;
  transition: opacity calc(1.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq11-lava.on .gw {
  opacity: 1;
}

.uvq11-lava .lp {
  position: absolute;
  left: 3.6em;
  top: .5em;
  width: 5.4em;
  height: 13em;
}

.uvq11-lava .cap {
  position: absolute;
  left: 1.55em;
  top: 0;
  width: 2.3em;
  height: 1.9em;
  clip-path: polygon(28% 0,72% 0,100% 100%,0 100%);
  background: linear-gradient(90deg,#6d5416,#f7e3a6 35%,#c9a24a 55%,#5e4612);
}

.uvq11-lava .vs {
  position: absolute;
  left: .2em;
  top: 1.85em;
  width: 5em;
  height: 7.5em;
  clip-path: polygon(32% 0,68% 0,97% 64%,88% 100%,12% 100%,3% 64%);
}

.uvq11-lava .lq {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,color-mix(in srgb,var(--c2) 70%,#000),var(--c2) 45%,color-mix(in srgb,var(--c2) 60%,var(--c1)) 100%);
  transition: filter calc(1s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq11-lava:not(.on) .lq {
  filter: brightness(.45) saturate(.6);
}

.uvq11-lava .bl {
  position: absolute;
  inset: 0;
  filter: url(#uvq11-goo);
}

.uvq11-lava .bl::after {
  content: "";
  position: absolute;
  left: 5%;
  right: 5%;
  bottom: -.6em;
  height: 1.6em;
  border-radius: 50%;
  background: var(--c1);
}

.uvq11-lava .bl i {
  position: absolute;
  left: var(--x);
  bottom: -.2em;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%,color-mix(in srgb,var(--c1) 60%,#ffd166),var(--c1));
  animation: uvq11-lava calc(var(--d) * 1s / var(--k)) ease-in-out infinite alternate;
  animation-delay: calc(var(--dl) * 1s / var(--k));
}

.uvq11-lava:not(.on) .bl i {
  animation-play-state: paused;
}

.uvq11-lava .gx {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,rgba(255,255,255,.05) 0,rgba(255,255,255,.5) 13%,rgba(255,255,255,.08) 21%,transparent 40% 74%,rgba(255,255,255,.25) 85%,rgba(255,255,255,.04)),linear-gradient(180deg,rgba(255,255,255,.18),transparent 20%);
}

.uvq11-lava .bs {
  position: absolute;
  left: .1em;
  top: 9.3em;
  width: 5.2em;
  height: 3.4em;
  clip-path: polygon(12% 0,88% 0,100% 100%,0 100%);
  background: linear-gradient(90deg,#5e4612,#f7e3a6 30%,#c9a24a 50%,#7a5c1e 75%,#4a370d);
}

.uvq11-lava .bs::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: .3em;
  background: color-mix(in srgb,var(--c1) 60%,transparent);
  opacity: 0;
  transition: opacity calc(1s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq11-lava.on .bs::after {
  opacity: 1;
}

.uvq11-lava .tx {
  position: absolute;
  left: 11em;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  justify-items: start;
  gap: .7em;
}

.uvq11-lava .nm {
  margin: 0;
  font-size: 1.3em;
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.1;
  color: #ffe9d6;
}

.uvq11-lava .ch {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4em;
  padding: .55em 1em;
  border-radius: 2em;
  font-size: .78em;
  font-weight: 650;
  line-height: 1;
  color: #fff;
  background: rgba(255,255,255,.16);
  -webkit-backdrop-filter: blur(10px) saturate(1.7);
  backdrop-filter: blur(10px) saturate(1.7);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55),inset 0 -1px 0 rgba(255,255,255,.1),inset 0 0 0 1px rgba(255,255,255,.24),0 .5em 1.2em -.5em rgba(0,0,0,.45);
  transition: transform calc(0.3s / var(--k)) cubic-bezier(.34,1.56,.64,1),background calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq11-lava .ch:hover {
  background: rgba(255,255,255,.28);
}

.uvq11-lava .ch:active {
  transform: scale(.92);
}

.uvq11-lava .ch:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.uvq11-lava .ch svg {
  width: 1.15em;
  height: 1.15em;
}

.uvq11-lava .led {
  width: .6em;
  height: .6em;
  border-radius: 50%;
  background: #555;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.4);
  transition: all calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq11-lava .ch[aria-checked=true] .led {
  background: var(--c1);
  box-shadow: 0 0 .5em var(--c1);
}

@keyframes uvq11-lava {
  0% {
    transform: translateY(0) scale(1);
  }
  45% {
    transform: translateY(-5.5em) scale(.85,1.15);
  }
  100% {
    transform: translateY(-7.6em) scale(1.05,.9);
  }
}

@media (prefers-reduced-motion:reduce) {
  .uvq11-lava,.uvq11-lava *,.uvq11-lava *::before,.uvq11-lava *::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 b=el.querySelector(".ch");b.addEventListener("click",()=>{const o=!el.classList.contains("on");el.classList.toggle("on",o);b.setAttribute("aria-checked",String(o))})
}

export default function LgLavaLamp() {
  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": "#ff5a36",
          "--c2": "#5b21b6",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uvq11-lava on"><svg className="df" width="0" height="0" aria-hidden="true"><filter id="uvq11-goo"><feGaussianBlur stdDeviation="6" /><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 24 -10" /></filter></svg><i className="gw" aria-hidden="true"></i><div className="lp" aria-hidden="true"><i className="cap"></i><span className="vs"><span className="lq"><span className="bl"><i style={{ "--x": "22%", "--s": "1.7em", "--d": "11", "--dl": "-2" } as CSSProperties}></i><i style={{ "--x": "55%", "--s": "1.3em", "--d": "14", "--dl": "-7" } as CSSProperties}></i><i style={{ "--x": "38%", "--s": "2.1em", "--d": "17", "--dl": "-11" } as CSSProperties}></i><i style={{ "--x": "62%", "--s": "1.1em", "--d": "9", "--dl": "-4" } as CSSProperties}></i><i style={{ "--x": "30%", "--s": "1em", "--d": "12", "--dl": "-9" } as CSSProperties}></i><i style={{ "--x": "48%", "--s": "1.5em", "--d": "20", "--dl": "-15" } as CSSProperties}></i></span></span><i className="gx"></i></span><i className="bs"></i></div><div className="tx"><p className="nm">Model 1973</p><button type="button" className="ch" role="switch" aria-checked="true"><i className="led"></i>Light</button></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.
````
