jbmui

PaperClip

  • UI Bits

Independent ink wire clip to lay across a paper edge.

Install

npx shadcn@latest add @jbm/paper-clip

Needs the @jbm entry in components.json; see Install once.

Also installs @jbm/tokens.

Docs

Usage

Clip across a card edge
import { PaperClip } from "@/jbm/ui/paper-clip"<div style={{ position: "relative", width: 220, height: 120, background: "white" }}>  <PaperClip style={{ position: "absolute", left: 18, top: -24 }} /></div>

Props

Stage px
Declared at the documented defaults
Landscape
26 by 48
Vertical
26 by 48
Basis

Default width 26 and height 48 attributes on a 34×62 viewBox. Override width and height together to scale (the gallery shows 50×92); the viewBox keeps the drawing's proportions.

Decorative (aria-hidden) wire clip: one 3px round-capped ink stroke in a 34×62 viewBox. It does not own the paper; position it over an edge yourself. All SVG attributes pass through to the root <svg>, so width, height, and style (e.g. absolute positioning) are set by the caller.

No props.

Also accepts SVGProps<SVGSVGElement>.

QA checks

  • Inspect the loop at default and enlarged sizes: the single stroke has round caps and even width.
  • Place it over a paper edge and check the part above the edge reads as clipped on, not floating.
  • Confirm it stays aria-hidden and adds no focusable element.