Open this example in the interactive library
Live preview
Source code
// components/BleedDimensionsCalculator.tsx
import { useState } from "react";
export default function BleedDimensionsCalculator() {
const [bleed, set] = useState(3);
return (
<label>
A4 bleed (mm)
<input
type="range"
max={10}
value={bleed}
onChange={(e) => set(+e.target.value)}
/>
<output>
{210 + 2 * bleed} × {297 + 2 * bleed} mm
</output>
</label>
);
}
