# On air light toast

> A studio's red light box flickers as it switches on while the broadcast clock runs and the viewer count climbs.

- Category: [Toasts](https://library.aimran.es/components/toasts)
- Built with: HTML + CSS
- Live editor: https://library.aimran.es/blocks/uv-toast-on-air
- Library: AIMRAN Library (https://library.aimran.es), free, no sign-up, by Aimran Oukham

## Where to use it

Every studio has that red sign that says you are live, and this toast makes it the hero. The light box starts dim, flickers through a stepped filter animation like a warming bulb, then hums with a soft glow. Next to it the broadcast time and viewer count update every second in a line hidden from screen readers, so the live region stays calm.

The main color is the light and the second the warm glow around the letters. Hook the timer and viewer number to real data, and use the End button to stop your stream; the light dims before the toast leaves. Made for streaming, webinars and live shopping.

## Code

### HTML

```html
<div class="uvq09-air"><button type="button" class="fire">Go live again</button><div class="tt" role="status"><span class="lt" aria-hidden="true"><span>ON AIR</span></span><span class="tx"><b>Your broadcast has started</b><small aria-hidden="true"><span class="tm">00:00</span> · <span class="vw">0</span> viewers</small></span><button type="button" class="end">End</button></div></div>
```

### CSS

```css
.uvq09-air {
  --c1: #ef4444;
  --c2: #fde68a;
  --s: 16px;
  /* tamaño */
  --k: 1;
  /* velocidad */
  --fg: #1d1d1f;
  /* texto */
  --bg: #f5f5f7;
  /* fondo */
}

.uvq09-air {
  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: 21em;
  height: 15em;
}

.uvq09-air .fire {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  position: absolute;
  left: 50%;
  top: 1.2em;
  translate: -50% 0;
  padding: .6em 1.1em;
  border-radius: 2em;
  font-size: .82em;
  font-weight: 650;
  white-space: nowrap;
  color: color-mix(in srgb,var(--fg) 55%,transparent);
  background: color-mix(in srgb,var(--fg) 6%,transparent);
  transition: color calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1),background calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1),scale calc(0.15s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq09-air .fire:hover {
  color: var(--fg);
  background: color-mix(in srgb,var(--fg) 10%,transparent);
}

.uvq09-air .fire:active {
  scale: .96;
}

.uvq09-air .fire:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

.uvq09-air .tt {
  position: absolute;
  left: 50%;
  bottom: 1em;
  width: 19em;
  translate: -50% 0;
  border-radius: 1.1em;
  background: color-mix(in srgb,var(--fg) 3%,var(--bg));
  box-shadow: 0 0 0 1px color-mix(in srgb,var(--fg) 10%,transparent),0 1.2em 2.4em -1em rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  gap: .8em;
  padding: .75em .8em;
  transform: translateY(130%) scale(.92);
  opacity: 0;
  transition: transform calc(0.55s / var(--k)) cubic-bezier(.22,1,.36,1),opacity calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq09-air .tt.in {
  transform: none;
  opacity: 1;
}

.uvq09-air .lt {
  display: grid;
  place-items: center;
  flex: none;
  width: 4.7em;
  height: 2.5em;
  border-radius: .35em;
  background: radial-gradient(circle,color-mix(in srgb,var(--c1) 60%,#fff),var(--c1) 60%,color-mix(in srgb,var(--c1) 70%,#000));
  box-shadow: inset 0 0 0 .2em #121212,inset 0 0 0 .27em #3d3d40,0 0 1.4em color-mix(in srgb,var(--c1) 65%,transparent);
  filter: brightness(.28) saturate(.5);
}

.uvq09-air .lt span {
  font: 900 .6em/1 "Arial Black",system-ui,sans-serif;
  letter-spacing: .08em;
  color: #fff;
  text-shadow: 0 0 .4em #fff,0 0 .9em var(--c2);
}

.uvq09-air .tt.in .lt {
  animation: uvq09-air-f calc(1.1s / var(--k)) steps(1,end) calc(0.35s / var(--k)) forwards,uvq09-air-h calc(2.4s / var(--k)) ease-in-out calc(1.5s / var(--k)) infinite alternate;
}

.uvq09-air .tt.off .lt {
  animation: none;
  filter: brightness(.28) saturate(.5);
  transition: filter calc(0.4s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq09-air .tx {
  display: grid;
  flex: 1;
  gap: .15em;
  min-width: 0;
}

.uvq09-air .tx b {
  font-size: .92em;
}

.uvq09-air small {
  font-size: .72em;
  color: color-mix(in srgb,var(--fg) 55%,transparent);
  font-variant-numeric: tabular-nums;
}

.uvq09-air .end {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  flex: none;
  padding: .5em .8em;
  border-radius: .6em;
  font-size: .76em;
  font-weight: 750;
  color: color-mix(in srgb,var(--c1) 80%,var(--fg));
  background: color-mix(in srgb,var(--c1) 13%,transparent);
  transition: background calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1),scale calc(0.15s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq09-air .end:hover {
  background: color-mix(in srgb,var(--c1) 22%,transparent);
}

.uvq09-air .end:active {
  scale: .94;
}

.uvq09-air .end:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

@keyframes uvq09-air-f {
  0% {
    filter: brightness(.28) saturate(.5);
  }
  10% {
    filter: none;
  }
  16% {
    filter: brightness(.3) saturate(.5);
  }
  26% {
    filter: none;
  }
  31% {
    filter: brightness(.35) saturate(.6);
  }
  45%,100% {
    filter: none;
  }
}

@keyframes uvq09-air-h {
  from {
    filter: none;
  }
  to {
    filter: brightness(1.12);
  }
}

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

### JavaScript

```js
document.querySelectorAll(".uvq09-air").forEach(el => {
  const t=el.querySelector(".tt"),f=el.querySelector(".fire");let tm=[];const clr=()=>{tm.forEach(clearTimeout);tm=[]};const later=(fn,ms)=>tm.push(setTimeout(fn,ms));
const show=()=>{clr();t.classList.remove("in","out");void t.offsetWidth;later(()=>{t.classList.add("in");start()},60)};
const hide=()=>{t.classList.remove("in");t.classList.add("out")};f.addEventListener("click",show);show();const tk=t.querySelector(".tm"),vw=t.querySelector(".vw");let iv=0,s=0,v=0;
const p2=n=>String(n).padStart(2,"0");const tick=()=>{s++;v+=Math.round(Math.random()*120+40);tk.textContent=p2(Math.floor(s/60))+":"+p2(s%60);vw.textContent=v.toLocaleString(document.documentElement.lang||undefined)};
const start=()=>{clearInterval(iv);s=0;v=0;tk.textContent="00:00";vw.textContent="0";t.classList.remove("off");iv=setInterval(tick,1000)};
t.querySelector(".end").addEventListener("click",()=>{clearInterval(iv);t.classList.add("off");later(hide,900)});return()=>{clr();clearInterval(iv)}
});
```

### 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 = `
.uvq09-air {
  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: 21em;
  height: 15em;
}

.uvq09-air .fire {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  position: absolute;
  left: 50%;
  top: 1.2em;
  translate: -50% 0;
  padding: .6em 1.1em;
  border-radius: 2em;
  font-size: .82em;
  font-weight: 650;
  white-space: nowrap;
  color: color-mix(in srgb,var(--fg) 55%,transparent);
  background: color-mix(in srgb,var(--fg) 6%,transparent);
  transition: color calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1),background calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1),scale calc(0.15s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq09-air .fire:hover {
  color: var(--fg);
  background: color-mix(in srgb,var(--fg) 10%,transparent);
}

.uvq09-air .fire:active {
  scale: .96;
}

.uvq09-air .fire:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

.uvq09-air .tt {
  position: absolute;
  left: 50%;
  bottom: 1em;
  width: 19em;
  translate: -50% 0;
  border-radius: 1.1em;
  background: color-mix(in srgb,var(--fg) 3%,var(--bg));
  box-shadow: 0 0 0 1px color-mix(in srgb,var(--fg) 10%,transparent),0 1.2em 2.4em -1em rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  gap: .8em;
  padding: .75em .8em;
  transform: translateY(130%) scale(.92);
  opacity: 0;
  transition: transform calc(0.55s / var(--k)) cubic-bezier(.22,1,.36,1),opacity calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq09-air .tt.in {
  transform: none;
  opacity: 1;
}

.uvq09-air .lt {
  display: grid;
  place-items: center;
  flex: none;
  width: 4.7em;
  height: 2.5em;
  border-radius: .35em;
  background: radial-gradient(circle,color-mix(in srgb,var(--c1) 60%,#fff),var(--c1) 60%,color-mix(in srgb,var(--c1) 70%,#000));
  box-shadow: inset 0 0 0 .2em #121212,inset 0 0 0 .27em #3d3d40,0 0 1.4em color-mix(in srgb,var(--c1) 65%,transparent);
  filter: brightness(.28) saturate(.5);
}

.uvq09-air .lt span {
  font: 900 .6em/1 "Arial Black",system-ui,sans-serif;
  letter-spacing: .08em;
  color: #fff;
  text-shadow: 0 0 .4em #fff,0 0 .9em var(--c2);
}

.uvq09-air .tt.in .lt {
  animation: uvq09-air-f calc(1.1s / var(--k)) steps(1,end) calc(0.35s / var(--k)) forwards,uvq09-air-h calc(2.4s / var(--k)) ease-in-out calc(1.5s / var(--k)) infinite alternate;
}

.uvq09-air .tt.off .lt {
  animation: none;
  filter: brightness(.28) saturate(.5);
  transition: filter calc(0.4s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq09-air .tx {
  display: grid;
  flex: 1;
  gap: .15em;
  min-width: 0;
}

.uvq09-air .tx b {
  font-size: .92em;
}

.uvq09-air small {
  font-size: .72em;
  color: color-mix(in srgb,var(--fg) 55%,transparent);
  font-variant-numeric: tabular-nums;
}

.uvq09-air .end {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  flex: none;
  padding: .5em .8em;
  border-radius: .6em;
  font-size: .76em;
  font-weight: 750;
  color: color-mix(in srgb,var(--c1) 80%,var(--fg));
  background: color-mix(in srgb,var(--c1) 13%,transparent);
  transition: background calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1),scale calc(0.15s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq09-air .end:hover {
  background: color-mix(in srgb,var(--c1) 22%,transparent);
}

.uvq09-air .end:active {
  scale: .94;
}

.uvq09-air .end:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

@keyframes uvq09-air-f {
  0% {
    filter: brightness(.28) saturate(.5);
  }
  10% {
    filter: none;
  }
  16% {
    filter: brightness(.3) saturate(.5);
  }
  26% {
    filter: none;
  }
  31% {
    filter: brightness(.35) saturate(.6);
  }
  45%,100% {
    filter: none;
  }
}

@keyframes uvq09-air-h {
  from {
    filter: none;
  }
  to {
    filter: brightness(1.12);
  }
}

@media (prefers-reduced-motion:reduce) {
  .uvq09-air,.uvq09-air *,.uvq09-air *::before,.uvq09-air *::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 t=el.querySelector(".tt"),f=el.querySelector(".fire");let tm=[];const clr=()=>{tm.forEach(clearTimeout);tm=[]};const later=(fn,ms)=>tm.push(setTimeout(fn,ms));
const show=()=>{clr();t.classList.remove("in","out");void t.offsetWidth;later(()=>{t.classList.add("in");start()},60)};
const hide=()=>{t.classList.remove("in");t.classList.add("out")};f.addEventListener("click",show);show();const tk=t.querySelector(".tm"),vw=t.querySelector(".vw");let iv=0,s=0,v=0;
const p2=n=>String(n).padStart(2,"0");const tick=()=>{s++;v+=Math.round(Math.random()*120+40);tk.textContent=p2(Math.floor(s/60))+":"+p2(s%60);vw.textContent=v.toLocaleString(document.documentElement.lang||undefined)};
const start=()=>{clearInterval(iv);s=0;v=0;tk.textContent="00:00";vw.textContent="0";t.classList.remove("off");iv=setInterval(tick,1000)};
t.querySelector(".end").addEventListener("click",()=>{clearInterval(iv);t.classList.add("off");later(hide,900)});return()=>{clr();clearInterval(iv)}
}

export default function ToastOnAir() {
  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": "#ef4444",
          "--c2": "#fde68a",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uvq09-air"><button type="button" className="fire">Go live again</button><div className="tt" role="status"><span className="lt" aria-hidden="true"><span>ON AIR</span></span><span className="tx"><b>Your broadcast has started</b><small aria-hidden="true"><span className="tm">00:00</span> · <span className="vw">0</span> viewers</small></span><button type="button" className="end">End</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 “On air light toast” block (Toasts) from AIMRAN Library to my project.

## What it is
A studio's red light box flickers as it switches on while the broadcast clock runs and the viewer count climbs.

## Chosen settings
- Main color: #ef4444
- Secondary color: #fde68a
- Size: 16px (from 12 to 24px)
- Speed: 1x (from 0.5 to 2x)
- Text: "Tu emisión ha empezado"

## 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 = `
.uvq09-air {
  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: 21em;
  height: 15em;
}

.uvq09-air .fire {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  position: absolute;
  left: 50%;
  top: 1.2em;
  translate: -50% 0;
  padding: .6em 1.1em;
  border-radius: 2em;
  font-size: .82em;
  font-weight: 650;
  white-space: nowrap;
  color: color-mix(in srgb,var(--fg) 55%,transparent);
  background: color-mix(in srgb,var(--fg) 6%,transparent);
  transition: color calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1),background calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1),scale calc(0.15s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq09-air .fire:hover {
  color: var(--fg);
  background: color-mix(in srgb,var(--fg) 10%,transparent);
}

.uvq09-air .fire:active {
  scale: .96;
}

.uvq09-air .fire:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

.uvq09-air .tt {
  position: absolute;
  left: 50%;
  bottom: 1em;
  width: 19em;
  translate: -50% 0;
  border-radius: 1.1em;
  background: color-mix(in srgb,var(--fg) 3%,var(--bg));
  box-shadow: 0 0 0 1px color-mix(in srgb,var(--fg) 10%,transparent),0 1.2em 2.4em -1em rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  gap: .8em;
  padding: .75em .8em;
  transform: translateY(130%) scale(.92);
  opacity: 0;
  transition: transform calc(0.55s / var(--k)) cubic-bezier(.22,1,.36,1),opacity calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq09-air .tt.in {
  transform: none;
  opacity: 1;
}

.uvq09-air .lt {
  display: grid;
  place-items: center;
  flex: none;
  width: 4.7em;
  height: 2.5em;
  border-radius: .35em;
  background: radial-gradient(circle,color-mix(in srgb,var(--c1) 60%,#fff),var(--c1) 60%,color-mix(in srgb,var(--c1) 70%,#000));
  box-shadow: inset 0 0 0 .2em #121212,inset 0 0 0 .27em #3d3d40,0 0 1.4em color-mix(in srgb,var(--c1) 65%,transparent);
  filter: brightness(.28) saturate(.5);
}

.uvq09-air .lt span {
  font: 900 .6em/1 "Arial Black",system-ui,sans-serif;
  letter-spacing: .08em;
  color: #fff;
  text-shadow: 0 0 .4em #fff,0 0 .9em var(--c2);
}

.uvq09-air .tt.in .lt {
  animation: uvq09-air-f calc(1.1s / var(--k)) steps(1,end) calc(0.35s / var(--k)) forwards,uvq09-air-h calc(2.4s / var(--k)) ease-in-out calc(1.5s / var(--k)) infinite alternate;
}

.uvq09-air .tt.off .lt {
  animation: none;
  filter: brightness(.28) saturate(.5);
  transition: filter calc(0.4s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq09-air .tx {
  display: grid;
  flex: 1;
  gap: .15em;
  min-width: 0;
}

.uvq09-air .tx b {
  font-size: .92em;
}

.uvq09-air small {
  font-size: .72em;
  color: color-mix(in srgb,var(--fg) 55%,transparent);
  font-variant-numeric: tabular-nums;
}

.uvq09-air .end {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  flex: none;
  padding: .5em .8em;
  border-radius: .6em;
  font-size: .76em;
  font-weight: 750;
  color: color-mix(in srgb,var(--c1) 80%,var(--fg));
  background: color-mix(in srgb,var(--c1) 13%,transparent);
  transition: background calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1),scale calc(0.15s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq09-air .end:hover {
  background: color-mix(in srgb,var(--c1) 22%,transparent);
}

.uvq09-air .end:active {
  scale: .94;
}

.uvq09-air .end:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

@keyframes uvq09-air-f {
  0% {
    filter: brightness(.28) saturate(.5);
  }
  10% {
    filter: none;
  }
  16% {
    filter: brightness(.3) saturate(.5);
  }
  26% {
    filter: none;
  }
  31% {
    filter: brightness(.35) saturate(.6);
  }
  45%,100% {
    filter: none;
  }
}

@keyframes uvq09-air-h {
  from {
    filter: none;
  }
  to {
    filter: brightness(1.12);
  }
}

@media (prefers-reduced-motion:reduce) {
  .uvq09-air,.uvq09-air *,.uvq09-air *::before,.uvq09-air *::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 t=el.querySelector(".tt"),f=el.querySelector(".fire");let tm=[];const clr=()=>{tm.forEach(clearTimeout);tm=[]};const later=(fn,ms)=>tm.push(setTimeout(fn,ms));
const show=()=>{clr();t.classList.remove("in","out");void t.offsetWidth;later(()=>{t.classList.add("in");start()},60)};
const hide=()=>{t.classList.remove("in");t.classList.add("out")};f.addEventListener("click",show);show();const tk=t.querySelector(".tm"),vw=t.querySelector(".vw");let iv=0,s=0,v=0;
const p2=n=>String(n).padStart(2,"0");const tick=()=>{s++;v+=Math.round(Math.random()*120+40);tk.textContent=p2(Math.floor(s/60))+":"+p2(s%60);vw.textContent=v.toLocaleString(document.documentElement.lang||undefined)};
const start=()=>{clearInterval(iv);s=0;v=0;tk.textContent="00:00";vw.textContent="0";t.classList.remove("off");iv=setInterval(tick,1000)};
t.querySelector(".end").addEventListener("click",()=>{clearInterval(iv);t.classList.add("off");later(hide,900)});return()=>{clr();clearInterval(iv)}
}

export default function ToastOnAir() {
  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": "#ef4444",
          "--c2": "#fde68a",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uvq09-air"><button type="button" className="fire">Go live again</button><div className="tt" role="status"><span className="lt" aria-hidden="true"><span>ON AIR</span></span><span className="tx"><b>Your broadcast has started</b><small aria-hidden="true"><span className="tm">00:00</span> · <span className="vw">0</span> viewers</small></span><button type="button" className="end">End</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.
````
