{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"blog-cards","type":"registry:component","title":"Blog cards","description":"Four ways to present a post — editorial cover, compact list, featured series and author-led quote — each with its own motion moment, from layered parallax to a gliding row highlight.","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":"registry/geturui/examples/blog-cards/compact-list.tsx","type":"registry:component","target":"components/examples/blog-cards/compact-list.tsx","content":"\"use client\";\n\nimport * as React from \"react\";\nimport { motion, useReducedMotion } from \"motion/react\";\nimport { ArrowRight, Check } from \"lucide-react\";\nimport { cn } from \"@/lib/utils\";\n\nexport interface CompactPost {\n  id: string;\n  title: string;\n  category: string;\n  /** ISO date (YYYY-MM-DD). */\n  date: string;\n  readingMinutes: number;\n  /** How much the reader has read, 0 to 1. */\n  progress?: number;\n  href?: string;\n}\n\nexport interface CompactBlogListProps {\n  heading?: string;\n  posts?: CompactPost[];\n  /** Link for the \"View all\" action. */\n  allHref?: string;\n  onSelect?: (post: CompactPost) => void;\n  className?: string;\n}\n\nconst DEFAULT_POSTS: CompactPost[] = [\n  { id: \"p1\", title: \"Designing empty states people actually read\", category: \"Product\", date: \"2026-09-30\", readingMinutes: 6, progress: 1 },\n  { id: \"p2\", title: \"A practical guide to spring easing in CSS\", category: \"Motion\", date: \"2026-09-26\", readingMinutes: 9, progress: 0.45 },\n  { id: \"p3\", title: \"What we learned shipping dark mode first\", category: \"Engineering\", date: \"2026-09-19\", readingMinutes: 7, progress: 0 },\n  { id: \"p4\", title: \"Tokens, not themes: naming color for scale\", category: \"Design systems\", date: \"2026-09-12\", readingMinutes: 11, progress: 0.2 },\n];\n\nconst shortDate = (iso: string) => new Date(`${iso}T12:00:00Z`).toLocaleDateString(\"en-US\", { month: \"short\", day: \"numeric\", timeZone: \"UTC\" });\n\nfunction ProgressRing({ value, reduce }: { value: number; reduce: boolean }) {\n  const done = value >= 1;\n  return (\n    <span className=\"relative grid size-8 shrink-0 place-items-center\">\n      <svg viewBox=\"0 0 32 32\" className=\"absolute inset-0 -rotate-90\" aria-hidden>\n        <circle cx=\"16\" cy=\"16\" r=\"13\" fill=\"none\" strokeWidth=\"2.5\" className=\"stroke-ink/10\" />\n        {value > 0 && (\n          <motion.circle\n            cx=\"16\"\n            cy=\"16\"\n            r=\"13\"\n            fill=\"none\"\n            strokeWidth=\"2.5\"\n            strokeLinecap=\"round\"\n            className=\"stroke-volt-ink\"\n            initial={{ pathLength: reduce ? value : 0 }}\n            animate={{ pathLength: value }}\n            transition={{ type: \"spring\", stiffness: 120, damping: 22, delay: 0.15 }}\n          />\n        )}\n      </svg>\n      {done ? (\n        <Check aria-hidden className=\"size-3.5 text-volt-ink\" strokeWidth={3} />\n      ) : value === 0 ? null : (\n        <span aria-hidden className=\"font-mono text-[9px] text-ink-subtle\">\n          {Math.round(value * 100)}\n        </span>\n      )}\n      <span className=\"sr-only\">{done ? \"Finished\" : value > 0 ? `${Math.round(value * 100)}% read` : \"Not started\"}</span>\n    </span>\n  );\n}\n\n/** Compact list of posts with reading-progress rings, a highlight that glides between rows and arrow-key navigation. */\nexport function CompactBlogList({ heading = \"Latest from the journal\", posts = DEFAULT_POSTS, allHref = \"#\", onSelect, className }: CompactBlogListProps) {\n  const reduce = useReducedMotion() ?? false;\n  const id = React.useId();\n  const [active, setActive] = React.useState<number | null>(null);\n  const links = React.useRef<(HTMLAnchorElement | null)[]>([]);\n\n  function onKeyDown(e: React.KeyboardEvent<HTMLUListElement>) {\n    const current = links.current.findIndex((el) => el === document.activeElement);\n    if (current < 0) return;\n    const next =\n      e.key === \"ArrowDown\" ? Math.min(posts.length - 1, current + 1) : e.key === \"ArrowUp\" ? Math.max(0, current - 1) : e.key === \"Home\" ? 0 : e.key === \"End\" ? posts.length - 1 : null;\n    if (next === null) return;\n    e.preventDefault();\n    links.current[next]?.focus();\n  }\n\n  return (\n    <section aria-labelledby={`${id}-h`} className={cn(\"w-full max-w-[460px] rounded-xl border border-border bg-surface-raised p-2 shadow-sm\", className)}>\n      <div className=\"flex items-center justify-between px-3 pb-2 pt-2.5\">\n        <h3 id={`${id}-h`} className=\"font-display text-[15px] font-semibold tracking-[-0.2px] text-ink\">\n          {heading}\n        </h3>\n        <a\n          href={allHref}\n          className=\"group inline-flex items-center gap-1 rounded-xs px-1.5 py-0.5 text-[12.5px] font-medium text-ink-muted outline-none transition-colors hover:text-ink focus-visible:shadow-[var(--focus-ring)]\"\n        >\n          View all\n          <ArrowRight aria-hidden className=\"size-3.5 transition-[translate] duration-200 group-hover:translate-x-0.5\" />\n        </a>\n      </div>\n      <ul onKeyDown={onKeyDown} onPointerLeave={() => setActive(null)} className=\"flex flex-col\">\n        {posts.map((post, i) => (\n          <li key={post.id} className=\"relative\">\n            {active === i && (\n              <motion.span\n                layoutId={reduce ? undefined : `${id}-hl`}\n                aria-hidden\n                className=\"absolute inset-0 rounded-lg bg-surface-hover\"\n                transition={{ type: \"spring\", stiffness: 420, damping: 34 }}\n              />\n            )}\n            <a\n              ref={(el) => {\n                links.current[i] = el;\n              }}\n              href={post.href ?? \"#\"}\n              onClick={() => onSelect?.(post)}\n              onPointerEnter={() => setActive(i)}\n              onFocus={() => setActive(i)}\n              className=\"relative flex items-center gap-3 rounded-lg px-3 py-3 outline-none focus-visible:shadow-[var(--focus-ring)]\"\n            >\n              <ProgressRing value={post.progress ?? 0} reduce={reduce} />\n              <span className=\"min-w-0 flex-1\">\n                <span className=\"line-clamp-2 text-[14px] font-medium leading-5 text-ink\">{post.title}</span>\n                <span className=\"mt-0.5 block text-xs text-ink-subtle\">\n                  {post.category} · <time dateTime={post.date}>{shortDate(post.date)}</time>\n                </span>\n              </span>\n              <span className=\"shrink-0 rounded-full bg-surface-sunken px-2 py-0.5 font-mono text-[11px] tabular-nums text-ink-muted\">{post.readingMinutes} min</span>\n            </a>\n            {i < posts.length - 1 && <span aria-hidden className=\"absolute inset-x-3 bottom-0 h-px bg-border\" />}\n          </li>\n        ))}\n      </ul>\n    </section>\n  );\n}\n"},{"path":"registry/geturui/examples/blog-cards/featured-split.tsx","type":"registry:component","target":"components/examples/blog-cards/featured-split.tsx","content":"\"use client\";\n\nimport * as React from \"react\";\nimport { AnimatePresence, motion, useReducedMotion } from \"motion/react\";\nimport { ArrowRight, ChevronLeft, ChevronRight, Clock } from \"lucide-react\";\nimport { cn } from \"@/lib/utils\";\n\nexport interface SeriesPart {\n  title: string;\n  excerpt: string;\n  readingMinutes: number;\n  href?: string;\n}\n\nexport interface FeaturedBlogCardProps {\n  /** Small label above the title. */\n  eyebrow?: string;\n  series?: string;\n  parts?: SeriesPart[];\n  defaultIndex?: number;\n  onRead?: (part: SeriesPart, index: number) => void;\n  className?: string;\n}\n\nconst DEFAULT_PARTS: SeriesPart[] = [\n  { title: \"Start with the smallest token\", excerpt: \"Before components, before themes: how a single spacing scale shaped every decision that came after it.\", readingMinutes: 7 },\n  { title: \"Motion that explains itself\", excerpt: \"Springs, distances and durations that tell people what just happened without asking them to watch.\", readingMinutes: 9 },\n  { title: \"Layers, not lightboxes\", excerpt: \"Why we replaced most modals with panels that keep context in view, and what broke along the way.\", readingMinutes: 8 },\n  { title: \"Shipping the system to 40 teams\", excerpt: \"Versioning, codemods and the release notes nobody skipped. The rollout playbook, step by step.\", readingMinutes: 12 },\n];\n\nfunction Art({ index }: { index: number }) {\n  const k = index % 4;\n  return (\n    <svg viewBox=\"0 0 200 160\" className=\"size-full\" aria-hidden>\n      {k === 0 &&\n        Array.from({ length: 20 }, (_, i) => (\n          <rect key={i} x={28 + (i % 5) * 30} y={22 + Math.floor(i / 5) * 30} width=\"22\" height=\"22\" rx=\"6\" className={i === 12 ? \"fill-volt\" : \"fill-ink/10\"} />\n        ))}\n      {k === 1 && (\n        <g fill=\"none\" strokeWidth=\"2\">\n          {[64, 48, 32].map((r) => (\n            <circle key={r} cx=\"100\" cy=\"80\" r={r} className=\"stroke-ink/15\" />\n          ))}\n          <circle cx=\"148\" cy=\"56\" r=\"9\" className=\"fill-volt stroke-none\" />\n          <circle cx=\"100\" cy=\"80\" r=\"6\" className=\"fill-ink/40 stroke-none\" />\n        </g>\n      )}\n      {k === 2 &&\n        [0, 1, 2].map((i) => (\n          <rect key={i} x={46 + i * 18} y={30 + i * 18} width=\"92\" height=\"70\" rx=\"12\" className={i === 2 ? \"fill-volt\" : i === 1 ? \"fill-ink/20\" : \"fill-ink/10\"} />\n        ))}\n      {k === 3 &&\n        Array.from({ length: 6 }, (_, i) => (\n          <path\n            key={i}\n            d={`M10 ${40 + i * 16} C 60 ${20 + i * 16}, 120 ${70 + i * 16}, 190 ${36 + i * 16}`}\n            fill=\"none\"\n            strokeWidth=\"3\"\n            strokeLinecap=\"round\"\n            className={i === 3 ? \"stroke-volt\" : \"stroke-ink/15\"}\n          />\n        ))}\n    </svg>\n  );\n}\n\n/** Featured split card for a multi-part series: step through parts with arrows while art and copy crossfade in the direction of travel. */\nexport function FeaturedBlogCard({\n  eyebrow = \"Featured series\",\n  series = \"Building a design system in public\",\n  parts = DEFAULT_PARTS,\n  defaultIndex = 1,\n  onRead,\n  className,\n}: FeaturedBlogCardProps) {\n  const reduce = useReducedMotion() ?? false;\n  const [[index, dir], setState] = React.useState<[number, number]>([Math.min(defaultIndex, parts.length - 1), 0]);\n  const part = parts[index];\n  const id = React.useId();\n\n  function go(delta: number) {\n    const next = index + delta;\n    if (next < 0 || next >= parts.length) return;\n    setState([next, delta]);\n  }\n\n  const offset = reduce ? 0 : 16;\n  const swap = {\n    initial: (d: number) => ({ opacity: 0, x: d * offset, filter: \"blur(8px)\" }),\n    animate: { opacity: 1, x: 0, filter: \"blur(0px)\" },\n    exit: (d: number) => ({ opacity: 0, x: d * -offset, filter: \"blur(8px)\" }),\n  };\n  const btn =\n    \"grid size-9 place-items-center rounded-full border border-border-strong text-ink outline-none transition-colors hover:bg-surface-hover focus-visible:shadow-[var(--focus-ring)] disabled:opacity-35 disabled:hover:bg-transparent\";\n\n  return (\n    <section\n      aria-labelledby={`${id}-series`}\n      onKeyDown={(e) => {\n        if (e.key === \"ArrowRight\") go(1);\n        if (e.key === \"ArrowLeft\") go(-1);\n      }}\n      className={cn(\"grid w-full max-w-[680px] overflow-hidden rounded-xl border border-border bg-surface-raised shadow-sm sm:grid-cols-[1fr_1.1fr]\", className)}\n    >\n      <div className=\"relative m-2 h-48 overflow-hidden rounded-lg bg-surface-sunken sm:h-auto sm:min-h-[260px]\">\n        <AnimatePresence mode=\"popLayout\" initial={false} custom={dir}>\n          <motion.div\n            key={index}\n            custom={dir}\n            variants={swap}\n            initial=\"initial\"\n            animate=\"animate\"\n            exit=\"exit\"\n            transition={{ type: \"spring\", stiffness: 300, damping: 30 }}\n            className=\"absolute inset-0 p-4\"\n          >\n            <Art index={index} />\n          </motion.div>\n        </AnimatePresence>\n        <span className=\"absolute left-3 top-3 rounded-full bg-glass px-2.5 py-1 font-mono text-[11px] text-ink-muted backdrop-blur\">\n          Part {index + 1} of {parts.length}\n        </span>\n      </div>\n\n      <div className=\"flex flex-col p-5 sm:p-6\">\n        <p className=\"text-xs font-medium text-ink-subtle\">{eyebrow}</p>\n        <p id={`${id}-series`} className=\"mt-0.5 text-[13px] text-ink-muted\">\n          {series}\n        </p>\n        <div aria-live=\"polite\" className=\"relative mt-4 min-h-[132px]\">\n          <AnimatePresence mode=\"wait\" initial={false} custom={dir}>\n            <motion.div key={index} custom={dir} variants={swap} initial=\"initial\" animate=\"animate\" exit=\"exit\" transition={{ duration: 0.22 }}>\n              <h3 className=\"text-balance font-display text-[22px] font-semibold leading-[1.15] tracking-[-0.5px] text-ink\">{part.title}</h3>\n              <p className=\"mt-2 text-[13.5px] leading-5 text-ink-muted\">{part.excerpt}</p>\n              <p className=\"mt-3 inline-flex items-center gap-1 text-xs text-ink-subtle\">\n                <Clock aria-hidden className=\"size-3.5\" />\n                {part.readingMinutes} min read\n              </p>\n            </motion.div>\n          </AnimatePresence>\n        </div>\n\n        <div aria-hidden className=\"mt-4 flex gap-1.5\">\n          {parts.map((_, i) => (\n            <span key={i} className=\"relative h-1 flex-1 overflow-hidden rounded-full bg-ink/10\">\n              <motion.span\n                className=\"absolute inset-0 origin-left rounded-full bg-ink\"\n                initial={false}\n                animate={{ scaleX: i <= index ? 1 : 0, opacity: i === index ? 1 : 0.35 }}\n                transition={{ type: \"spring\", stiffness: 260, damping: 30 }}\n              />\n            </span>\n          ))}\n        </div>\n\n        <div className=\"mt-5 flex items-center gap-2\">\n          <motion.a\n            href={part.href ?? \"#\"}\n            onClick={() => onRead?.(part, index)}\n            whileTap={reduce ? undefined : { scale: 0.96 }}\n            className=\"mr-auto inline-flex h-9 items-center gap-1.5 rounded-full bg-volt px-4 text-[13px] font-medium text-on-volt outline-none transition-shadow hover:shadow-glow focus-visible:shadow-[var(--focus-ring)]\"\n          >\n            Read part {index + 1}\n            <ArrowRight aria-hidden className=\"size-3.5\" />\n          </motion.a>\n          <button type=\"button\" aria-label=\"Previous part\" disabled={index === 0} onClick={() => go(-1)} className={btn}>\n            <ChevronLeft aria-hidden className=\"size-4\" />\n          </button>\n          <button type=\"button\" aria-label=\"Next part\" disabled={index === parts.length - 1} onClick={() => go(1)} className={btn}>\n            <ChevronRight aria-hidden className=\"size-4\" />\n          </button>\n        </div>\n      </div>\n    </section>\n  );\n}\n"},{"path":"registry/geturui/examples/blog-cards/author.tsx","type":"registry:component","target":"components/examples/blog-cards/author.tsx","content":"\"use client\";\n\nimport * as React from \"react\";\nimport { AnimatePresence, motion, useReducedMotion } from \"motion/react\";\nimport { Bookmark, Check, Link2, Quote } from \"lucide-react\";\nimport { cn } from \"@/lib/utils\";\n\nexport interface AuthorBlogCardProps {\n  author?: string;\n  role?: string;\n  /** Initials for the avatar; derived from `author` when omitted. */\n  monogram?: string;\n  title?: string;\n  /** A line pulled from the post, shown large. */\n  quote?: string;\n  /** ISO date (YYYY-MM-DD). */\n  date?: string;\n  readingMinutes?: number;\n  href?: string;\n  /** Absolute URL copied by the share button. */\n  shareUrl?: string;\n  saves?: number;\n  /** Controlled bookmark state. */\n  saved?: boolean;\n  defaultSaved?: boolean;\n  onSavedChange?: (saved: boolean) => 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 spring = { type: \"spring\", stiffness: 420, damping: 30 } as const;\n\n/** Author-led card: byline first, a pull quote from the post, and a bookmark that pops and ticks its count with a copy-link action beside it. */\nexport function AuthorBlogCard({\n  author = \"Tomás Ferreira\",\n  role = \"Staff engineer, Payments\",\n  monogram,\n  title = \"We deleted half our loading spinners. Conversion went up.\",\n  quote = \"A spinner promises progress it can't show. A skeleton shows the shape of what's coming, and people wait for shapes.\",\n  date = \"2026-09-24\",\n  readingMinutes = 6,\n  href = \"#\",\n  shareUrl = \"https://geturui.com/journal/fewer-spinners\",\n  saves = 214,\n  saved,\n  defaultSaved = false,\n  onSavedChange,\n  className,\n}: AuthorBlogCardProps) {\n  const reduce = useReducedMotion() ?? false;\n  const [inner, setInner] = React.useState(defaultSaved);\n  const isSaved = saved ?? inner;\n  const count = saves + (isSaved ? 1 : 0) - (defaultSaved ? 1 : 0);\n  const [copied, setCopied] = React.useState(false);\n  const timer = React.useRef<ReturnType<typeof setTimeout> | null>(null);\n  const id = React.useId();\n\n  React.useEffect(() => () => {\n    if (timer.current) clearTimeout(timer.current);\n  }, []);\n\n  function toggleSave() {\n    const next = !isSaved;\n    if (saved === undefined) setInner(next);\n    onSavedChange?.(next);\n  }\n\n  async function copy() {\n    try {\n      await navigator.clipboard?.writeText(shareUrl);\n    } catch {\n      // Clipboard can be blocked; the confirmation still shows so the action feels complete.\n    }\n    setCopied(true);\n    if (timer.current) clearTimeout(timer.current);\n    timer.current = setTimeout(() => setCopied(false), 1800);\n  }\n\n  const date_ = new Date(`${date}T12:00:00Z`).toLocaleDateString(\"en-US\", { month: \"long\", day: \"numeric\", timeZone: \"UTC\" });\n  const iconBtn =\n    \"inline-flex h-9 items-center gap-1.5 rounded-full border border-border-strong px-3 text-[13px] font-medium text-ink outline-none transition-colors hover:bg-surface-hover focus-visible:shadow-[var(--focus-ring)]\";\n\n  return (\n    <article aria-labelledby={`${id}-t`} className={cn(\"w-full max-w-[400px] rounded-xl border border-border bg-surface-raised p-5 shadow-sm\", className)}>\n      <header className=\"flex items-center gap-3\">\n        <span aria-hidden className=\"grid size-11 shrink-0 place-items-center rounded-full bg-ink font-display text-[15px] font-semibold text-bg\">\n          {monogram ?? initialsOf(author)}\n        </span>\n        <div className=\"min-w-0\">\n          <p className=\"truncate text-[14px] font-semibold text-ink\">{author}</p>\n          <p className=\"truncate text-xs text-ink-subtle\">{role}</p>\n        </div>\n      </header>\n\n      <figure className=\"relative mt-5 rounded-lg bg-surface-sunken px-5 pb-5 pt-11\">\n        <Quote aria-hidden className=\"absolute left-5 top-4 size-5 fill-volt-ink/20 text-volt-ink\" />\n        <blockquote className=\"font-display text-[18px] font-medium leading-[1.35] tracking-[-0.3px] text-ink\">{quote}</blockquote>\n      </figure>\n\n      <h3 id={`${id}-t`} className=\"mt-4 text-[15px] font-semibold leading-snug text-ink\">\n        <a href={href} className=\"rounded-xs outline-none decoration-ink/30 underline-offset-4 hover:underline focus-visible:shadow-[var(--focus-ring)]\">\n          {title}\n        </a>\n      </h3>\n      <p className=\"mt-1 text-xs text-ink-subtle\">\n        <time dateTime={date}>{date_}</time> · {readingMinutes} min read\n      </p>\n\n      <div className=\"mt-4 flex items-center gap-2 border-t border-border pt-4\">\n        <motion.button\n          type=\"button\"\n          aria-pressed={isSaved}\n          aria-label={isSaved ? \"Remove from saved\" : \"Save for later\"}\n          onClick={toggleSave}\n          whileTap={reduce ? undefined : { scale: 0.94 }}\n          transition={spring}\n          className={cn(iconBtn, isSaved && \"border-transparent bg-ink text-bg hover:bg-ink\")}\n        >\n          <motion.span key={String(isSaved)} initial={reduce || !isSaved ? false : { scale: 0.4, rotate: -20 }} animate={{ scale: 1, rotate: 0 }} transition={{ type: \"spring\", stiffness: 520, damping: 14 }}>\n            <Bookmark aria-hidden className={cn(\"size-4\", isSaved && \"fill-current\")} />\n          </motion.span>\n          <span className=\"relative inline-flex overflow-hidden tabular-nums\">\n            <AnimatePresence mode=\"popLayout\" initial={false}>\n              <motion.span\n                key={count}\n                initial={reduce ? { opacity: 0 } : { y: isSaved ? 12 : -12, opacity: 0 }}\n                animate={{ y: 0, opacity: 1 }}\n                exit={reduce ? { opacity: 0 } : { y: isSaved ? -12 : 12, opacity: 0 }}\n                transition={spring}\n              >\n                {count.toLocaleString(\"en-US\")}\n              </motion.span>\n            </AnimatePresence>\n          </span>\n        </motion.button>\n\n        <motion.button type=\"button\" onClick={copy} whileTap={reduce ? undefined : { scale: 0.94 }} className={iconBtn}>\n          <AnimatePresence mode=\"popLayout\" initial={false}>\n            <motion.span\n              key={copied ? \"c\" : \"l\"}\n              initial={{ opacity: 0, filter: \"blur(6px)\", y: reduce ? 0 : 6 }}\n              animate={{ opacity: 1, filter: \"blur(0px)\", y: 0 }}\n              exit={{ opacity: 0, filter: \"blur(6px)\", y: reduce ? 0 : -6 }}\n              transition={{ duration: 0.18 }}\n              className=\"inline-flex items-center gap-1.5\"\n            >\n              {copied ? <Check aria-hidden className=\"size-4 text-volt-ink\" strokeWidth={2.5} /> : <Link2 aria-hidden className=\"size-4\" />}\n              {copied ? \"Copied\" : \"Copy link\"}\n            </motion.span>\n          </AnimatePresence>\n        </motion.button>\n        <span role=\"status\" className=\"sr-only\">\n          {copied ? \"Link copied\" : \"\"}\n        </span>\n      </div>\n    </article>\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"}}