{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "claim-card",
  "type": "registry:ui",
  "title": "Claim Card",
  "description": "One claim, examined. The card quotes a claim as a reader heard it, gives a short answer, and keeps the evidence one click away in collapsible sections: the facts and their sources, who makes the claim, where the record is contested, what the answer does…",
  "author": "ofri-peretz <https://github.com/ofri-peretz>",
  "categories": [
    "blog",
    "pattern"
  ],
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [
    "https://ds.interlace.tools/r/interlace-base.json",
    "https://ds.interlace.tools/r/cn.json"
  ],
  "files": [
    {
      "path": "registry/interlace-ui/patterns/claim-card.tsx",
      "target": "components/ui/patterns/claim-card.tsx",
      "type": "registry:ui",
      "content": "import * as React from 'react';\n\n// @interlace/claim-card v1.0.0 — Interlace design system.\n// Docs, props and live preview: https://ds.interlace.tools/c/claim-card\n// What changed since: https://ds.interlace.tools/c/claim-card#history\n// Generated banner — keep it, the upgrade diff reads this version.\n\n/**\n * @interlace/ui — ClaimCard\n *\n * One claim, examined. The card quotes a claim as a reader heard it, gives a\n * short answer, and keeps the evidence one click away in collapsible\n * sections: the facts and their sources, who makes the claim, where the\n * record is contested, what the answer does not say, what could not be\n * verified. A status row on top carries review badges; a footer carries\n * whatever the page needs (an id, a date, a share link).\n *\n * Built for fact checks, explainers and FAQs that have to show their work.\n * The parts are slots, so a page decides which sections exist and in what\n * order; nothing here knows what a \"fact\" is.\n *\n * ## Anatomy\n *\n *   ClaimCard                         (article — data-min-viewport=320)\n *     ├─ ClaimCardStatus              (div — a row of Badges)\n *     ├─ ClaimCardClaim               (h3 by default > q — heading face, quoted)\n *     ├─ ClaimCardAnswer              (p — may hold Citation markers)\n *     ├─ ClaimCardSection × n         (details > summary + body)\n *     └─ ClaimCardFooter              (footer — muted, small)\n *\n * ## Server rendering\n *\n * No hooks and no `'use client'`: the sections are native `<details>`, so\n * they open and close with no JavaScript, are keyboard-operable by default,\n * and are found by the browser's find-in-page even while closed.\n *\n * ## MIN_VIEWPORT — 320\n *\n * Text and a single column of sections; the card is as wide as its parent.\n *\n * | Rule | Concept                          | Where in this file                                          |\n * | ---- | -------------------------------- | ----------------------------------------------------------- |\n * | R4   | Extends native el                | `article` / `div` / `h3` / `p` / `details` / `footer` props |\n * | R6   | data-slot per part               | claim-card / -status / -claim / -answer / -section / -footer |\n * | R7   | cn + ...rest                     | `cn(…, className)` + `{...props}` on every part             |\n * | R10  | Composition seam                 | Every part is a slot; sections take any children            |\n * | R14  | Declares min viewport            | `data-min-viewport` on the root + exported const            |\n * | R19  | Tokens only                      | `bg-card`, `border-border`, `text-muted-foreground`         |\n * | R25  | Server component                 | No hooks → no `'use client'`                                |\n * | R26  | A11y from native el              | `<details>`/`<summary>`, `<q>`, heading level via `as`      |\n */\n\nimport { ChevronDown } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\n\nexport const MIN_VIEWPORT = 320 as const;\n\nfunction ClaimCard({ className, ...props }: React.ComponentProps<'article'>) {\n  return (\n    <article\n      data-slot=\"claim-card\"\n      data-min-viewport={String(MIN_VIEWPORT)}\n      className={cn(\n        'bg-card text-card-foreground border-border flex flex-col gap-4 rounded-xl border p-6 shadow-sm',\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nfunction ClaimCardStatus({ className, ...props }: React.ComponentProps<'div'>) {\n  return (\n    <div\n      data-slot=\"claim-card-status\"\n      className={cn('flex flex-wrap items-center gap-2', className)}\n      {...props}\n    />\n  );\n}\n\ntype ClaimCardClaimProps = React.ComponentProps<'h3'> & {\n  /** Heading level, to fit the page outline. @default 'h3' */\n  as?: 'h2' | 'h3' | 'h4';\n};\n\n/** The claim, in quotation marks (`<q>`), set in the heading face (`--font-heading`). */\nfunction ClaimCardClaim({ as: Tag = 'h3', className, children, ...props }: ClaimCardClaimProps) {\n  return (\n    <Tag\n      data-slot=\"claim-card-claim\"\n      className={cn('font-heading text-2xl leading-snug font-semibold text-balance', className)}\n      {...props}\n    >\n      <q>{children}</q>\n    </Tag>\n  );\n}\n\nfunction ClaimCardAnswer({ className, ...props }: React.ComponentProps<'p'>) {\n  return (\n    <p\n      data-slot=\"claim-card-answer\"\n      className={cn('text-base leading-relaxed text-pretty', className)}\n      {...props}\n    />\n  );\n}\n\ntype ClaimCardSectionProps = Omit<React.ComponentProps<'details'>, 'title'> & {\n  /** The summary line: \"Facts and sources\", \"Who says this\". */\n  title: React.ReactNode;\n  /** Shown after the title in muted text, e.g. a count or \"3 of 4 sourced\". */\n  meta?: React.ReactNode;\n};\n\n/**\n * A collapsible section, as native `<details>`. Pass `open` to start it\n * expanded.\n */\nfunction ClaimCardSection({ title, meta, className, children, ...props }: ClaimCardSectionProps) {\n  return (\n    <details\n      data-slot=\"claim-card-section\"\n      className={cn('group border-border border-t pt-3', className)}\n      {...props}\n    >\n      <summary className=\"hover:text-primary flex cursor-pointer list-none items-center gap-2 rounded-sm py-1 font-medium [&::-webkit-details-marker]:hidden\">\n        <ChevronDown\n          aria-hidden=\"true\"\n          className=\"text-muted-foreground size-4 shrink-0 -rotate-90 transition-transform group-open:rotate-0 motion-reduce:transition-none\"\n        />\n        <span>{title}</span>\n        {meta != null ? <span className=\"text-muted-foreground font-normal\">({meta})</span> : null}\n      </summary>\n      <div data-slot=\"claim-card-section-body\" className=\"space-y-3 pt-3 pb-1 ps-6 text-sm\">\n        {children}\n      </div>\n    </details>\n  );\n}\n\nfunction ClaimCardFooter({ className, ...props }: React.ComponentProps<'footer'>) {\n  return (\n    <footer\n      data-slot=\"claim-card-footer\"\n      className={cn('text-muted-foreground border-border border-t pt-3 text-sm', className)}\n      {...props}\n    />\n  );\n}\n\nconst ClaimCardWithDot = Object.assign(ClaimCard, {\n  Status: ClaimCardStatus,\n  Claim: ClaimCardClaim,\n  Answer: ClaimCardAnswer,\n  Section: ClaimCardSection,\n  Footer: ClaimCardFooter,\n});\n\nexport {\n  ClaimCardWithDot as ClaimCard,\n  ClaimCardStatus,\n  ClaimCardClaim,\n  ClaimCardAnswer,\n  ClaimCardSection,\n  ClaimCardFooter,\n};\nexport type { ClaimCardClaimProps, ClaimCardSectionProps };\n"
    }
  ],
  "meta": {
    "tier": "pattern",
    "client": false,
    "minViewport": 320,
    "loading": false,
    "version": "1.0.0",
    "since": null
  },
  "docs": "## @interlace/claim-card\n\nInstalled to `components/ui/patterns/claim-card.tsx`.\n\n```tsx\nimport { /* … */ } from '@/components/ui/patterns/claim-card';\n```\n\nProps, a11y contract, live preview and source: https://ds.interlace.tools/c/claim-card\n\nRequires the `@interlace/interlace-base` CSS baseline (installed automatically as a registry dependency). For the Interlace look, also add `@interlace/theme`."
}
