This component no longer exists. It was in ns-ui’s manifest when we first indexed it and is not there now — the registry served its inventory on 2026-08-07 and this item was not on it. The install command below will fail. It is kept here because a tutorial somewhere still tells people to run it.
Checkbox Ink Stroke
ns-ui/checkbox-ink-strokeRemovedComponent
A checkbox and its tri-state select-all cousin whose mark is inked on by a variable-width calligraphic pen stroke — thin entry, thick corner flick, a hair of overshoot at the tip — so checked, unchecked and indeterminate read as three distinct pen gestures.
Live preview
live · rendered by the registry
Rendered by ns-ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://design.helpmarq.com/r/checkbox-ink-stroke.jsonSource
1"use client";23import {4 useEffect,5 useId,6 useRef,7 useState,8 type ChangeEvent,9 type ReactNode,10} from "react";1112// ---------------------------------------------------------------------------13// NibCheck — a checkbox (and tri-state parent) whose mark is inked on by a14// variable-width calligraphic stroke: thin entry, a thick corner flick, and a15// hair of overshoot past the natural tip. The three states — unchecked,16// checked, indeterminate — read as three distinct pen gestures rather than a17// check, a smaller check, and a minus.18//19// GEOMETRY: the check is one filled ribbon path built once at module scope by20// offsetting a hand-placed spine polyline with a per-point half-width (thin21// at the entry, widest right at the corner, tapering through the flick to a22// hairline overshoot tip) — see buildRibbon. Interior normals average their23// two adjacent segment normals, so the sharp direction change at the corner24// naturally bulges on the convex side and pinches on the concave one, like25// ink pooling as a pen changes direction. Indeterminate draws a separate,26// simpler fat rounded dash — not a shrunk-down check.27//28// REVEAL: both ink shapes sit under a left-anchored CSS clip-path (inset,29// fill-box) that transitions from fully clipped to fully revealed over30// ~220ms ease-out-expo, reading as ink drawn left-to-right: entry, corner,31// tip. Unchecking reverses the same clip back toward the entry edge — ink32// retracts — and a small dot at the entry point pops in and fades once33// retraction finishes. The box's own corner radius relaxes 2px on check, with34// a small imperative class-toggle "pop" (restarted without remounting, so35// focus never moves) standing in for the flick's ~4% overshoot.36//37// A11Y: a real input[type=checkbox] carries checked/indeterminate/disabled38// and all native keyboard + AT semantics; it is visually hidden (opacity: 0,39// sized to cover the box) but stays in the tab order and keeps focus — never40// aria-hidden. The SVG ink is aria-hidden. Colors: ink is --foreground, the41// box border is --border; --accent appears only in the focus ring.42// prefers-reduced-motion disables every transition/animation here, so the43// final ink for the current state is simply present or absent, instantly.44// ---------------------------------------------------------------------------4546type Pt = readonly [number, number];4748function normalize(v: Pt): Pt {49 const len = Math.hypot(v[0], v[1]) || 1;50// … truncated
