{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"blog-cards-editorial","type":"registry:component","title":"Blog cards · Editorial","description":"Cover card with a drawn type specimen whose layers drift under the pointer, plus category, excerpt and byline.","author":"GetUrUI <hello@geturui.dev>","dependencies":["motion","lucide-react"],"registryDependencies":[],"files":[{"path":"registry/geturui/examples/blog-cards/editorial.tsx","type":"registry:component","target":"components/examples/blog-cards/editorial.tsx","content":"\"use client\";\n\nimport * as React from \"react\";\nimport { motion, useMotionValue, useReducedMotion, useSpring, useTransform, type MotionValue } from \"motion/react\";\nimport { ArrowUpRight, Clock } from \"lucide-react\";\nimport { cn } from \"@/lib/utils\";\n\nexport interface EditorialBlogCardProps {\n  category?: string;\n  title?: string;\n  excerpt?: string;\n  author?: string;\n  /** Initials for the author avatar; derived from `author` when omitted. */\n  monogram?: string;\n  /** ISO date (YYYY-MM-DD), shown as \"Oct 2, 2026\". */\n  date?: string;\n  readingMinutes?: number;\n  /** Short label printed on the cover, e.g. an issue number. */\n  issue?: string;\n  href?: string;\n  onOpen?: () => void;\n  className?: string;\n}\n\nconst initialsOf = (name: string) =>\n  name\n    .split(/\\s+/)\n    .map((p) => p[0])\n    .filter(Boolean)\n    .slice(0, 2)\n    .join(\"\")\n    .toUpperCase();\n\nconst formatPostDate = (iso: string) =>\n  new Date(`${iso}T12:00:00Z`).toLocaleDateString(\"en-US\", { month: \"short\", day: \"numeric\", year: \"numeric\", timeZone: \"UTC\" });\n\nfunction useDepth(source: MotionValue<number>, depth: number) {\n  return useTransform(source, (v) => v * depth);\n}\n\n/** Editorial cover card: a drawn type-specimen cover that drifts in layers under the pointer, with category, title, excerpt and byline. */\nexport function EditorialBlogCard({\n  category = \"Typography\",\n  title = \"The quiet return of serif type in product interfaces\",\n  excerpt = \"Teams are trading neutral grotesques for warmer serifs in headings. We looked at 40 launches this year to see where it works and where it gets in the way.\",\n  author = \"Iris Calder\",\n  monogram,\n  date = \"2026-09-28\",\n  readingMinutes = 8,\n  issue = \"Issue 14\",\n  href = \"#\",\n  onOpen,\n  className,\n}: EditorialBlogCardProps) {\n  const reduce = useReducedMotion() ?? false;\n  const px = useMotionValue(0);\n  const py = useMotionValue(0);\n  const sx = useSpring(px, { stiffness: 150, damping: 20 });\n  const sy = useSpring(py, { stiffness: 150, damping: 20 });\n  const backX = useDepth(sx, -8);\n  const backY = useDepth(sy, -6);\n  const midX = useDepth(sx, 10);\n  const midY = useDepth(sy, 8);\n  const frontX = useDepth(sx, 22);\n  const frontY = useDepth(sy, 16);\n\n  function onMove(e: React.PointerEvent<HTMLAnchorElement>) {\n    if (reduce || e.pointerType !== \"mouse\") return;\n    const r = e.currentTarget.getBoundingClientRect();\n    px.set((e.clientX - r.left) / r.width - 0.5);\n    py.set((e.clientY - r.top) / r.height - 0.5);\n  }\n\n  function onLeave() {\n    px.set(0);\n    py.set(0);\n  }\n\n  return (\n    <motion.a\n      href={href}\n      onClick={onOpen}\n      onPointerMove={onMove}\n      onPointerLeave={onLeave}\n      whileTap={reduce ? undefined : { scale: 0.98 }}\n      transition={{ type: \"spring\", stiffness: 420, damping: 30 }}\n      className={cn(\n        \"group block w-full max-w-[380px] overflow-hidden rounded-xl border border-border bg-surface-raised shadow-sm outline-none transition-shadow duration-300 hover:shadow-md focus-visible:shadow-[var(--focus-ring)]\",\n        className,\n      )}\n    >\n      <div aria-hidden className=\"relative m-2 h-48 overflow-hidden rounded-lg bg-surface-sunken\">\n        <motion.span style={{ x: backX, y: backY }} className=\"absolute -right-10 -top-12 size-48 rounded-full border-[18px] border-ink/[0.07]\" />\n        <motion.div style={{ x: midX, y: midY }} className=\"absolute bottom-6 left-6 right-24 space-y-1.5\">\n          {[100, 86, 92, 64].map((w, i) => (\n            <span key={i} className=\"block h-1.5 rounded-full bg-ink/10\" style={{ width: `${w}%` }} />\n          ))}\n        </motion.div>\n        <motion.span\n          style={{ x: midX, y: midY }}\n          className=\"absolute right-7 top-6 font-display text-[88px] font-semibold leading-none tracking-[-4px] text-ink/85 transition-transform duration-500 ease-spring-soft group-hover:scale-105\"\n        >\n          Aa\n        </motion.span>\n        <motion.span style={{ x: frontX, y: frontY }} className=\"absolute bottom-8 right-10 size-11 rounded-full bg-volt shadow-glow\" />\n        <span className=\"absolute left-5 top-5 font-mono text-[11px] uppercase tracking-[0.14em] text-ink-subtle\">{issue}</span>\n      </div>\n\n      <div className=\"px-5 pb-5 pt-3\">\n        <div className=\"flex items-center justify-between gap-3\">\n          <span className=\"rounded-full border border-border px-2.5 py-0.5 text-[11.5px] font-medium text-ink-muted\">{category}</span>\n          <span\n            aria-hidden\n            className=\"grid size-8 place-items-center rounded-full border border-border text-ink-muted transition-[translate,color,background-color] duration-300 ease-spring group-hover:-translate-y-0.5 group-hover:translate-x-0.5 group-hover:bg-ink group-hover:text-bg\"\n          >\n            <ArrowUpRight className=\"size-4\" />\n          </span>\n        </div>\n        <h3 className=\"mt-3 text-balance font-display text-[21px] font-semibold leading-[1.2] tracking-[-0.5px] text-ink\">{title}</h3>\n        <p className=\"mt-2 line-clamp-3 text-[13.5px] leading-5 text-ink-muted\">{excerpt}</p>\n\n        <div className=\"mt-4 flex items-center gap-2.5 border-t border-border pt-4\">\n          <span aria-hidden className=\"grid size-8 shrink-0 place-items-center rounded-full bg-ink font-display text-[11px] font-semibold text-bg\">\n            {monogram ?? initialsOf(author)}\n          </span>\n          <div className=\"min-w-0 flex-1\">\n            <p className=\"truncate text-[13px] font-medium text-ink\">{author}</p>\n            <p className=\"text-xs text-ink-subtle\">\n              <time dateTime={date}>{formatPostDate(date)}</time>\n            </p>\n          </div>\n          <span className=\"inline-flex items-center gap-1 text-xs text-ink-subtle\">\n            <Clock aria-hidden className=\"size-3.5\" />\n            {readingMinutes} min read\n          </span>\n        </div>\n      </div>\n    </motion.a>\n  );\n}\n"},{"path":"LICENSE-geturui.md","type":"registry:file","target":"LICENSE-geturui.md","content":"MIT License\n\nCopyright (c) 2026 geturui.com\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"}],"categories":["examples","blog","article","post","card","journal","editorial","reading time","bookmark","series"],"meta":{"tier":"free","license":"MIT","docs":"https://geturui.com/docs/blog-cards#editorial"}}