{
 "id": "article-card",
 "name": "Article card",
 "purpose": "A card for one article or changelog post: a cover photo, the category and reading time, a headline, a two-line summary, the author's photo, name and date, and a button to save it.",
 "use_when": [
  "on a blog, changelog or help centre index",
  "a featured post at the top of a list, where the wide layout puts the photo beside the text"
 ],
 "avoid_when": [
  "a post in a social feed with likes and replies: use social-post",
  "a product with a price to buy: use product-card",
  "an episode or video to play: use podcast-episodes or media-shelf"
 ],
 "type": "content",
 "style": "editorial",
 "width": "narrow",
 "tags": {
  "audience": "consumer",
  "industries": [
   "any"
  ],
  "keywords": [
   "article",
   "blog",
   "changelog",
   "post",
   "card"
  ]
 },
 "root": ".odl-article-card",
 "parts": [
  {
   "name": "cover",
   "selector": ".odl-cover",
   "what": "the cover photo, 16:9 when narrow, beside the text when wide",
   "slot": "media"
  },
  {
   "name": "kicker",
   "selector": ".odl-kicker",
   "what": "the category in bold, then the reading time",
   "slot": "text"
  },
  {
   "name": "headline",
   "selector": ".odl-link",
   "what": "the headline, the card's one link",
   "slot": "text"
  },
  {
   "name": "summary",
   "selector": ".odl-dek",
   "what": "one or two sentences on what the post says",
   "slot": "text"
  },
  {
   "name": "avatar",
   "selector": ".odl-avatar",
   "what": "the author's photo, decorative",
   "slot": "media"
  },
  {
   "name": "byline",
   "selector": ".odl-byline",
   "what": "the author's name and the date",
   "slot": "text"
  },
  {
   "name": "save",
   "selector": ".odl-save",
   "what": "a Save toggle that reads Saved when on",
   "slot": "action"
  }
 ],
 "data": {
  "type": "object",
  "required": [
   "headline",
   "href"
  ],
  "properties": {
   "cover": {
    "type": "object",
    "required": [
     "src",
     "alt"
    ],
    "part": "cover",
    "properties": {
     "src": {
      "type": "string",
      "maxLength": 400
     },
     "alt": {
      "type": "string",
      "maxLength": 120
     }
    }
   },
   "category": {
    "type": "string",
    "maxLength": 18,
    "part": "kicker"
   },
   "read_time": {
    "type": "string",
    "maxLength": 14,
    "part": "kicker"
   },
   "headline": {
    "type": "string",
    "maxLength": 80,
    "part": "headline"
   },
   "href": {
    "type": "string",
    "maxLength": 400,
    "part": "headline"
   },
   "summary": {
    "type": "string",
    "maxLength": 160,
    "part": "summary"
   },
   "author": {
    "type": "object",
    "required": [
     "name"
    ],
    "properties": {
     "name": {
      "type": "string",
      "maxLength": 32,
      "part": "byline"
     },
     "photo": {
      "type": "string",
      "maxLength": 400,
      "part": "avatar"
     }
    }
   },
   "date": {
    "type": "string",
    "maxLength": 14,
    "part": "byline"
   },
   "date_iso": {
    "type": "string",
    "maxLength": 10,
    "part": "byline"
   },
   "saved": {
    "type": "boolean",
    "part": "save"
   },
   "author_photo": {
    "type": "object",
    "required": [
     "src",
     "alt"
    ],
    "properties": {
     "src": {
      "type": "string",
      "maxLength": 2048
     },
     "alt": {
      "type": "string",
      "maxLength": 200
     }
    }
   }
  }
 },
 "states": {
  "shown": [
   "hover",
   "focus",
   "saved",
   "not saved"
  ],
  "edge": {
   "empty": {
    "status": "not_built",
    "how": "with no posts to list, show empty-state in place of the cards"
   },
   "loading": {
    "status": "handled",
    "evidence": "data-od-slot",
    "how": "the Smart UI renderer draws each marked slot as a quiet block of its size while the data arrives; the static file shows the filled part"
   },
   "error": {
    "status": "not_built",
    "how": "if saving fails, set the Save button back to not pressed and say so with toast-stack"
   },
   "disabled": {
    "status": "not_built",
    "how": "set disabled on the Save button when the reader cannot save, for example when signed out"
   },
   "overflow": {
    "status": "handled",
    "how": "in a wide box the cover moves beside the text and fills the card's height",
    "evidence": "@container (min-width: 34rem)"
   },
   "long_text": {
    "status": "handled",
    "how": "a long author name ends in an ellipsis; the headline and summary wrap with no line limit",
    "evidence": "text-overflow: ellipsis"
   },
   "missing_image": {
    "status": "handled",
    "evidence": "data-od-media",
    "how": "the Smart UI renderer swaps a photo that fails to load for a block of the same size with its alt text"
   }
  }
 },
 "tokens": [
  "--ds-border-width-default",
  "--ds-color-bg-accent-subtle",
  "--ds-color-bg-neutral-subtle",
  "--ds-color-border-accent",
  "--ds-color-border-default",
  "--ds-color-border-focus",
  "--ds-color-border-subtle",
  "--ds-color-surface-raised",
  "--ds-color-surface-sunken",
  "--ds-color-text-accent",
  "--ds-color-text-primary",
  "--ds-color-text-secondary",
  "--ds-color-text-tertiary",
  "--ds-elevation-floating",
  "--ds-elevation-raised",
  "--ds-focus-ring-offset",
  "--ds-focus-ring-width",
  "--ds-font-weight-label",
  "--ds-icon-stroke-md",
  "--ds-motion-duration-short",
  "--ds-motion-easing-standard",
  "--ds-radius-container",
  "--ds-radius-control",
  "--ds-radius-person",
  "--ds-size-control-md",
  "--ds-size-icon-sm",
  "--ds-size-target-min",
  "--ds-space-2",
  "--ds-space-4",
  "--ds-space-inline-md",
  "--ds-space-inline-sm",
  "--ds-space-inset-lg",
  "--ds-space-inset-sm",
  "--ds-space-inset-xl",
  "--ds-space-stack-md",
  "--ds-space-stack-sm",
  "--ds-text-body-md",
  "--ds-text-body-sm",
  "--ds-text-label-lg",
  "--ds-text-label-md",
  "--ds-text-label-md-tracking",
  "--ds-text-title-lg"
 ],
 "a11y": {
  "summary": "The headline is the one link and its click area covers the card; Save sits above it as a separate toggle button with aria-pressed; the cover has alt text and the author photo is decorative because the name sits beside it.",
  "roles": [
   "article",
   "contentinfo"
  ],
  "keyboard": [
   "Tab reaches the headline link, then Save",
   "Enter on the headline follows the link; the whole card shows the focus ring",
   "Enter or Space on Save switches it between Save and Saved"
  ],
  "controls": {
   "button": 1,
   "input": 0,
   "link": 1,
   "select": 0,
   "textarea": 0,
   "summary": 0
  },
  "focus_visible": true,
  "reduced_motion": true,
  "min_target": true
 },
 "files": {
  "html": "components/article-card/component.html",
  "bytes": 7685,
  "script": true
 },
 "source": null,
 "photos": 2,
 "urls": {
  "html": "https://opendesigner.dev/library/article-card.html",
  "json": "https://opendesigner.dev/library/article-card.json",
  "page": "https://opendesigner.dev/library/article-card/"
 },
 "get": {
  "curl": "curl -fsSLo article-card.html https://opendesigner.dev/library/article-card.html",
  "opendesigner": "python3 path/to/skills/opendesigner/scripts/library.py add article-card --from https://opendesigner.dev",
  "prompt": "Add the OpenDesigner component article-card to this project: https://opendesigner.dev/library/article-card.html. Keep its markup and states; map its --ds-* variables to my tokens."
 }
}
