# Gas burner checkbox

> A hob seen from above: checking turns the knob, fires a spark and lights a crown of blue flames around the burner.

- Category: [Checkboxes](https://library.aimran.es/components/checkboxes)
- Built with: HTML + CSS
- Live editor: https://library.aimran.es/blocks/uv-chk-gas-burner
- Library: AIMRAN Library (https://library.aimran.es), free, no sign-up, by Aimran Oukham

## Where to use it

This checkbox is a gas hob seen from above, with a black enamel plate, a cast iron grate, a burner cap and a chrome knob beside it. Checking it turns the knob a quarter to the left, flashes a spark and lights fourteen blue flames one after another, which then flicker gently with a soft glow. It fits cooking apps, smart kitchen controls and recipe timers.

The main color is the base of the flame and the glow, the secondary color the tips, so blue gas, orange wood fire or a green fantasy flame all work. Reduced motion keeps the flames lit but still.

## Code

### HTML

```html
<label class="uvq02-gas"><input type="checkbox"><span class="bn" aria-hidden="true"><span class="gr"></span><span class="fl"><i style="--a:0deg;--i:0"></i><i style="--a:26deg;--i:1"></i><i style="--a:51deg;--i:2"></i><i style="--a:77deg;--i:3"></i><i style="--a:103deg;--i:4"></i><i style="--a:129deg;--i:5"></i><i style="--a:154deg;--i:6"></i><i style="--a:180deg;--i:7"></i><i style="--a:206deg;--i:8"></i><i style="--a:231deg;--i:9"></i><i style="--a:257deg;--i:10"></i><i style="--a:283deg;--i:11"></i><i style="--a:309deg;--i:12"></i><i style="--a:334deg;--i:13"></i></span><span class="cp"></span></span><span class="kn" aria-hidden="true"></span>Light the burner</label>
```

### CSS

```css
.uvq02-gas {
  --c1: #1f6fff;
  --c2: #8fd8ff;
  --s: 16px;
  /* tamaño */
  --k: 1;
  /* velocidad */
  --fg: #1d1d1f;
  /* texto */
  --bg: #f5f5f7;
  /* fondo */
}

.uvq02-gas {
  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;
  display: inline-flex;
  align-items: center;
  gap: .75em;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  font-weight: 550;
  gap: .8em;
}

.uvq02-gas input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.uvq02-gas .bn {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 3.8em;
  height: 3.8em;
  border-radius: .7em;
  background: radial-gradient(circle,#26282b,#141517 70%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12),0 .4em .7em -.3em rgba(0,0,0,.5);
}

.uvq02-gas .bn::after {
  content: "";
  position: absolute;
  inset: .3em;
  border-radius: 50%;
  background: radial-gradient(circle,color-mix(in srgb,var(--c1) 55%,transparent),transparent 68%);
  opacity: 0;
  transition: opacity calc(0.4s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq02-gas .gr {
  position: absolute;
  inset: .2em;
  background: linear-gradient(transparent calc(50% - .09em),#3c3f43 calc(50% - .09em) calc(50% + .09em),transparent calc(50% + .09em)),linear-gradient(90deg,transparent calc(50% - .09em),#3c3f43 calc(50% - .09em) calc(50% + .09em),transparent calc(50% + .09em));
  z-index: 2;
  pointer-events: none;
}

.uvq02-gas .fl {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
}

.uvq02-gas .fl i {
  position: absolute;
  left: 0;
  top: 0;
  transform: rotate(var(--a));
}

.uvq02-gas .fl i::before {
  content: "";
  position: absolute;
  left: -.13em;
  bottom: .68em;
  width: .26em;
  height: .62em;
  border-radius: 50% 50% 45% 45%/70% 70% 30% 30%;
  background: linear-gradient(to top,var(--c1),var(--c2) 70%,rgba(255,255,255,.85));
  filter: drop-shadow(0 0 .12em var(--c1));
  transform-origin: 50% 100%;
  transform: scaleY(0);
  opacity: 0;
  transition: transform calc(0.25s / var(--k)) cubic-bezier(.25,.1,.25,1),opacity calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq02-gas .cp {
  position: relative;
  z-index: 3;
  width: 1.35em;
  height: 1.35em;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%,#55585d,#1b1c1e 70%);
  box-shadow: 0 0 0 .1em #0b0b0c,0 .1em .15em rgba(0,0,0,.6);
}

.uvq02-gas .cp::after {
  content: "";
  position: absolute;
  left: 100%;
  top: 30%;
  width: .35em;
  height: .35em;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 .3em .1em #fff7c2;
  opacity: 0;
}

.uvq02-gas .kn {
  position: relative;
  flex: none;
  width: 1.8em;
  height: 1.8em;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%,#fdfdfd,#c4c6ca 60%,#8d9096);
  box-shadow: 0 0 0 .12em color-mix(in srgb,var(--fg) 12%,transparent),0 .2em .35em -.1em rgba(0,0,0,.45);
  transition: transform calc(0.45s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq02-gas .kn::before {
  content: "";
  position: absolute;
  left: 50%;
  top: .18em;
  width: .18em;
  height: .65em;
  margin-left: -.09em;
  border-radius: 1em;
  background: #2b2d30;
}

.uvq02-gas:hover .kn {
  transform: rotate(-12deg);
}

.uvq02-gas:active .kn {
  transform: rotate(-30deg) scale(.95);
}

.uvq02-gas input:checked ~ .kn {
  transform: rotate(-90deg);
}

.uvq02-gas input:checked + .bn::after {
  opacity: 1;
}

.uvq02-gas input:checked + .bn .fl i::before {
  transform: scaleY(1);
  opacity: .95;
  transition-delay: calc(calc(0.15s / var(--k)) + var(--i) * calc(0.02s / var(--k)));
  animation: uvq02-gas calc(0.5s / var(--k)) ease-in-out calc(var(--i) * calc(-0.07s / var(--k))) infinite alternate;
}

.uvq02-gas input:checked + .bn .cp::after {
  animation: uvq02-gas-k calc(0.3s / var(--k)) steps(2) 1;
}

@keyframes uvq02-gas {
  to {
    scale: .9 .78;
  }
}

@keyframes uvq02-gas-k {
  50% {
    opacity: 1;
  }
}

.uvq02-gas input:focus-visible + .bn {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

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

### React

```tsx
import type { CSSProperties } from "react";

const css = `
.uvq02-gas {
  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;
  display: inline-flex;
  align-items: center;
  gap: .75em;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  font-weight: 550;
  gap: .8em;
}

.uvq02-gas input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.uvq02-gas .bn {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 3.8em;
  height: 3.8em;
  border-radius: .7em;
  background: radial-gradient(circle,#26282b,#141517 70%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12),0 .4em .7em -.3em rgba(0,0,0,.5);
}

.uvq02-gas .bn::after {
  content: "";
  position: absolute;
  inset: .3em;
  border-radius: 50%;
  background: radial-gradient(circle,color-mix(in srgb,var(--c1) 55%,transparent),transparent 68%);
  opacity: 0;
  transition: opacity calc(0.4s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq02-gas .gr {
  position: absolute;
  inset: .2em;
  background: linear-gradient(transparent calc(50% - .09em),#3c3f43 calc(50% - .09em) calc(50% + .09em),transparent calc(50% + .09em)),linear-gradient(90deg,transparent calc(50% - .09em),#3c3f43 calc(50% - .09em) calc(50% + .09em),transparent calc(50% + .09em));
  z-index: 2;
  pointer-events: none;
}

.uvq02-gas .fl {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
}

.uvq02-gas .fl i {
  position: absolute;
  left: 0;
  top: 0;
  transform: rotate(var(--a));
}

.uvq02-gas .fl i::before {
  content: "";
  position: absolute;
  left: -.13em;
  bottom: .68em;
  width: .26em;
  height: .62em;
  border-radius: 50% 50% 45% 45%/70% 70% 30% 30%;
  background: linear-gradient(to top,var(--c1),var(--c2) 70%,rgba(255,255,255,.85));
  filter: drop-shadow(0 0 .12em var(--c1));
  transform-origin: 50% 100%;
  transform: scaleY(0);
  opacity: 0;
  transition: transform calc(0.25s / var(--k)) cubic-bezier(.25,.1,.25,1),opacity calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq02-gas .cp {
  position: relative;
  z-index: 3;
  width: 1.35em;
  height: 1.35em;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%,#55585d,#1b1c1e 70%);
  box-shadow: 0 0 0 .1em #0b0b0c,0 .1em .15em rgba(0,0,0,.6);
}

.uvq02-gas .cp::after {
  content: "";
  position: absolute;
  left: 100%;
  top: 30%;
  width: .35em;
  height: .35em;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 .3em .1em #fff7c2;
  opacity: 0;
}

.uvq02-gas .kn {
  position: relative;
  flex: none;
  width: 1.8em;
  height: 1.8em;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%,#fdfdfd,#c4c6ca 60%,#8d9096);
  box-shadow: 0 0 0 .12em color-mix(in srgb,var(--fg) 12%,transparent),0 .2em .35em -.1em rgba(0,0,0,.45);
  transition: transform calc(0.45s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq02-gas .kn::before {
  content: "";
  position: absolute;
  left: 50%;
  top: .18em;
  width: .18em;
  height: .65em;
  margin-left: -.09em;
  border-radius: 1em;
  background: #2b2d30;
}

.uvq02-gas:hover .kn {
  transform: rotate(-12deg);
}

.uvq02-gas:active .kn {
  transform: rotate(-30deg) scale(.95);
}

.uvq02-gas input:checked ~ .kn {
  transform: rotate(-90deg);
}

.uvq02-gas input:checked + .bn::after {
  opacity: 1;
}

.uvq02-gas input:checked + .bn .fl i::before {
  transform: scaleY(1);
  opacity: .95;
  transition-delay: calc(calc(0.15s / var(--k)) + var(--i) * calc(0.02s / var(--k)));
  animation: uvq02-gas calc(0.5s / var(--k)) ease-in-out calc(var(--i) * calc(-0.07s / var(--k))) infinite alternate;
}

.uvq02-gas input:checked + .bn .cp::after {
  animation: uvq02-gas-k calc(0.3s / var(--k)) steps(2) 1;
}

@keyframes uvq02-gas {
  to {
    scale: .9 .78;
  }
}

@keyframes uvq02-gas-k {
  50% {
    opacity: 1;
  }
}

.uvq02-gas input:focus-visible + .bn {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

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

export default function ChkGasBurner() {
  return (
    <>
      <style>{css}</style>
      <div
        style={{
          "--c1": "#1f6fff",
          "--c2": "#8fd8ff",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <label className="uvq02-gas"><input type="checkbox" /><span className="bn" aria-hidden="true"><span className="gr"></span><span className="fl"><i style={{ "--a": "0deg", "--i": "0" } as CSSProperties}></i><i style={{ "--a": "26deg", "--i": "1" } as CSSProperties}></i><i style={{ "--a": "51deg", "--i": "2" } as CSSProperties}></i><i style={{ "--a": "77deg", "--i": "3" } as CSSProperties}></i><i style={{ "--a": "103deg", "--i": "4" } as CSSProperties}></i><i style={{ "--a": "129deg", "--i": "5" } as CSSProperties}></i><i style={{ "--a": "154deg", "--i": "6" } as CSSProperties}></i><i style={{ "--a": "180deg", "--i": "7" } as CSSProperties}></i><i style={{ "--a": "206deg", "--i": "8" } as CSSProperties}></i><i style={{ "--a": "231deg", "--i": "9" } as CSSProperties}></i><i style={{ "--a": "257deg", "--i": "10" } as CSSProperties}></i><i style={{ "--a": "283deg", "--i": "11" } as CSSProperties}></i><i style={{ "--a": "309deg", "--i": "12" } as CSSProperties}></i><i style={{ "--a": "334deg", "--i": "13" } as CSSProperties}></i></span><span className="cp"></span></span><span className="kn" aria-hidden="true"></span>Light the burner</label>
      </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 “Gas burner checkbox” block (Checkboxes) from AIMRAN Library to my project.

## What it is
A hob seen from above: checking turns the knob, fires a spark and lights a crown of blue flames around the burner.

## Chosen settings
- Main color: #1f6fff
- Secondary color: #8fd8ff
- Size: 16px (from 12 to 24px)
- Speed: 1x (from 0.5 to 2x)
- Text: "Encender el fogón"

## 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
import type { CSSProperties } from "react";

const css = `
.uvq02-gas {
  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;
  display: inline-flex;
  align-items: center;
  gap: .75em;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  font-weight: 550;
  gap: .8em;
}

.uvq02-gas input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.uvq02-gas .bn {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 3.8em;
  height: 3.8em;
  border-radius: .7em;
  background: radial-gradient(circle,#26282b,#141517 70%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12),0 .4em .7em -.3em rgba(0,0,0,.5);
}

.uvq02-gas .bn::after {
  content: "";
  position: absolute;
  inset: .3em;
  border-radius: 50%;
  background: radial-gradient(circle,color-mix(in srgb,var(--c1) 55%,transparent),transparent 68%);
  opacity: 0;
  transition: opacity calc(0.4s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq02-gas .gr {
  position: absolute;
  inset: .2em;
  background: linear-gradient(transparent calc(50% - .09em),#3c3f43 calc(50% - .09em) calc(50% + .09em),transparent calc(50% + .09em)),linear-gradient(90deg,transparent calc(50% - .09em),#3c3f43 calc(50% - .09em) calc(50% + .09em),transparent calc(50% + .09em));
  z-index: 2;
  pointer-events: none;
}

.uvq02-gas .fl {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
}

.uvq02-gas .fl i {
  position: absolute;
  left: 0;
  top: 0;
  transform: rotate(var(--a));
}

.uvq02-gas .fl i::before {
  content: "";
  position: absolute;
  left: -.13em;
  bottom: .68em;
  width: .26em;
  height: .62em;
  border-radius: 50% 50% 45% 45%/70% 70% 30% 30%;
  background: linear-gradient(to top,var(--c1),var(--c2) 70%,rgba(255,255,255,.85));
  filter: drop-shadow(0 0 .12em var(--c1));
  transform-origin: 50% 100%;
  transform: scaleY(0);
  opacity: 0;
  transition: transform calc(0.25s / var(--k)) cubic-bezier(.25,.1,.25,1),opacity calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq02-gas .cp {
  position: relative;
  z-index: 3;
  width: 1.35em;
  height: 1.35em;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%,#55585d,#1b1c1e 70%);
  box-shadow: 0 0 0 .1em #0b0b0c,0 .1em .15em rgba(0,0,0,.6);
}

.uvq02-gas .cp::after {
  content: "";
  position: absolute;
  left: 100%;
  top: 30%;
  width: .35em;
  height: .35em;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 .3em .1em #fff7c2;
  opacity: 0;
}

.uvq02-gas .kn {
  position: relative;
  flex: none;
  width: 1.8em;
  height: 1.8em;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%,#fdfdfd,#c4c6ca 60%,#8d9096);
  box-shadow: 0 0 0 .12em color-mix(in srgb,var(--fg) 12%,transparent),0 .2em .35em -.1em rgba(0,0,0,.45);
  transition: transform calc(0.45s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq02-gas .kn::before {
  content: "";
  position: absolute;
  left: 50%;
  top: .18em;
  width: .18em;
  height: .65em;
  margin-left: -.09em;
  border-radius: 1em;
  background: #2b2d30;
}

.uvq02-gas:hover .kn {
  transform: rotate(-12deg);
}

.uvq02-gas:active .kn {
  transform: rotate(-30deg) scale(.95);
}

.uvq02-gas input:checked ~ .kn {
  transform: rotate(-90deg);
}

.uvq02-gas input:checked + .bn::after {
  opacity: 1;
}

.uvq02-gas input:checked + .bn .fl i::before {
  transform: scaleY(1);
  opacity: .95;
  transition-delay: calc(calc(0.15s / var(--k)) + var(--i) * calc(0.02s / var(--k)));
  animation: uvq02-gas calc(0.5s / var(--k)) ease-in-out calc(var(--i) * calc(-0.07s / var(--k))) infinite alternate;
}

.uvq02-gas input:checked + .bn .cp::after {
  animation: uvq02-gas-k calc(0.3s / var(--k)) steps(2) 1;
}

@keyframes uvq02-gas {
  to {
    scale: .9 .78;
  }
}

@keyframes uvq02-gas-k {
  50% {
    opacity: 1;
  }
}

.uvq02-gas input:focus-visible + .bn {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

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

export default function ChkGasBurner() {
  return (
    <>
      <style>{css}</style>
      <div
        style={{
          "--c1": "#1f6fff",
          "--c2": "#8fd8ff",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <label className="uvq02-gas"><input type="checkbox" /><span className="bn" aria-hidden="true"><span className="gr"></span><span className="fl"><i style={{ "--a": "0deg", "--i": "0" } as CSSProperties}></i><i style={{ "--a": "26deg", "--i": "1" } as CSSProperties}></i><i style={{ "--a": "51deg", "--i": "2" } as CSSProperties}></i><i style={{ "--a": "77deg", "--i": "3" } as CSSProperties}></i><i style={{ "--a": "103deg", "--i": "4" } as CSSProperties}></i><i style={{ "--a": "129deg", "--i": "5" } as CSSProperties}></i><i style={{ "--a": "154deg", "--i": "6" } as CSSProperties}></i><i style={{ "--a": "180deg", "--i": "7" } as CSSProperties}></i><i style={{ "--a": "206deg", "--i": "8" } as CSSProperties}></i><i style={{ "--a": "231deg", "--i": "9" } as CSSProperties}></i><i style={{ "--a": "257deg", "--i": "10" } as CSSProperties}></i><i style={{ "--a": "283deg", "--i": "11" } as CSSProperties}></i><i style={{ "--a": "309deg", "--i": "12" } as CSSProperties}></i><i style={{ "--a": "334deg", "--i": "13" } as CSSProperties}></i></span><span className="cp"></span></span><span className="kn" aria-hidden="true"></span>Light the burner</label>
      </div>
    </>
  );
}
```

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