# Two-ink risograph headline

> A headline printed in fluorescent pink and blue with a halftone screen; the inks drift out of register with the pointer and on reprint.

- Category: [Text & scroll](https://library.aimran.es/components/text-scroll)
- Built with: HTML + CSS
- Live editor: https://library.aimran.es/blocks/uv-tx-riso-print
- Library: AIMRAN Library (https://library.aimran.es), free, no sign-up, by Aimran Oukham

## Where to use it

Risograph prints are loved for their bright inks and imperfect registration, and this block fakes both on cream paper. The headline is set twice with multiply blending, the blue layer gets a halftone dot mask, and its offset follows the pointer so the colors slip apart. It fits zines, indie studios, bookshops, music posters and small creative brands.

Pick the two inks with the main and secondary colors and write the headline in the text field. The reprint button feeds the sheet again with a new random misregistration. Only the first layer reaches screen readers, so the title is never read twice.

## Code

### HTML

```html
<div class="uvq14-riso"><div class="pp"><p class="kc">Limited edition · 2 inks</p><h3 class="hl"><span class="a">Handmade</span><span class="b" aria-hidden="true">Handmade</span></h3><p class="ft"><span>No. 027/150</span><span>Cream paper 120 g</span></p></div><button type="button" class="rp">Reprint</button></div>
```

### CSS

```css
.uvq14-riso {
  --c1: #ff48b0;
  --c2: #0078bf;
  --s: 16px;
  /* tamaño */
  --k: 1;
  /* velocidad */
  --fg: #1d1d1f;
  /* texto */
  --bg: #f5f5f7;
  /* fondo */
}

.uvq14-riso {
  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;
  width: 19em;
  display: grid;
  justify-items: center;
  gap: 1em;
}

.uvq14-riso .pp {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  padding: 1.1em 1.2em 1em;
  color: #2b2b2b;
  background: #f4efe3;
  box-shadow: 0 .1em .2em rgba(0,0,0,.1),0 1.2em 2em -1.2em rgba(0,0,0,.35);
  overflow: hidden;
  --bx: .05em;
  --by: .035em;
  --ax: 0em;
  --ay: 0em;
}

.uvq14-riso .pp::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(rgba(60,40,10,.12) .6px,transparent .8px) 0 0/5px 5px,radial-gradient(rgba(60,40,10,.08) .6px,transparent .8px) 2px 3px/7px 7px;
  mix-blend-mode: multiply;
}

.uvq14-riso .kc,.uvq14-riso .ft {
  margin: 0;
  font: 600 .62em/1.3 ui-monospace,"SF Mono","JetBrains Mono",Menlo,Consolas,monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.uvq14-riso .ft {
  display: flex;
  justify-content: space-between;
  margin-top: .8em;
  color: var(--c2);
}

.uvq14-riso .kc {
  color: var(--c1);
  mix-blend-mode: multiply;
}

.uvq14-riso .hl {
  display: grid;
  margin: .35em 0 0;
  font: 900 calc(var(--s) * 3.3)/.88 "Arial Black","Helvetica Neue",Arial,sans-serif;
  letter-spacing: -.05em;
  text-transform: uppercase;
}

.uvq14-riso .a,.uvq14-riso .b {
  grid-area: 1/1;
  mix-blend-mode: multiply;
  transition: transform calc(0.35s / var(--k)) cubic-bezier(.22,1,.36,1);
}

.uvq14-riso .a {
  color: var(--c1);
  transform: translate(var(--ax),var(--ay));
}

.uvq14-riso .b {
  color: var(--c2);
  transform: translate(var(--bx),var(--by));
  -webkit-mask: radial-gradient(circle,#000 55%,transparent 62%) 0 0/.075em .075em;
  mask: radial-gradient(circle,#000 55%,transparent 62%) 0 0/.075em .075em;
}

.uvq14-riso.feed .pp {
  animation: uvq14-riso-f calc(0.7s / var(--k)) steps(7,end);
}

.uvq14-riso .rp {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  padding: .55em 1.1em;
  border-radius: 2em;
  font-size: .78em;
  font-weight: 700;
  color: var(--bg);
  background: var(--fg);
  transition: transform calc(0.25s / var(--k)) cubic-bezier(.34,1.56,.64,1),opacity calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq14-riso .rp:hover {
  transform: translateY(-2px);
}

.uvq14-riso .rp:active {
  transform: scale(.95);
}

.uvq14-riso .rp:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

@keyframes uvq14-riso-f {
  from {
    clip-path: inset(0 0 100% 0);
    transform: translateY(-.4em);
  }
  to {
    clip-path: inset(0);
    transform: none;
  }
}

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

### JavaScript

```js
document.querySelectorAll(".uvq14-riso").forEach(el => {
  const pp=el.querySelector(".pp");const set=(k,v)=>pp.style.setProperty(k,v.toFixed(3)+"em");
pp.addEventListener("pointermove",e=>{const r=pp.getBoundingClientRect(),x=(e.clientX-r.left)/r.width-.5,y=(e.clientY-r.top)/r.height-.5;set("--bx",x*.16);set("--by",y*.12)});
pp.addEventListener("pointerleave",()=>{pp.style.removeProperty("--bx");pp.style.removeProperty("--by")});
el.querySelector(".rp").addEventListener("click",()=>{const r=()=>(Math.random()-.5);set("--bx",r()*.14);set("--by",r()*.1);set("--ax",r()*.05);set("--ay",r()*.04);el.classList.remove("feed");void el.offsetWidth;el.classList.add("feed")})
});
```

### 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 = `
.uvq14-riso {
  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;
  width: 19em;
  display: grid;
  justify-items: center;
  gap: 1em;
}

.uvq14-riso .pp {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  padding: 1.1em 1.2em 1em;
  color: #2b2b2b;
  background: #f4efe3;
  box-shadow: 0 .1em .2em rgba(0,0,0,.1),0 1.2em 2em -1.2em rgba(0,0,0,.35);
  overflow: hidden;
  --bx: .05em;
  --by: .035em;
  --ax: 0em;
  --ay: 0em;
}

.uvq14-riso .pp::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(rgba(60,40,10,.12) .6px,transparent .8px) 0 0/5px 5px,radial-gradient(rgba(60,40,10,.08) .6px,transparent .8px) 2px 3px/7px 7px;
  mix-blend-mode: multiply;
}

.uvq14-riso .kc,.uvq14-riso .ft {
  margin: 0;
  font: 600 .62em/1.3 ui-monospace,"SF Mono","JetBrains Mono",Menlo,Consolas,monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.uvq14-riso .ft {
  display: flex;
  justify-content: space-between;
  margin-top: .8em;
  color: var(--c2);
}

.uvq14-riso .kc {
  color: var(--c1);
  mix-blend-mode: multiply;
}

.uvq14-riso .hl {
  display: grid;
  margin: .35em 0 0;
  font: 900 calc(var(--s) * 3.3)/.88 "Arial Black","Helvetica Neue",Arial,sans-serif;
  letter-spacing: -.05em;
  text-transform: uppercase;
}

.uvq14-riso .a,.uvq14-riso .b {
  grid-area: 1/1;
  mix-blend-mode: multiply;
  transition: transform calc(0.35s / var(--k)) cubic-bezier(.22,1,.36,1);
}

.uvq14-riso .a {
  color: var(--c1);
  transform: translate(var(--ax),var(--ay));
}

.uvq14-riso .b {
  color: var(--c2);
  transform: translate(var(--bx),var(--by));
  -webkit-mask: radial-gradient(circle,#000 55%,transparent 62%) 0 0/.075em .075em;
  mask: radial-gradient(circle,#000 55%,transparent 62%) 0 0/.075em .075em;
}

.uvq14-riso.feed .pp {
  animation: uvq14-riso-f calc(0.7s / var(--k)) steps(7,end);
}

.uvq14-riso .rp {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  padding: .55em 1.1em;
  border-radius: 2em;
  font-size: .78em;
  font-weight: 700;
  color: var(--bg);
  background: var(--fg);
  transition: transform calc(0.25s / var(--k)) cubic-bezier(.34,1.56,.64,1),opacity calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq14-riso .rp:hover {
  transform: translateY(-2px);
}

.uvq14-riso .rp:active {
  transform: scale(.95);
}

.uvq14-riso .rp:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

@keyframes uvq14-riso-f {
  from {
    clip-path: inset(0 0 100% 0);
    transform: translateY(-.4em);
  }
  to {
    clip-path: inset(0);
    transform: none;
  }
}

@media (prefers-reduced-motion:reduce) {
  .uvq14-riso,.uvq14-riso *,.uvq14-riso *::before,.uvq14-riso *::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 pp=el.querySelector(".pp");const set=(k,v)=>pp.style.setProperty(k,v.toFixed(3)+"em");
pp.addEventListener("pointermove",e=>{const r=pp.getBoundingClientRect(),x=(e.clientX-r.left)/r.width-.5,y=(e.clientY-r.top)/r.height-.5;set("--bx",x*.16);set("--by",y*.12)});
pp.addEventListener("pointerleave",()=>{pp.style.removeProperty("--bx");pp.style.removeProperty("--by")});
el.querySelector(".rp").addEventListener("click",()=>{const r=()=>(Math.random()-.5);set("--bx",r()*.14);set("--by",r()*.1);set("--ax",r()*.05);set("--ay",r()*.04);el.classList.remove("feed");void el.offsetWidth;el.classList.add("feed")})
}

export default function TxRisoPrint() {
  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": "#ff48b0",
          "--c2": "#0078bf",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uvq14-riso"><div className="pp"><p className="kc">Limited edition · 2 inks</p><h3 className="hl"><span className="a">Handmade</span><span className="b" aria-hidden="true">Handmade</span></h3><p className="ft"><span>No. 027/150</span><span>Cream paper 120 g</span></p></div><button type="button" className="rp">Reprint</button></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 “Two-ink risograph headline” block (Text & scroll) from AIMRAN Library to my project.

## What it is
A headline printed in fluorescent pink and blue with a halftone screen; the inks drift out of register with the pointer and on reprint.

## Chosen settings
- Main color: #ff48b0
- Secondary color: #0078bf
- Size: 16px (from 12 to 24px)
- Speed: 1x (from 0.5 to 2x)
- Text: "Hecho a mano"

## 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 = `
.uvq14-riso {
  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;
  width: 19em;
  display: grid;
  justify-items: center;
  gap: 1em;
}

.uvq14-riso .pp {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  padding: 1.1em 1.2em 1em;
  color: #2b2b2b;
  background: #f4efe3;
  box-shadow: 0 .1em .2em rgba(0,0,0,.1),0 1.2em 2em -1.2em rgba(0,0,0,.35);
  overflow: hidden;
  --bx: .05em;
  --by: .035em;
  --ax: 0em;
  --ay: 0em;
}

.uvq14-riso .pp::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(rgba(60,40,10,.12) .6px,transparent .8px) 0 0/5px 5px,radial-gradient(rgba(60,40,10,.08) .6px,transparent .8px) 2px 3px/7px 7px;
  mix-blend-mode: multiply;
}

.uvq14-riso .kc,.uvq14-riso .ft {
  margin: 0;
  font: 600 .62em/1.3 ui-monospace,"SF Mono","JetBrains Mono",Menlo,Consolas,monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.uvq14-riso .ft {
  display: flex;
  justify-content: space-between;
  margin-top: .8em;
  color: var(--c2);
}

.uvq14-riso .kc {
  color: var(--c1);
  mix-blend-mode: multiply;
}

.uvq14-riso .hl {
  display: grid;
  margin: .35em 0 0;
  font: 900 calc(var(--s) * 3.3)/.88 "Arial Black","Helvetica Neue",Arial,sans-serif;
  letter-spacing: -.05em;
  text-transform: uppercase;
}

.uvq14-riso .a,.uvq14-riso .b {
  grid-area: 1/1;
  mix-blend-mode: multiply;
  transition: transform calc(0.35s / var(--k)) cubic-bezier(.22,1,.36,1);
}

.uvq14-riso .a {
  color: var(--c1);
  transform: translate(var(--ax),var(--ay));
}

.uvq14-riso .b {
  color: var(--c2);
  transform: translate(var(--bx),var(--by));
  -webkit-mask: radial-gradient(circle,#000 55%,transparent 62%) 0 0/.075em .075em;
  mask: radial-gradient(circle,#000 55%,transparent 62%) 0 0/.075em .075em;
}

.uvq14-riso.feed .pp {
  animation: uvq14-riso-f calc(0.7s / var(--k)) steps(7,end);
}

.uvq14-riso .rp {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  padding: .55em 1.1em;
  border-radius: 2em;
  font-size: .78em;
  font-weight: 700;
  color: var(--bg);
  background: var(--fg);
  transition: transform calc(0.25s / var(--k)) cubic-bezier(.34,1.56,.64,1),opacity calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq14-riso .rp:hover {
  transform: translateY(-2px);
}

.uvq14-riso .rp:active {
  transform: scale(.95);
}

.uvq14-riso .rp:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

@keyframes uvq14-riso-f {
  from {
    clip-path: inset(0 0 100% 0);
    transform: translateY(-.4em);
  }
  to {
    clip-path: inset(0);
    transform: none;
  }
}

@media (prefers-reduced-motion:reduce) {
  .uvq14-riso,.uvq14-riso *,.uvq14-riso *::before,.uvq14-riso *::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 pp=el.querySelector(".pp");const set=(k,v)=>pp.style.setProperty(k,v.toFixed(3)+"em");
pp.addEventListener("pointermove",e=>{const r=pp.getBoundingClientRect(),x=(e.clientX-r.left)/r.width-.5,y=(e.clientY-r.top)/r.height-.5;set("--bx",x*.16);set("--by",y*.12)});
pp.addEventListener("pointerleave",()=>{pp.style.removeProperty("--bx");pp.style.removeProperty("--by")});
el.querySelector(".rp").addEventListener("click",()=>{const r=()=>(Math.random()-.5);set("--bx",r()*.14);set("--by",r()*.1);set("--ax",r()*.05);set("--ay",r()*.04);el.classList.remove("feed");void el.offsetWidth;el.classList.add("feed")})
}

export default function TxRisoPrint() {
  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": "#ff48b0",
          "--c2": "#0078bf",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uvq14-riso"><div className="pp"><p className="kc">Limited edition · 2 inks</p><h3 className="hl"><span className="a">Handmade</span><span className="b" aria-hidden="true">Handmade</span></h3><p className="ft"><span>No. 027/150</span><span>Cream paper 120 g</span></p></div><button type="button" className="rp">Reprint</button></div>
      </div>
    </>
  );
}
```

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