{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"signature-pad","type":"registry:component","title":"Signature pad","description":"Sign with ink that behaves like ink: it thickens where you slow down, dries in the order you wrote it, and clearing rewinds your strokes.","author":"Hairline UI","dependencies":["lucide-react"],"registryDependencies":["https://hairlineui.com/r/text-morph.json?as=dependency"],"files":[{"path":"registry/signature-pad.tsx","type":"registry:component","content":"// Hairline UI · signature-pad · MIT License\n// Copyright (c) 2026 Hairline UI · https://hairlineui.com/license#components\n\n\"use client\";\n\nimport * as React from \"react\";\nimport { Check, Keyboard, PenLine } from \"lucide-react\";\nimport { TextMorph } from \"./text-morph\";\n\n/* ─────────────────────────────────────────────────────────\n * SIGNATURE PAD: sign with ink that behaves like ink\n *\n *   write     the line thickens where you slow down and thins where\n *             you hurry, like a real nib, and it's wet: a soft\n *             sheen rides along every stroke\n *   accept    the sheen dries off in the order you wrote it, then the\n *             signature lifts off the pad and settles small on the\n *             signed line, with your name and the time under it,\n *             while the pad folds down to fit\n *   clear     the strokes rewind, last one first, back to an empty\n *             pad, instead of vanishing\n *   type      \"Type instead\" swaps the pad for your name in a\n *             script, for keyboards and screen readers\n *\n * onSign gets an SVG (vector, for your PDF), a PNG data URL and the\n * time. Throw or reject and the pad comes back with the ink on it.\n * ───────────────────────────────────────────────────────── */\n\nexport interface SignatureResult {\n  svg: string;\n  dataUrl: string;\n  /** Present when the person typed their name instead of drawing. */\n  typed?: string;\n  signedAt: Date;\n}\n\nexport interface SignaturePadProps extends Omit<React.HTMLAttributes<HTMLDivElement>, \"onChange\"> {\n  /** Shown under the signature once signed. */\n  name?: string;\n  onSign?: (result: SignatureResult) => Promise<unknown> | void;\n  onClear?: () => void;\n  /** The pad's prompt. */\n  label?: string;\n  /** The ink: any CSS colour. Defaults to a blue-black. */\n  ink?: string;\n  locale?: string;\n}\n\ntype Seg = { x0: number; y0: number; cx: number; cy: number; x1: number; y1: number; w: number };\n\nconst EASE = \"cubic-bezier(0.16,1,0.3,1)\";\nconst FOCUS = \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:ring-offset-2 focus-visible:ring-offset-background\";\nconst PAD_H = 168;\nconst SIGNED_H = 96;\nconst SCRIPT = '\"Snell Roundhand\", \"Segoe Script\", \"Brush Script MT\", \"Apple Chancery\", cursive';\n\nconst reducedQuery = \"(prefers-reduced-motion: reduce)\";\nconst subscribeReduced = (onChange: () => void) => {\n  const query = window.matchMedia(reducedQuery);\n  query.addEventListener(\"change\", onChange);\n  return () => query.removeEventListener(\"change\", onChange);\n};\nconst useReducedMotion = () =>\n  React.useSyncExternalStore(subscribeReduced, () => window.matchMedia(reducedQuery).matches, () => false);\nconst subscribeNothing = () => () => {};\nconst useHydrated = () => React.useSyncExternalStore(subscribeNothing, () => true, () => false);\n\nfunction readColors(probe: HTMLElement | null, sheen: HTMLElement | null) {\n  return {\n    ink: probe ? getComputedStyle(probe).color : \"#1f2a44\",\n    sheen: sheen ? getComputedStyle(sheen).color : \"#fff\",\n  };\n}\n\nconst inOut = (t: number) => (t < 0.5 ? 4 * t * t * t : 1 - (-2 * t + 2) ** 3 / 2);\n\nexport function SignaturePad({ name, onSign, onClear, label = \"Sign here\", ink = \"color-mix(in oklab, var(--chart-1, var(--primary)) 38%, var(--foreground))\", locale, className = \"\", ...props }: SignaturePadProps) {\n  const reduced = useReducedMotion();\n  const hydrated = useHydrated();\n  const [phase, setPhase] = React.useState<\"empty\" | \"inked\" | \"drying\" | \"signed\">(\"empty\");\n  const [typing, setTyping] = React.useState(false);\n  const [typed, setTyped] = React.useState(\"\");\n  const [result, setResult] = React.useState<SignatureResult | null>(null);\n  const [said, setSaid] = React.useState(\"\");\n\n  const rootRef = React.useRef<HTMLDivElement>(null);\n  const canvasRef = React.useRef<HTMLCanvasElement>(null);\n  const imgRef = React.useRef<HTMLImageElement>(null);\n  const probeRef = React.useRef<HTMLSpanElement>(null);\n  const sheenRef = React.useRef<HTMLSpanElement>(null);\n  const ink$ = React.useRef({ segs: [] as Seg[], strokes: [] as number[], wet: 0, frame: 0, length: 0 });\n  const pen = React.useRef<{ x: number; y: number; t: number; w: number; mx: number; my: number } | null>(null);\n  const from = React.useRef<DOMRect | null>(null);\n\n  const colors = () => readColors(probeRef.current, sheenRef.current);\n\n  /** Draw the first `count` segments; segments from `dry` on still carry their wet sheen. */\n  const draw = React.useCallback((count: number, dry: number) => {\n    const canvas = canvasRef.current;\n    if (!canvas) return;\n    const ctx = canvas.getContext(\"2d\");\n    if (!ctx) return;\n    const dpr = Math.min(window.devicePixelRatio || 1, 2);\n    const w = canvas.clientWidth;\n    const h = canvas.clientHeight;\n    if (canvas.width !== Math.round(w * dpr) || canvas.height !== Math.round(h * dpr)) {\n      canvas.width = Math.round(w * dpr);\n      canvas.height = Math.round(h * dpr);\n    }\n    ctx.setTransform(dpr, 0, 0, dpr, 0, 0);\n    ctx.clearRect(0, 0, w, h);\n    const { ink: inkColor, sheen } = readColors(probeRef.current, sheenRef.current);\n    const segs = ink$.current.segs;\n    ctx.lineCap = \"round\";\n    ctx.lineJoin = \"round\";\n    ctx.strokeStyle = inkColor;\n    for (let i = 0; i < Math.min(count, segs.length); i++) {\n      const s = segs[i];\n      ctx.lineWidth = s.w;\n      ctx.beginPath();\n      ctx.moveTo(s.x0, s.y0);\n      ctx.quadraticCurveTo(s.cx, s.cy, s.x1, s.y1);\n      ctx.stroke();\n    }\n    // The wet sheen: a thin light line along the upper edge of each wet segment.\n    ctx.strokeStyle = sheen;\n    ctx.globalAlpha = 0.3;\n    for (let i = Math.max(0, dry); i < Math.min(count, segs.length); i++) {\n      const s = segs[i];\n      const o = s.w * 0.16;\n      ctx.lineWidth = Math.max(0.4, s.w * 0.2);\n      ctx.beginPath();\n      ctx.moveTo(s.x0 - o, s.y0 - o);\n      ctx.quadraticCurveTo(s.cx - o, s.cy - o, s.x1 - o, s.y1 - o);\n      ctx.stroke();\n    }\n    ctx.globalAlpha = 1;\n  }, []);\n\n  React.useEffect(() => {\n    const canvas = canvasRef.current;\n    if (!canvas) return;\n    const observer = new ResizeObserver(() => draw(ink$.current.segs.length, ink$.current.wet));\n    observer.observe(canvas);\n    const theme = new MutationObserver(() => draw(ink$.current.segs.length, ink$.current.wet));\n    theme.observe(document.documentElement, { attributes: true, attributeFilter: [\"class\", \"style\", \"data-theme\"] });\n    return () => {\n      observer.disconnect();\n      theme.disconnect();\n    };\n  }, [draw, phase, typing]);\n\n  React.useEffect(() => {\n    const I = ink$.current;\n    return () => cancelAnimationFrame(I.frame);\n  }, []);\n\n  const point = (e: React.PointerEvent) => {\n    const r = (e.currentTarget as HTMLElement).getBoundingClientRect();\n    return { x: e.clientX - r.left, y: e.clientY - r.top };\n  };\n\n  const down = (e: React.PointerEvent) => {\n    if (phase === \"drying\" || phase === \"signed\" || e.button !== 0) return;\n    (e.currentTarget as HTMLElement).setPointerCapture(e.pointerId);\n    const p = point(e);\n    pen.current = { x: p.x, y: p.y, t: e.timeStamp, w: 3, mx: p.x, my: p.y };\n    ink$.current.strokes.push(ink$.current.segs.length);\n    // A tap leaves a dot.\n    ink$.current.segs.push({ x0: p.x, y0: p.y, cx: p.x, cy: p.y, x1: p.x + 0.1, y1: p.y, w: 2.6 });\n    draw(ink$.current.segs.length, 0);\n  };\n  const move = (e: React.PointerEvent) => {\n    const last = pen.current;\n    if (!last) return;\n    const events = typeof e.nativeEvent.getCoalescedEvents === \"function\" ? e.nativeEvent.getCoalescedEvents() : [e.nativeEvent];\n    const r = (e.currentTarget as HTMLElement).getBoundingClientRect();\n    for (const ev of events.length ? events : [e.nativeEvent]) {\n      const x = ev.clientX - r.left;\n      const y = ev.clientY - r.top;\n      const dist = Math.hypot(x - last.x, y - last.y);\n      if (dist < 1.2) continue;\n      const dt = Math.max(1, ev.timeStamp - last.t);\n      const speed = dist / dt; // px per ms\n      // A nib: slow is heavy, fast is light, and the change is eased so the line never steps.\n      const target = Math.max(1.1, Math.min(3.6, 3.8 - speed * 1.1));\n      const w = last.w + (target - last.w) * 0.35;\n      const mx = (last.x + x) / 2;\n      const my = (last.y + y) / 2;\n      ink$.current.segs.push({ x0: last.mx, y0: last.my, cx: last.x, cy: last.y, x1: mx, y1: my, w });\n      ink$.current.length += dist;\n      pen.current = { x, y, t: ev.timeStamp, w, mx, my };\n    }\n    draw(ink$.current.segs.length, 0);\n  };\n  const up = () => {\n    if (!pen.current) return;\n    pen.current = null;\n    if (ink$.current.length > 30 && phase === \"empty\") setPhase(\"inked\");\n  };\n\n  const clear = (now = false) => {\n    const I = ink$.current;\n    cancelAnimationFrame(I.frame);\n    const total = I.segs.length;\n    const finish = () => {\n      I.segs = [];\n      I.strokes = [];\n      I.length = 0;\n      I.wet = 0;\n      draw(0, 0);\n      setPhase(\"empty\");\n      setResult(null);\n      onClear?.();\n    };\n    if (now || reduced || !total) return finish();\n    // Rewind: the strokes come off last one first, quickly.\n    const start = performance.now();\n    const duration = Math.min(760, 220 + total * 2.4);\n    const tick = (t: number) => {\n      const k = Math.min(1, (t - start) / duration);\n      draw(Math.round(total * (1 - inOut(k))), 0);\n      if (k < 1) I.frame = requestAnimationFrame(tick);\n      else finish();\n    };\n    I.frame = requestAnimationFrame(tick);\n  };\n\n  const exportInk = (): { svg: string; dataUrl: string } => {\n    const segs = ink$.current.segs;\n    let x0 = Infinity;\n    let y0 = Infinity;\n    let x1 = -Infinity;\n    let y1 = -Infinity;\n    let pad = 0;\n    segs.forEach((s) => {\n      x0 = Math.min(x0, s.x0, s.x1, s.cx);\n      y0 = Math.min(y0, s.y0, s.y1, s.cy);\n      x1 = Math.max(x1, s.x0, s.x1, s.cx);\n      y1 = Math.max(y1, s.y0, s.y1, s.cy);\n      pad = Math.max(pad, s.w);\n    });\n    x0 -= pad;\n    y0 -= pad;\n    x1 += pad;\n    y1 += pad;\n    const w = Math.max(1, Math.ceil(x1 - x0));\n    const h = Math.max(1, Math.ceil(y1 - y0));\n    const { ink: inkColor } = colors();\n    const paths = segs\n      .map((s) => `<path d=\"M${(s.x0 - x0).toFixed(1)} ${(s.y0 - y0).toFixed(1)}Q${(s.cx - x0).toFixed(1)} ${(s.cy - y0).toFixed(1)} ${(s.x1 - x0).toFixed(1)} ${(s.y1 - y0).toFixed(1)}\" stroke-width=\"${s.w.toFixed(2)}\"/>`)\n      .join(\"\");\n    const svg = `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 ${w} ${h}\" width=\"${w}\" height=\"${h}\"><g fill=\"none\" stroke=\"${inkColor}\" stroke-linecap=\"round\" stroke-linejoin=\"round\">${paths}</g></svg>`;\n    const out = document.createElement(\"canvas\");\n    out.width = w * 2;\n    out.height = h * 2;\n    const ctx = out.getContext(\"2d\");\n    if (ctx) {\n      ctx.scale(2, 2);\n      ctx.translate(-x0, -y0);\n      ctx.strokeStyle = inkColor;\n      ctx.lineCap = \"round\";\n      segs.forEach((s) => {\n        ctx.lineWidth = s.w;\n        ctx.beginPath();\n        ctx.moveTo(s.x0, s.y0);\n        ctx.quadraticCurveTo(s.cx, s.cy, s.x1, s.y1);\n        ctx.stroke();\n      });\n    }\n    const canvas = canvasRef.current;\n    if (canvas) {\n      const r = canvas.getBoundingClientRect();\n      from.current = new DOMRect(r.left + x0, r.top + y0, w, h);\n    }\n    return { svg, dataUrl: out.toDataURL(\"image/png\") };\n  };\n\n  const exportTyped = (text: string): { svg: string; dataUrl: string } => {\n    const { ink: inkColor } = colors();\n    const out = document.createElement(\"canvas\");\n    const ctx = out.getContext(\"2d\");\n    const size = 44;\n    let width = 300;\n    if (ctx) {\n      ctx.font = `${size}px ${SCRIPT}`;\n      width = Math.ceil(ctx.measureText(text).width + 16);\n      out.width = width * 2;\n      out.height = (size + 24) * 2;\n      ctx.scale(2, 2);\n      ctx.font = `${size}px ${SCRIPT}`;\n      ctx.fillStyle = inkColor;\n      ctx.textBaseline = \"middle\";\n      ctx.fillText(text, 8, (size + 24) / 2);\n    }\n    const esc = text.replace(/[&<>\"]/g, (c) => `&#${c.charCodeAt(0)};`);\n    const svg = `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 ${width} ${size + 24}\" width=\"${width}\" height=\"${size + 24}\"><text x=\"8\" y=\"${(size + 24) / 2}\" dominant-baseline=\"middle\" font-size=\"${size}\" font-family='${SCRIPT}' fill=\"${inkColor}\">${esc}</text></svg>`;\n    from.current = null;\n    return { svg, dataUrl: out.toDataURL(\"image/png\") };\n  };\n\n  const accept = () => {\n    if (phase !== \"inked\" && !(typing && typed.trim())) return;\n    const signedAt = new Date();\n    const finish = (out: { svg: string; dataUrl: string }) => {\n      const r: SignatureResult = { ...out, signedAt, ...(typing ? { typed: typed.trim() } : {}) };\n      setResult(r);\n      setPhase(\"signed\");\n      setSaid(`Signed${name ? ` by ${name}` : \"\"}.`);\n      let pending: unknown;\n      try {\n        pending = onSign?.(r);\n      } catch {\n        refuse();\n        return;\n      }\n      if (pending && typeof (pending as Promise<unknown>).then === \"function\") (pending as Promise<unknown>).then(undefined, refuse);\n    };\n    const refuse = () => {\n      setPhase(typing ? \"empty\" : \"inked\");\n      setResult(null);\n      setSaid(\"Couldn’t save the signature. Try again.\");\n      if (!reduced) rootRef.current?.animate([{ translate: \"0 0\" }, { translate: \"-4px 0\" }, { translate: \"4px 0\" }, { translate: \"-2px 0\" }, { translate: \"0 0\" }], { duration: 380, easing: \"ease-out\" });\n      requestAnimationFrame(() => draw(ink$.current.segs.length, ink$.current.segs.length));\n    };\n    if (typing) {\n      finish(exportTyped(typed.trim()));\n      return;\n    }\n    const I = ink$.current;\n    if (reduced) {\n      I.wet = I.segs.length;\n      draw(I.segs.length, I.segs.length);\n      finish(exportInk());\n      return;\n    }\n    // Dry: the sheen goes off in the order it was written.\n    setPhase(\"drying\");\n    const total = I.segs.length;\n    const start = performance.now();\n    const duration = Math.min(900, 300 + total * 2);\n    const tick = (t: number) => {\n      const k = Math.min(1, (t - start) / duration);\n      I.wet = Math.round(total * inOut(k));\n      draw(total, I.wet);\n      if (k < 1) I.frame = requestAnimationFrame(tick);\n      else finish(exportInk());\n    };\n    I.frame = requestAnimationFrame(tick);\n  };\n\n  // Settle: the signature lifts off the pad and lands small on the signed line.\n  React.useLayoutEffect(() => {\n    if (phase !== \"signed\" || !result || reduced) return;\n    const img = imgRef.current;\n    const start = from.current;\n    from.current = null;\n    if (!img || !start) return;\n    // Wait for the image to decode so its size is real, then fly it from where the ink was.\n    img.style.opacity = \"0\";\n    let live = true;\n    img\n      .decode()\n      .catch(() => {})\n      .then(() => {\n        if (!live) return;\n        img.style.opacity = \"\";\n        const end = img.getBoundingClientRect();\n        if (!end.width || !end.height) return;\n        img.animate(\n          [\n            { transformOrigin: \"0 0\", transform: `translate(${start.left - end.left}px, ${start.top - end.top}px) scale(${start.width / end.width}, ${start.height / end.height})` },\n            { transformOrigin: \"0 0\", transform: \"none\" },\n          ],\n          { duration: 620, easing: EASE },\n        );\n      });\n    return () => {\n      live = false;\n      img.style.opacity = \"\";\n    };\n  }, [phase, result, reduced]);\n\n  const when = result\n    ? result.signedAt.toLocaleString(hydrated ? locale : \"en-US\", { day: \"numeric\", month: \"short\", year: \"numeric\", hour: \"numeric\", minute: \"2-digit\" })\n    : \"\";\n  const signed = phase === \"signed\" && result;\n\n  return (\n    <div\n      ref={rootRef}\n      className={`@container w-full overflow-clip rounded-[20px] bg-background shadow-[0_0_0_1px_var(--border)] transition-[height] duration-500 ${className}`}\n      style={{ height: (signed ? SIGNED_H : PAD_H) + 52, transitionTimingFunction: EASE }}\n      {...props}\n    >\n      <div aria-hidden=\"true\" data-natural-width className=\"grid h-0\" style={{ gridTemplateColumns: \"minmax(0, 420px)\" }} />\n      <span ref={probeRef} aria-hidden=\"true\" className=\"hidden\" style={{ color: ink }} />\n      <span ref={sheenRef} aria-hidden=\"true\" className=\"hidden text-background\" />\n\n      {signed ? (\n        <div className=\"flex h-full flex-col justify-between p-4\">\n          <div className=\"relative flex h-[52px] items-end border-b border-dashed\" style={{ borderColor: \"color-mix(in oklab, var(--foreground) 22%, var(--border))\" }}>\n            {/* eslint-disable-next-line @next/next/no-img-element */}\n            <img ref={imgRef} src={result.dataUrl} alt={name ? `Signature of ${name}` : \"Signature\"} className=\"mb-[-6px] h-[52px] w-auto max-w-[70%] object-contain object-left-bottom\" />\n            <span className=\"ml-auto mb-1.5 inline-flex items-center gap-1 text-[11.5px] font-medium text-emerald-600 dark:text-emerald-400\">\n              <Check className=\"size-3.5\" strokeWidth={2.4} aria-hidden=\"true\" />\n              Signed\n            </span>\n          </div>\n          <div className=\"flex items-end justify-between gap-3\">\n            <p className=\"min-w-0 text-[12px] leading-snug text-muted-foreground\">\n              {name && <span className=\"block truncate font-medium text-foreground\">{name}</span>}\n              <span className=\"tabular-nums\">{when}</span>\n            </p>\n            <button\n              type=\"button\"\n              onClick={() => {\n                setTyping(false);\n                setTyped(\"\");\n                clear(true);\n              }}\n              className={`shrink-0 cursor-pointer rounded-full px-2.5 py-1 text-[12px] text-muted-foreground transition-colors hover:text-foreground ${FOCUS}`}\n            >\n              Sign again\n            </button>\n          </div>\n        </div>\n      ) : (\n        <>\n          <div className=\"relative\" style={{ height: PAD_H }}>\n            {typing ? (\n              <div className=\"flex h-full flex-col justify-center px-5\">\n                <input\n                  ref={(el) => el?.focus({ preventScroll: true })}\n                  value={typed}\n                  onChange={(e) => setTyped(e.target.value)}\n                  onKeyDown={(e) => e.key === \"Enter\" && accept()}\n                  aria-label=\"Type your full name\"\n                  placeholder=\"Your full name\"\n                  className=\"w-full bg-transparent text-[36px] leading-tight outline-none placeholder:text-[16px] placeholder:text-muted-foreground\"\n                  style={{ fontFamily: SCRIPT, color: ink }}\n                />\n              </div>\n            ) : (\n              <canvas\n                ref={canvasRef}\n                role=\"img\"\n                aria-label={phase === \"empty\" ? \"Signature pad, empty\" : \"Your signature\"}\n                onPointerDown={down}\n                onPointerMove={move}\n                onPointerUp={up}\n                onPointerCancel={up}\n                className=\"absolute inset-0 size-full cursor-crosshair touch-none\"\n              />\n            )}\n            {/* The signing line, and the prompt until the first stroke. */}\n            <div aria-hidden=\"true\" className=\"pointer-events-none absolute inset-x-5 bottom-9 flex items-end gap-2\">\n              <span className=\"pb-0.5 text-[16px] text-muted-foreground\">×</span>\n              <span className=\"mb-1.5 h-px flex-1\" style={{ background: \"color-mix(in oklab, var(--foreground) 22%, var(--border))\" }} />\n            </div>\n            <p\n              aria-hidden=\"true\"\n              className=\"pointer-events-none absolute inset-x-0 bottom-3 text-center text-[11.5px] text-muted-foreground transition-opacity duration-300\"\n              style={{ opacity: phase === \"empty\" && !typing ? 1 : 0 }}\n            >\n              {label}\n            </p>\n          </div>\n          <div className=\"flex h-[52px] items-center justify-between gap-1 border-t border-border px-2 sm:px-3\">\n            <button\n              type=\"button\"\n              onClick={() => {\n                setTyping((t) => !t);\n                setTyped(\"\");\n                if (!typing) clear(true);\n              }}\n              className={`inline-flex h-8 shrink-0 cursor-pointer items-center gap-1.5 whitespace-nowrap rounded-full px-2 text-[12.5px] text-muted-foreground transition-colors hover:text-foreground ${FOCUS}`}\n            >\n              {typing ? <PenLine className=\"size-3.5\" aria-hidden=\"true\" /> : <Keyboard className=\"size-3.5\" aria-hidden=\"true\" />}\n              <span className=\"@[17rem]:hidden\">{typing ? \"Draw\" : \"Type\"}</span>\n              <span className=\"hidden @[17rem]:inline\">\n                <TextMorph>{typing ? \"Draw instead\" : \"Type instead\"}</TextMorph>\n              </span>\n            </button>\n            <div className=\"flex items-center gap-1.5\">\n              {!typing && (\n                <button\n                  type=\"button\"\n                  onClick={() => clear()}\n                  disabled={phase === \"empty\" || phase === \"drying\"}\n                  className={`h-8 cursor-pointer rounded-full px-2.5 text-[12.5px] text-muted-foreground transition-[color,opacity] hover:text-foreground disabled:cursor-default disabled:opacity-40 ${FOCUS}`}\n                >\n                  Clear\n                </button>\n              )}\n              <button\n                type=\"button\"\n                onClick={accept}\n                disabled={!(phase === \"inked\" || (typing && typed.trim()))}\n                className={`h-8 cursor-pointer rounded-full bg-primary px-3.5 text-[12.5px] font-medium text-primary-foreground transition-[opacity,scale] duration-200 active:scale-[0.97] disabled:cursor-default disabled:opacity-40 disabled:active:scale-100 ${FOCUS}`}\n              >\n                Accept\n              </button>\n            </div>\n          </div>\n        </>\n      )}\n      <p className=\"sr-only\" aria-live=\"polite\">\n        {said}\n      </p>\n    </div>\n  );\n}\n"}],"css":{},"docs":"Docs and live preview: https://hairlineui.com/ui/signature-pad. MIT licensed: https://hairlineui.com/license#components","meta":{"license":"MIT"}}