# Micropipette volume input

> Set the microlitres and the pipette's counter drums roll; aspirate and the plunger dips while the tip fills with that amount.

- Category: [Inputs](https://library.aimran.es/components/inputs)
- Built with: HTML + CSS
- Live editor: https://library.aimran.es/blocks/uv-in-pipette-volume
- Library: AIMRAN Library (https://library.aimran.es), free, no sign-up, by Aimran Oukham

## Where to use it

A volume field drawn as a laboratory micropipette. The number input and its plus and minus buttons drive three mechanical counter drums in the pipette window, each rolling with a small spring. Pressing Aspirate pushes the coloured plunger and fills the clear tip in proportion to the volume, and Dispense empties it with a falling drop.

The main color paints the plunger button and the second color the liquid, so you can match the colour codes used for each pipette size. Use it in lab software, science teaching and protocol builders, and change the range in the script for other pipettes.

## Code

### HTML

```html
<div class="uvq06-pp"><div class="pi" aria-hidden="true"><span class="pk"></span><span class="pb"><span class="wn"><span class="dr"><span><b>0</b><b>1</b><b>2</b><b>3</b><b>4</b><b>5</b><b>6</b><b>7</b><b>8</b><b>9</b></span></span><span class="dr"><span><b>0</b><b>1</b><b>2</b><b>3</b><b>4</b><b>5</b><b>6</b><b>7</b><b>8</b><b>9</b></span></span><span class="dr"><span><b>0</b><b>1</b><b>2</b><b>3</b><b>4</b><b>5</b><b>6</b><b>7</b><b>8</b><b>9</b></span></span></span><span class="ul">µL</span></span><span class="ej"></span><span class="tp"><i></i></span><span class="dq"></span></div><div class="sd"><label for="uvq06-pp-in" class="lb">Sample volume</label><div class="fd"><button type="button" class="st" data-s="-1" aria-label="Less volume">−</button><input id="uvq06-pp-in" type="number" inputmode="numeric" min="10" max="100" step="1"><span class="un">µL</span><button type="button" class="st" data-s="1" aria-label="More volume">+</button></div><button type="button" class="as">Aspirate</button><p class="ht" aria-live="polite">Range 10 to 100 µL</p></div></div>
```

### CSS

```css
.uvq06-pp {
  --c1: #f59e0b;
  --c2: #38bdf8;
  --s: 16px;
  /* tamaño */
  --k: 1;
  /* velocidad */
  --fg: #1d1d1f;
  /* texto */
  --bg: #f5f5f7;
  /* fondo */
}

@property --uvq06-pp {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}

.uvq06-pp {
  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;
  display: flex;
  align-items: center;
  gap: 1.4em;
  width: 18em;
  --uvq06-pp: 0;
  transition: --uvq06-pp calc(0.9s / var(--k)) cubic-bezier(.22,1,.36,1);
}

.uvq06-pp .pi {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: none;
  width: 3em;
}

.uvq06-pp .pk {
  position: relative;
  z-index: 1;
  width: 2.1em;
  height: 1em;
  border-radius: .5em .5em .3em .3em;
  background: linear-gradient(color-mix(in srgb,var(--c1) 70%,#fff),var(--c1) 55%,color-mix(in srgb,var(--c1) 75%,#000));
  box-shadow: 0 .2em .3em rgba(0,0,0,.25);
}

.uvq06-pp .pk::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: .42em;
  height: .6em;
  margin-left: -.21em;
  background: linear-gradient(90deg,#9aa1a9,#e5e7eb,#9aa1a9);
}

.uvq06-pp.push .pk {
  animation: uvq06-pp-k calc(0.55s / var(--k)) cubic-bezier(.22,1,.36,1);
}

.uvq06-pp .pb {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3em;
  width: 2.6em;
  margin-top: .55em;
  padding: .55em 0 .7em;
  border-radius: 1.2em 1.2em .7em .7em;
  background: linear-gradient(90deg,#aeb5be,#eef0f3 35%,#d3d8de 65%,#9aa2ac);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.12),0 .6em 1em -.5em rgba(0,0,0,.45);
}

.uvq06-pp .pb::before {
  content: "";
  position: absolute;
  right: -.55em;
  top: 1.1em;
  width: .75em;
  height: 1.8em;
  border-radius: 0 .6em .6em 0;
  background: linear-gradient(90deg,#b9c0c8,#8f97a1);
  z-index: -1;
}

.uvq06-pp .wn {
  display: flex;
  flex-direction: column;
  padding: .15em .25em;
  border-radius: .3em;
  background: #16181c;
  box-shadow: inset 0 .1em .2em rgba(0,0,0,.6);
}

.uvq06-pp .dr {
  height: 1.15em;
  overflow: hidden;
  font: 700 .9em/1.15em ui-monospace,"SF Mono",Menlo,Consolas,monospace;
  color: #f8fafc;
  text-align: center;
}

.uvq06-pp .dr>span {
  display: block;
  transform: translateY(calc(var(--d,0) * -1.15em));
  transition: transform calc(0.5s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq06-pp .dr b {
  display: block;
  height: 1.15em;
}

.uvq06-pp .ul {
  font: 800 .55em/1 ui-monospace,"SF Mono",Menlo,Consolas,monospace;
  color: #3f4650;
}

.uvq06-pp .ej {
  width: 1.15em;
  height: 1.9em;
  background: linear-gradient(90deg,#7c848e,#c9ced4,#7c848e);
  border-radius: 0 0 .2em .2em;
}

.uvq06-pp .tp {
  position: relative;
  width: 1.3em;
  height: 3.2em;
  overflow: hidden;
  clip-path: polygon(0 0,100% 0,58% 100%,42% 100%);
  background: linear-gradient(90deg,color-mix(in srgb,var(--fg) 14%,transparent),color-mix(in srgb,var(--fg) 30%,transparent) 40%,color-mix(in srgb,var(--fg) 12%,transparent));
  box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--fg) 12%,transparent);
}

.uvq06-pp .tp i {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--uvq06-pp) * 88%);
  background: linear-gradient(color-mix(in srgb,var(--c2) 70%,#fff),var(--c2));
}

.uvq06-pp .dq {
  position: absolute;
  left: 50%;
  bottom: -.5em;
  width: .42em;
  height: .55em;
  margin-left: -.21em;
  border-radius: 50% 50% 50% 50%/60% 60% 40% 40%;
  background: var(--c2);
  opacity: 0;
}

.uvq06-pp.drop .dq {
  animation: uvq06-pp-d calc(0.8s / var(--k)) ease-in;
}

.uvq06-pp .sd {
  flex: 1;
  min-width: 0;
}

.uvq06-pp .lb {
  display: block;
  margin: 0 0 .45em;
  font-size: .82em;
  font-weight: 650;
}

.uvq06-pp .fd {
  display: flex;
  align-items: center;
  gap: .2em;
  padding: .25em;
  border-radius: .9em;
  background: color-mix(in srgb,var(--fg) 3%,var(--bg));
  box-shadow: 0 0 0 1px color-mix(in srgb,var(--fg) 12%,transparent),0 14px 34px -24px rgba(0,0,0,.45);
  transition: box-shadow calc(0.25s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq06-pp .fd:focus-within {
  box-shadow: 0 0 0 2px var(--c1),0 0 0 6px color-mix(in srgb,var(--c1) 18%,transparent),0 14px 34px -24px rgba(0,0,0,.45);
}

.uvq06-pp .fd input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  font: inherit;
  color: var(--fg);
  width: 0;
  height: 1.6em;
  font-size: 1.5em;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  text-align: right;
  -moz-appearance: textfield;
  appearance: textfield;
}

.uvq06-pp .fd input::-webkit-inner-spin-button,.uvq06-pp .fd input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.uvq06-pp .un {
  margin-right: .2em;
  font-weight: 650;
  color: color-mix(in srgb,var(--fg) 55%,transparent);
}

.uvq06-pp .st {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: grid;
  place-items: center;
  flex: none;
  width: 2em;
  height: 2em;
  border-radius: .6em;
  font-size: 1.05em;
  font-weight: 700;
  background: color-mix(in srgb,var(--fg) 6%,transparent);
  transition: background calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1),transform calc(0.25s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq06-pp .st:hover {
  background: color-mix(in srgb,var(--c1) 18%,transparent);
}

.uvq06-pp .st:active {
  transform: scale(.88);
}

.uvq06-pp .as {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  width: 100%;
  margin-top: .6em;
  padding: .7em 1em;
  border-radius: .8em;
  font-weight: 750;
  color: #1c1405;
  background: var(--c1);
  box-shadow: 0 .5em 1em -.6em var(--c1);
  transition: transform calc(0.25s / var(--k)) cubic-bezier(.34,1.56,.64,1),filter calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq06-pp .as:hover {
  filter: brightness(1.07);
}

.uvq06-pp .as:active {
  transform: scale(.96);
}

.uvq06-pp button:focus-visible {
  outline: 2px solid color-mix(in srgb,var(--c1) 60%,var(--fg));
  outline-offset: 3px;
}

.uvq06-pp .ht {
  min-height: 1.2em;
  margin: .5em 0 0;
  font-size: .74em;
  color: color-mix(in srgb,var(--fg) 55%,transparent);
}

@keyframes uvq06-pp-k {
  40% {
    transform: translateY(.55em);
  }
}

@keyframes uvq06-pp-d {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(1.6em);
  }
}

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

### JavaScript

```js
document.querySelectorAll(".uvq06-pp").forEach(el => {
  const i=el.querySelector("input"),dr=[...el.querySelectorAll(".dr")],as=el.querySelector(".as"),ht=el.querySelector(".ht"),base=ht.textContent;let on=false;
const cl=v=>Math.max(10,Math.min(100,Math.round(v)||10));
const draw=()=>{const v=cl(+i.value);String(v).padStart(3,"0").split("").forEach((d,k)=>dr[k].style.setProperty("--d",d));el.style.setProperty("--uvq06-pp",on?String(v/100):"0")};
i.addEventListener("input",()=>{if(i.value!=="")draw()});i.addEventListener("change",()=>{i.value=String(cl(+i.value));draw()});
el.querySelectorAll(".st").forEach(b=>b.addEventListener("click",()=>{i.value=String(cl(+i.value+ +b.dataset.s));draw()}));
const re=c=>{el.classList.remove(c);void el.offsetWidth;el.classList.add(c)};
as.addEventListener("click",()=>{on=!on;as.textContent=on?"Dispense":"Aspirate";ht.textContent=on?"Tip loaded":"Tip empty";re("push");if(!on)re("drop");draw()});
i.value="50";draw();ht.textContent=base
});
```

### 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 = `
@property --uvq06-pp {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}

.uvq06-pp {
  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;
  display: flex;
  align-items: center;
  gap: 1.4em;
  width: 18em;
  --uvq06-pp: 0;
  transition: --uvq06-pp calc(0.9s / var(--k)) cubic-bezier(.22,1,.36,1);
}

.uvq06-pp .pi {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: none;
  width: 3em;
}

.uvq06-pp .pk {
  position: relative;
  z-index: 1;
  width: 2.1em;
  height: 1em;
  border-radius: .5em .5em .3em .3em;
  background: linear-gradient(color-mix(in srgb,var(--c1) 70%,#fff),var(--c1) 55%,color-mix(in srgb,var(--c1) 75%,#000));
  box-shadow: 0 .2em .3em rgba(0,0,0,.25);
}

.uvq06-pp .pk::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: .42em;
  height: .6em;
  margin-left: -.21em;
  background: linear-gradient(90deg,#9aa1a9,#e5e7eb,#9aa1a9);
}

.uvq06-pp.push .pk {
  animation: uvq06-pp-k calc(0.55s / var(--k)) cubic-bezier(.22,1,.36,1);
}

.uvq06-pp .pb {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3em;
  width: 2.6em;
  margin-top: .55em;
  padding: .55em 0 .7em;
  border-radius: 1.2em 1.2em .7em .7em;
  background: linear-gradient(90deg,#aeb5be,#eef0f3 35%,#d3d8de 65%,#9aa2ac);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.12),0 .6em 1em -.5em rgba(0,0,0,.45);
}

.uvq06-pp .pb::before {
  content: "";
  position: absolute;
  right: -.55em;
  top: 1.1em;
  width: .75em;
  height: 1.8em;
  border-radius: 0 .6em .6em 0;
  background: linear-gradient(90deg,#b9c0c8,#8f97a1);
  z-index: -1;
}

.uvq06-pp .wn {
  display: flex;
  flex-direction: column;
  padding: .15em .25em;
  border-radius: .3em;
  background: #16181c;
  box-shadow: inset 0 .1em .2em rgba(0,0,0,.6);
}

.uvq06-pp .dr {
  height: 1.15em;
  overflow: hidden;
  font: 700 .9em/1.15em ui-monospace,"SF Mono",Menlo,Consolas,monospace;
  color: #f8fafc;
  text-align: center;
}

.uvq06-pp .dr>span {
  display: block;
  transform: translateY(calc(var(--d,0) * -1.15em));
  transition: transform calc(0.5s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq06-pp .dr b {
  display: block;
  height: 1.15em;
}

.uvq06-pp .ul {
  font: 800 .55em/1 ui-monospace,"SF Mono",Menlo,Consolas,monospace;
  color: #3f4650;
}

.uvq06-pp .ej {
  width: 1.15em;
  height: 1.9em;
  background: linear-gradient(90deg,#7c848e,#c9ced4,#7c848e);
  border-radius: 0 0 .2em .2em;
}

.uvq06-pp .tp {
  position: relative;
  width: 1.3em;
  height: 3.2em;
  overflow: hidden;
  clip-path: polygon(0 0,100% 0,58% 100%,42% 100%);
  background: linear-gradient(90deg,color-mix(in srgb,var(--fg) 14%,transparent),color-mix(in srgb,var(--fg) 30%,transparent) 40%,color-mix(in srgb,var(--fg) 12%,transparent));
  box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--fg) 12%,transparent);
}

.uvq06-pp .tp i {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--uvq06-pp) * 88%);
  background: linear-gradient(color-mix(in srgb,var(--c2) 70%,#fff),var(--c2));
}

.uvq06-pp .dq {
  position: absolute;
  left: 50%;
  bottom: -.5em;
  width: .42em;
  height: .55em;
  margin-left: -.21em;
  border-radius: 50% 50% 50% 50%/60% 60% 40% 40%;
  background: var(--c2);
  opacity: 0;
}

.uvq06-pp.drop .dq {
  animation: uvq06-pp-d calc(0.8s / var(--k)) ease-in;
}

.uvq06-pp .sd {
  flex: 1;
  min-width: 0;
}

.uvq06-pp .lb {
  display: block;
  margin: 0 0 .45em;
  font-size: .82em;
  font-weight: 650;
}

.uvq06-pp .fd {
  display: flex;
  align-items: center;
  gap: .2em;
  padding: .25em;
  border-radius: .9em;
  background: color-mix(in srgb,var(--fg) 3%,var(--bg));
  box-shadow: 0 0 0 1px color-mix(in srgb,var(--fg) 12%,transparent),0 14px 34px -24px rgba(0,0,0,.45);
  transition: box-shadow calc(0.25s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq06-pp .fd:focus-within {
  box-shadow: 0 0 0 2px var(--c1),0 0 0 6px color-mix(in srgb,var(--c1) 18%,transparent),0 14px 34px -24px rgba(0,0,0,.45);
}

.uvq06-pp .fd input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  font: inherit;
  color: var(--fg);
  width: 0;
  height: 1.6em;
  font-size: 1.5em;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  text-align: right;
  -moz-appearance: textfield;
  appearance: textfield;
}

.uvq06-pp .fd input::-webkit-inner-spin-button,.uvq06-pp .fd input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.uvq06-pp .un {
  margin-right: .2em;
  font-weight: 650;
  color: color-mix(in srgb,var(--fg) 55%,transparent);
}

.uvq06-pp .st {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: grid;
  place-items: center;
  flex: none;
  width: 2em;
  height: 2em;
  border-radius: .6em;
  font-size: 1.05em;
  font-weight: 700;
  background: color-mix(in srgb,var(--fg) 6%,transparent);
  transition: background calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1),transform calc(0.25s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq06-pp .st:hover {
  background: color-mix(in srgb,var(--c1) 18%,transparent);
}

.uvq06-pp .st:active {
  transform: scale(.88);
}

.uvq06-pp .as {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  width: 100%;
  margin-top: .6em;
  padding: .7em 1em;
  border-radius: .8em;
  font-weight: 750;
  color: #1c1405;
  background: var(--c1);
  box-shadow: 0 .5em 1em -.6em var(--c1);
  transition: transform calc(0.25s / var(--k)) cubic-bezier(.34,1.56,.64,1),filter calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq06-pp .as:hover {
  filter: brightness(1.07);
}

.uvq06-pp .as:active {
  transform: scale(.96);
}

.uvq06-pp button:focus-visible {
  outline: 2px solid color-mix(in srgb,var(--c1) 60%,var(--fg));
  outline-offset: 3px;
}

.uvq06-pp .ht {
  min-height: 1.2em;
  margin: .5em 0 0;
  font-size: .74em;
  color: color-mix(in srgb,var(--fg) 55%,transparent);
}

@keyframes uvq06-pp-k {
  40% {
    transform: translateY(.55em);
  }
}

@keyframes uvq06-pp-d {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(1.6em);
  }
}

@media (prefers-reduced-motion:reduce) {
  .uvq06-pp,.uvq06-pp *,.uvq06-pp *::before,.uvq06-pp *::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 i=el.querySelector("input"),dr=[...el.querySelectorAll(".dr")],as=el.querySelector(".as"),ht=el.querySelector(".ht"),base=ht.textContent;let on=false;
const cl=v=>Math.max(10,Math.min(100,Math.round(v)||10));
const draw=()=>{const v=cl(+i.value);String(v).padStart(3,"0").split("").forEach((d,k)=>dr[k].style.setProperty("--d",d));el.style.setProperty("--uvq06-pp",on?String(v/100):"0")};
i.addEventListener("input",()=>{if(i.value!=="")draw()});i.addEventListener("change",()=>{i.value=String(cl(+i.value));draw()});
el.querySelectorAll(".st").forEach(b=>b.addEventListener("click",()=>{i.value=String(cl(+i.value+ +b.dataset.s));draw()}));
const re=c=>{el.classList.remove(c);void el.offsetWidth;el.classList.add(c)};
as.addEventListener("click",()=>{on=!on;as.textContent=on?"Dispense":"Aspirate";ht.textContent=on?"Tip loaded":"Tip empty";re("push");if(!on)re("drop");draw()});
i.value="50";draw();ht.textContent=base
}

export default function InPipetteVolume() {
  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": "#f59e0b",
          "--c2": "#38bdf8",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uvq06-pp"><div className="pi" aria-hidden="true"><span className="pk"></span><span className="pb"><span className="wn"><span className="dr"><span><b>0</b><b>1</b><b>2</b><b>3</b><b>4</b><b>5</b><b>6</b><b>7</b><b>8</b><b>9</b></span></span><span className="dr"><span><b>0</b><b>1</b><b>2</b><b>3</b><b>4</b><b>5</b><b>6</b><b>7</b><b>8</b><b>9</b></span></span><span className="dr"><span><b>0</b><b>1</b><b>2</b><b>3</b><b>4</b><b>5</b><b>6</b><b>7</b><b>8</b><b>9</b></span></span></span><span className="ul">µL</span></span><span className="ej"></span><span className="tp"><i></i></span><span className="dq"></span></div><div className="sd"><label htmlFor="uvq06-pp-in" className="lb">Sample volume</label><div className="fd"><button type="button" className="st" data-s="-1" aria-label="Less volume">−</button><input id="uvq06-pp-in" type="number" inputMode="numeric" min="10" max="100" step="1" /><span className="un">µL</span><button type="button" className="st" data-s="1" aria-label="More volume">+</button></div><button type="button" className="as">Aspirate</button><p className="ht" aria-live="polite">Range 10 to 100 µL</p></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 “Micropipette volume input” block (Inputs) from AIMRAN Library to my project.

## What it is
Set the microlitres and the pipette's counter drums roll; aspirate and the plunger dips while the tip fills with that amount.

## Chosen settings
- Main color: #f59e0b
- Secondary color: #38bdf8
- Size: 16px (from 12 to 24px)
- Speed: 1x (from 0.5 to 2x)
- Text: "Volumen de muestra"

## 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 = `
@property --uvq06-pp {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}

.uvq06-pp {
  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;
  display: flex;
  align-items: center;
  gap: 1.4em;
  width: 18em;
  --uvq06-pp: 0;
  transition: --uvq06-pp calc(0.9s / var(--k)) cubic-bezier(.22,1,.36,1);
}

.uvq06-pp .pi {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: none;
  width: 3em;
}

.uvq06-pp .pk {
  position: relative;
  z-index: 1;
  width: 2.1em;
  height: 1em;
  border-radius: .5em .5em .3em .3em;
  background: linear-gradient(color-mix(in srgb,var(--c1) 70%,#fff),var(--c1) 55%,color-mix(in srgb,var(--c1) 75%,#000));
  box-shadow: 0 .2em .3em rgba(0,0,0,.25);
}

.uvq06-pp .pk::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: .42em;
  height: .6em;
  margin-left: -.21em;
  background: linear-gradient(90deg,#9aa1a9,#e5e7eb,#9aa1a9);
}

.uvq06-pp.push .pk {
  animation: uvq06-pp-k calc(0.55s / var(--k)) cubic-bezier(.22,1,.36,1);
}

.uvq06-pp .pb {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3em;
  width: 2.6em;
  margin-top: .55em;
  padding: .55em 0 .7em;
  border-radius: 1.2em 1.2em .7em .7em;
  background: linear-gradient(90deg,#aeb5be,#eef0f3 35%,#d3d8de 65%,#9aa2ac);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.12),0 .6em 1em -.5em rgba(0,0,0,.45);
}

.uvq06-pp .pb::before {
  content: "";
  position: absolute;
  right: -.55em;
  top: 1.1em;
  width: .75em;
  height: 1.8em;
  border-radius: 0 .6em .6em 0;
  background: linear-gradient(90deg,#b9c0c8,#8f97a1);
  z-index: -1;
}

.uvq06-pp .wn {
  display: flex;
  flex-direction: column;
  padding: .15em .25em;
  border-radius: .3em;
  background: #16181c;
  box-shadow: inset 0 .1em .2em rgba(0,0,0,.6);
}

.uvq06-pp .dr {
  height: 1.15em;
  overflow: hidden;
  font: 700 .9em/1.15em ui-monospace,"SF Mono",Menlo,Consolas,monospace;
  color: #f8fafc;
  text-align: center;
}

.uvq06-pp .dr>span {
  display: block;
  transform: translateY(calc(var(--d,0) * -1.15em));
  transition: transform calc(0.5s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq06-pp .dr b {
  display: block;
  height: 1.15em;
}

.uvq06-pp .ul {
  font: 800 .55em/1 ui-monospace,"SF Mono",Menlo,Consolas,monospace;
  color: #3f4650;
}

.uvq06-pp .ej {
  width: 1.15em;
  height: 1.9em;
  background: linear-gradient(90deg,#7c848e,#c9ced4,#7c848e);
  border-radius: 0 0 .2em .2em;
}

.uvq06-pp .tp {
  position: relative;
  width: 1.3em;
  height: 3.2em;
  overflow: hidden;
  clip-path: polygon(0 0,100% 0,58% 100%,42% 100%);
  background: linear-gradient(90deg,color-mix(in srgb,var(--fg) 14%,transparent),color-mix(in srgb,var(--fg) 30%,transparent) 40%,color-mix(in srgb,var(--fg) 12%,transparent));
  box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--fg) 12%,transparent);
}

.uvq06-pp .tp i {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--uvq06-pp) * 88%);
  background: linear-gradient(color-mix(in srgb,var(--c2) 70%,#fff),var(--c2));
}

.uvq06-pp .dq {
  position: absolute;
  left: 50%;
  bottom: -.5em;
  width: .42em;
  height: .55em;
  margin-left: -.21em;
  border-radius: 50% 50% 50% 50%/60% 60% 40% 40%;
  background: var(--c2);
  opacity: 0;
}

.uvq06-pp.drop .dq {
  animation: uvq06-pp-d calc(0.8s / var(--k)) ease-in;
}

.uvq06-pp .sd {
  flex: 1;
  min-width: 0;
}

.uvq06-pp .lb {
  display: block;
  margin: 0 0 .45em;
  font-size: .82em;
  font-weight: 650;
}

.uvq06-pp .fd {
  display: flex;
  align-items: center;
  gap: .2em;
  padding: .25em;
  border-radius: .9em;
  background: color-mix(in srgb,var(--fg) 3%,var(--bg));
  box-shadow: 0 0 0 1px color-mix(in srgb,var(--fg) 12%,transparent),0 14px 34px -24px rgba(0,0,0,.45);
  transition: box-shadow calc(0.25s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq06-pp .fd:focus-within {
  box-shadow: 0 0 0 2px var(--c1),0 0 0 6px color-mix(in srgb,var(--c1) 18%,transparent),0 14px 34px -24px rgba(0,0,0,.45);
}

.uvq06-pp .fd input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  font: inherit;
  color: var(--fg);
  width: 0;
  height: 1.6em;
  font-size: 1.5em;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  text-align: right;
  -moz-appearance: textfield;
  appearance: textfield;
}

.uvq06-pp .fd input::-webkit-inner-spin-button,.uvq06-pp .fd input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.uvq06-pp .un {
  margin-right: .2em;
  font-weight: 650;
  color: color-mix(in srgb,var(--fg) 55%,transparent);
}

.uvq06-pp .st {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: grid;
  place-items: center;
  flex: none;
  width: 2em;
  height: 2em;
  border-radius: .6em;
  font-size: 1.05em;
  font-weight: 700;
  background: color-mix(in srgb,var(--fg) 6%,transparent);
  transition: background calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1),transform calc(0.25s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq06-pp .st:hover {
  background: color-mix(in srgb,var(--c1) 18%,transparent);
}

.uvq06-pp .st:active {
  transform: scale(.88);
}

.uvq06-pp .as {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  width: 100%;
  margin-top: .6em;
  padding: .7em 1em;
  border-radius: .8em;
  font-weight: 750;
  color: #1c1405;
  background: var(--c1);
  box-shadow: 0 .5em 1em -.6em var(--c1);
  transition: transform calc(0.25s / var(--k)) cubic-bezier(.34,1.56,.64,1),filter calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq06-pp .as:hover {
  filter: brightness(1.07);
}

.uvq06-pp .as:active {
  transform: scale(.96);
}

.uvq06-pp button:focus-visible {
  outline: 2px solid color-mix(in srgb,var(--c1) 60%,var(--fg));
  outline-offset: 3px;
}

.uvq06-pp .ht {
  min-height: 1.2em;
  margin: .5em 0 0;
  font-size: .74em;
  color: color-mix(in srgb,var(--fg) 55%,transparent);
}

@keyframes uvq06-pp-k {
  40% {
    transform: translateY(.55em);
  }
}

@keyframes uvq06-pp-d {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(1.6em);
  }
}

@media (prefers-reduced-motion:reduce) {
  .uvq06-pp,.uvq06-pp *,.uvq06-pp *::before,.uvq06-pp *::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 i=el.querySelector("input"),dr=[...el.querySelectorAll(".dr")],as=el.querySelector(".as"),ht=el.querySelector(".ht"),base=ht.textContent;let on=false;
const cl=v=>Math.max(10,Math.min(100,Math.round(v)||10));
const draw=()=>{const v=cl(+i.value);String(v).padStart(3,"0").split("").forEach((d,k)=>dr[k].style.setProperty("--d",d));el.style.setProperty("--uvq06-pp",on?String(v/100):"0")};
i.addEventListener("input",()=>{if(i.value!=="")draw()});i.addEventListener("change",()=>{i.value=String(cl(+i.value));draw()});
el.querySelectorAll(".st").forEach(b=>b.addEventListener("click",()=>{i.value=String(cl(+i.value+ +b.dataset.s));draw()}));
const re=c=>{el.classList.remove(c);void el.offsetWidth;el.classList.add(c)};
as.addEventListener("click",()=>{on=!on;as.textContent=on?"Dispense":"Aspirate";ht.textContent=on?"Tip loaded":"Tip empty";re("push");if(!on)re("drop");draw()});
i.value="50";draw();ht.textContent=base
}

export default function InPipetteVolume() {
  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": "#f59e0b",
          "--c2": "#38bdf8",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uvq06-pp"><div className="pi" aria-hidden="true"><span className="pk"></span><span className="pb"><span className="wn"><span className="dr"><span><b>0</b><b>1</b><b>2</b><b>3</b><b>4</b><b>5</b><b>6</b><b>7</b><b>8</b><b>9</b></span></span><span className="dr"><span><b>0</b><b>1</b><b>2</b><b>3</b><b>4</b><b>5</b><b>6</b><b>7</b><b>8</b><b>9</b></span></span><span className="dr"><span><b>0</b><b>1</b><b>2</b><b>3</b><b>4</b><b>5</b><b>6</b><b>7</b><b>8</b><b>9</b></span></span></span><span className="ul">µL</span></span><span className="ej"></span><span className="tp"><i></i></span><span className="dq"></span></div><div className="sd"><label htmlFor="uvq06-pp-in" className="lb">Sample volume</label><div className="fd"><button type="button" className="st" data-s="-1" aria-label="Less volume">−</button><input id="uvq06-pp-in" type="number" inputMode="numeric" min="10" max="100" step="1" /><span className="un">µL</span><button type="button" className="st" data-s="1" aria-label="More volume">+</button></div><button type="button" className="as">Aspirate</button><p className="ht" aria-live="polite">Range 10 to 100 µL</p></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.
````
