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.
Copy Field Crimp
ns-ui/copy-field-crimpRemovedComponent
A copyable value field whose confirmation is typographic — letter-spacing crimps shut in a wave from the clicked character, then a check scales into the icon slot and holds. No toast, no green flash.
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/copy-field-crimp.jsonSource
1"use client";23import { useCallback, useEffect, useId, useRef, useState, type CSSProperties } from "react";45// ---------------------------------------------------------------------------6// CrimpCopy — a copy-to-clipboard field where the confirmation happens inside7// the type itself, not in a toast bolted onto the corner of the screen.8//9// MECHANISM: the value renders as one span per character, each carrying a10// `--cc-delay` custom property. Activating copy computes an origin character11// index — the one nearest the pointer for a click, or index 0 for a keyboard12// activation (native <button> click events fire with `detail === 0` when13// triggered by Enter/Space, which is how the two are told apart without a14// separate keydown handler) — and every character's delay becomes its15// distance from that origin times ~18ms. A CSS keyframe animation16// (`letter-spacing: 0 -> -0.06em -> 0`, with a hair of positive overshoot on17// the way back out) then plays per character at its own delay, so the string18// visibly crimps shut in a wave from the touched point and springs back19// open — a wire getting a ferrule, not a flash of color. Characters remount20// (keyed by an incrementing run id) on every activation so the animation21// always plays from its start, repeat clicks included.22//23// Once the wave finishes sweeping outward, a small inline check (stroked in24// --foreground) scales into the icon slot with an ease-out-expo curve, holds25// for 1.2s, and fades back out to the idle copy glyph (--muted) — no toast,26// no green flash, no layout shift, because the icon slot is reserved space27// that never changes size.28//29// A11Y: the field is a real <button> whose accessible name is an explicit30// `aria-label` (default derived from `label`, never from `value`) — the31// character spans and both icons are aria-hidden, so a masked or unmasked32// value never leaks into the accessible name either way. A visually-hidden33// `aria-live="polite"` region announces "Copied" (cleared and reset each34// activation so repeat copies re-announce). `prefers-reduced-motion` drops35// the letter-spacing wave and icon transitions to near-instant but keeps the36// check appearing and holding — the confirmation still reads, it just isn't37// animated.38// ---------------------------------------------------------------------------3940const DELAY_PER_CHAR_MS = 18;41const CRIMP_DURATION_MS = 420;42const HOLD_MS = 1200;43const MASK_CHAR = "•";4445export interface CrimpCopyProps {46// … truncated
