{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "footer-plotted",
  "title": "Plotted footer",
  "description": "A footer under a horizon of ridgelines a pen plots back to front as it comes into view, with link columns and a closing line below.",
  "dependencies": [
    "svg-scroll-draw@^2.29.0"
  ],
  "registryDependencies": [
    "https://scrollfx-ui.vercel.app/r/plotter.json"
  ],
  "files": [
    {
      "path": "registry/blocks/footer-plotted.tsx",
      "content": "'use client';\n\n/**\n * footer-plotted — a footer under a horizon: ridgelines a pen plots back to\n * front as the footer comes into view, the nearest in the accent colour, with\n * the hidden lines removed. Link columns and a closing line below.\n *\n * Built on svg-scroll-draw (MIT): https://github.com/DhruvilChauahan0210/scrollfx\n * Needs: react, svg-scroll-draw, and lib/plotter (installed with it).\n * Styling: Tailwind CSS with shadcn/ui tokens.\n *\n * A footer is at the bottom of the page and may never reach the middle of the\n * screen, so the horizon plays once when it comes into view instead of\n * following the scroll. The links are plain HTML. Reduced motion shows it drawn.\n */\n\nimport { useEffect, useState, type ReactNode } from 'react';\nimport { ScrollDraw } from 'svg-scroll-draw/react';\nimport 'svg-scroll-draw/no-flash.css';\nimport { ridgelines, staggerFor, type Stroke } from '@/lib/plotter';\n\nexport interface FooterColumn {\n  title: string;\n  links: { label: string; href: string }[];\n}\n\nexport interface FooterPlottedProps {\n  /** The name, top left. */\n  brand?: ReactNode;\n  /** A sentence or two beside the name. */\n  note?: ReactNode;\n  columns?: FooterColumn[];\n  /** The closing line, bottom left. */\n  legal?: ReactNode;\n  seed?: number;\n  accent?: string;\n  className?: string;\n}\n\nconst DEFAULT_COLUMNS: FooterColumn[] = [\n  { title: 'Product', links: [{ label: 'Features', href: '#' }, { label: 'Pricing', href: '#' }, { label: 'Changelog', href: '#' }] },\n  { title: 'Company', links: [{ label: 'About', href: '#' }, { label: 'Careers', href: '#' }, { label: 'Contact', href: '#' }] },\n  { title: 'Resources', links: [{ label: 'Docs', href: '#' }, { label: 'Guides', href: '#' }, { label: 'Status', href: '#' }] },\n];\n\nconst STROKE_MS = 900;\nconst TOTAL_MS = 3200;\n\nexport function FooterPlotted({\n  brand = 'Acme',\n  note = 'Dashboards that show the shape of your data, not just its totals.',\n  columns = DEFAULT_COLUMNS,\n  legal = `© ${new Date().getFullYear()} Acme. All rights reserved.`,\n  seed = 9,\n  accent = '#e0482a',\n  className = '',\n}: FooterPlottedProps) {\n  const [strokes, setStrokes] = useState<Stroke[] | null>(null);\n  useEffect(() => setStrokes(ridgelines({ seed })), [seed]);\n\n  return (\n    <footer className={`overflow-hidden border-t ${className}`}>\n      <div className=\"mx-auto max-w-7xl px-6 sm:px-10\">\n        {/* On a phone the full range would be a thin strip: show its middle, larger. */}\n        <div className=\"relative -mx-6 aspect-[3/1] sm:-mx-10 sm:aspect-[1200/260]\">\n          {strokes && (\n            // Plays once on arrival: each ridge in STROKE_MS, back to front, all\n            // of them within TOTAL_MS.\n            <ScrollDraw autoplay duration={STROKE_MS} stagger={staggerFor(strokes.length, TOTAL_MS / STROKE_MS - 1)} easing=\"ease-out\" className=\"absolute inset-0\" aria-hidden>\n              <svg viewBox=\"0 0 1200 260\" preserveAspectRatio=\"xMidYMax slice\" className=\"size-full\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.1\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n                {strokes.map((s, i) => <path key={i} d={s.d} stroke={s.pen ? accent : undefined} strokeWidth={s.pen ? 1.6 : undefined} />)}\n              </svg>\n            </ScrollDraw>\n          )}\n        </div>\n\n        <div className=\"grid gap-12 border-t py-14 md:grid-cols-[minmax(0,5fr)_minmax(0,7fr)]\">\n          <div className=\"max-w-sm\">\n            <p className=\"font-serif text-3xl tracking-[-0.02em]\">{brand}</p>\n            {note && <p className=\"mt-4 text-pretty leading-relaxed text-muted-foreground\">{note}</p>}\n          </div>\n          <nav aria-label=\"Footer\" className=\"grid grid-cols-2 gap-10 sm:grid-cols-3\">\n            {columns.map((col) => (\n              <div key={col.title}>\n                <p className=\"font-mono text-[11px] uppercase tracking-[0.2em] text-muted-foreground\">{col.title}</p>\n                <ul className=\"mt-5 space-y-3\">\n                  {col.links.map((l) => (\n                    <li key={l.label}>\n                      <a href={l.href} className=\"underline-offset-4 hover:underline\">{l.label}</a>\n                    </li>\n                  ))}\n                </ul>\n              </div>\n            ))}\n          </nav>\n        </div>\n\n        <div className=\"border-t py-6 font-mono text-[11px] uppercase tracking-[0.18em] text-muted-foreground\">{legal}</div>\n      </div>\n    </footer>\n  );\n}\n",
      "type": "registry:component"
    }
  ],
  "meta": {
    "motion": "Scroll to the end: the horizon is plotted, back to front.",
    "tall": false
  },
  "type": "registry:block"
}