No.96 · Controls
Ink Tick
A checkbox ticked with a pen: one stroke that bleeds a little into the paper, then the label struck through by the same hand.
The prompt
Written for the variant you picked above: Paper
Build a checkbox that is ticked with a pen, keeping a real (visually hidden) <input type="checkbox"> inside a <label> so forms, keyboard and screen readers work untouched. Draw the box as a hand-made SVG path that is not quite square and overlaps where the pen closes it (1.5px, currentColor at 70%, full on hover). The tick is one curved stroke (3.2 wide, round caps, in the ink colour) that runs from the left, dips, and flicks up past the top-right of the box. It draws in with stroke-dasharray/offset on pathLength=1 over 420ms, starting fast and slowing as the pen lifts, through an feTurbulence + feDisplacementMap filter (scale 1.6) so its edges bleed slightly like ink on paper. 300ms later, the label is struck through by a slightly wavy hand line (drawn the same way) and dims to 55%. Unticking erases both faster in the reverse direction (220–260ms, ease-in), like a quick scrub. The row is at least 44px tall; keyboard focus shows a ring round the box in the ink colour. Demo: a weekend to-do list. Selected variant — Paper (paper): Apply the paper theme. Where the brief above gives no colour values for it, choose a restrained paper palette with text at 4.5:1 contrast or better. Keep the geometry, states and motion described above unchanged. This selection takes precedence over references to other themes or options in the general brief. Implement this selected appearance; do not add a variant picker or alternative appearances unless requested. Implementation requirements: Use React and TypeScript. Keep the component self-contained, with uniquely scoped CSS and no animation libraries. Include required imports, styles and font setup in the result. Interaction: Click the row, tap it, or press Space when focused to tick and untick. Motion: Tick 420ms draw; strike 380ms after a 300ms delay; untick scrubs out in 220–260ms. Accessibility: A native checkbox in a label, so the whole row is clickable and announced normally; the drawings are aria-hidden. Reduced motion shows the tick and strike instantly. Responsive behavior: The label wraps naturally beside the fixed 30px box; the strike scales to the text width. Touch: Tap anywhere on the row; the hover emphasis is mouse-only. Preserve keyboard access, visible focus and reduced-motion behavior. Keep fictional demo data and simulated service calls in a separate usage example; expose callbacks for real actions and recover from rejected requests. Keep usage-example links inside the demo: use local buttons or prevent navigation. Demonstration links must not navigate to Vitrine routes or open other pages; preserve real URL support in the reusable component itself. Verify the result at narrow and wide viewport sizes, with keyboard input and reduced motion enabled.
Notes
- Interaction
- Click the row, tap it, or press Space when focused to tick and untick.
- Motion
- Tick 420ms draw; strike 380ms after a 300ms delay; untick scrubs out in 220–260ms.
- Accessibility
- A native checkbox in a label, so the whole row is clickable and announced normally; the drawings are aria-hidden. Reduced motion shows the tick and strike instantly.
- Responsive
- The label wraps naturally beside the fixed 30px box; the strike scales to the text width.
- On touch
- Tap anywhere on the row; the hover emphasis is mouse-only.