# QrCode Themeable, accessible QR code — **own zero-dependency encoder**, framework 4-layer rigor, richer than the references it learns from. > **Design proposal** (approved 2026-06-12). This README is both the design > record and the component doc. ## Baseline No Air baseline — new component (2026-06-12). Nothing in the legacy layers rendered QR codes; the encoder itself is also new (`$libs/qr`, zero-dep). ## Talla y tema **10 clave(s) pública(s)** en `lib/recipes/base.ts` (bloque `qr-code`), con sus pasos por talla y el nombre RESUELTO que consume la receta. Es el contrato vivo: la pestaña **Tokens** de su demo lista estas mismas claves y las resuelve sobre el escenario. | Token (`--qr-code-…`) | Valor por defecto | | --------------------- | ------------------ | | `fg` | `#18181b` | | `bg` | `#ffffff` | | `size-xs` | `96px` | | `size-sm` | `128px` | | `size-md` | `160px` | | `size-lg` | `200px` | | `size-xl` | `256px` | | `radius` | `var(--radius-md)` | | `overlay-bg` | `#ffffff` | | `overlay-radius` | `var(--radius-sm)` | **Lo que el guard R-5.4 da por silencioso, con su razón medida** (`scripts/theming-sentinel-exceptions.ts`): - `size-xs` — one step per instance: the wrapper writes var(--qr-code-size-{k}) inline from the size prop and the demo runs lg. Forced -> reaches (96px -> 123px) - `size-sm` — same, one step per instance - `size-md` — same, one step per instance - `size-xl` — same, one step per instance - `fg` — painted as the SVG fill of the module path, not as color on the root; read on the path -> reaches (rgb(24,24,27) -> rgb(1,2,3)) ## Comparativa — why a new one (vs the references) | Capability | ark-ui (zag + `uqr`) | qr-code-styling | react-qr-code | **QrCode (ours)** | | --- | --- | --- | --- | --- | | Parts / anatomy | ✅ Root·Frame·Pattern·Overlay·Download | ❌ imperative | ❌ single comp | ✅ | | Encoder | `uqr` dep | qr-code-generator dep | qr.js dep | **own, zero-dep (`$libs/qr`)** | | Error correction L/M/Q/H | ✅ | ✅ | ✅ | ✅ | | Themeable colour (tokens) | ❌ `currentColor` only | ✅ free | fg/bg props | ✅ **via tokens + `color`** | | Cell shapes (square/rounded/dots) | ❌ | ✅ | ❌ | ✅ | | Logo overlay | ✅ | ✅ | partial | ✅ **+ auto quiet-zone + auto-boost ECC** | | Download PNG/SVG | ✅ | ✅ | manual | ✅ **DownloadTrigger = `