{
 "id": "skeleton-text",
 "name": "Text skeleton",
 "purpose": "An article that shows grey lines of its own shape while it loads, then fills in with no jump: title, byline and paragraphs keep their size.",
 "use_when": [
  "for reading content (an article, a note, a help page) that takes longer than about a second to load",
  "text content loads after the page frame, and the wait is usually over 1 second"
 ],
 "avoid_when": [
  "the wait is under about 300 ms: show nothing",
  "an action the person started (saving, sending): use inline-spinner",
  "a long task with steps: use progress-steps"
 ],
 "type": "states",
 "style": "quiet",
 "width": "medium",
 "tags": {
  "audience": "work",
  "industries": [
   "any"
  ],
  "keywords": [
   "skeleton",
   "loading",
   "placeholder",
   "article",
   "no layout shift"
  ]
 },
 "root": ".odl-skeleton-text",
 "parts": [
  {
   "name": "title",
   "selector": ".odl-skeleton-text [data-od-slot=\"title\"]",
   "what": "the heading: what happened, in plain words, as in “Set up approval rules”",
   "slot": "text"
  },
  {
   "name": "byline",
   "selector": ".odl-skeleton-text [data-od-slot=\"byline\"]",
   "what": "the date and reading time, as in “Updated Nov 10 · 4 minute read”",
   "slot": "text"
  },
  {
   "name": "body",
   "selector": ".odl-skeleton-text [data-od-slot=\"body\"]",
   "what": "the article text, as in “Approval rules decide who signs off on a bill be”",
   "slot": "text"
  }
 ],
 "data": {
  "type": "object",
  "properties": {
   "title": {
    "type": "string",
    "maxLength": 32,
    "part": "title"
   },
   "byline": {
    "type": "string",
    "maxLength": 48,
    "part": "byline"
   },
   "body": {
    "type": "string",
    "maxLength": 240,
    "part": "body"
   }
  },
  "required": [
   "title",
   "byline",
   "body"
  ]
 },
 "states": {
  "shown": [
   "loading",
   "loaded",
   "reduced motion"
  ],
  "edge": {
   "empty": {
    "status": "not_built",
    "how": "When the request returns nothing, replace the bones with an empty state (empty-first-use or empty-no-results)."
   },
   "loading": {
    "status": "shown",
    "how": "aria-busy turns each text run, picture and control into a bone of its own size; nothing moves when data arrives.",
    "evidence": "aria-busy=\"true\""
   },
   "error": {
    "status": "not_built",
    "how": "When the request fails, keep the frame and show an error banner with a retry (page-banners) in place of the rows."
   },
   "disabled": {
    "status": "shown",
    "how": "While loading, the content is inert, so placeholders can't be focused or clicked.",
    "evidence": "inert"
   },
   "overflow": {
    "status": "handled",
    "how": "Single lines end in an ellipsis, so a long value never adds a line or moves the next row.",
    "evidence": "text-overflow: ellipsis"
   },
   "long_text": {
    "status": "handled",
    "how": "Each line is clamped to one line with an ellipsis, so the skeleton and the loaded layout keep one height.",
    "evidence": "text-overflow: ellipsis"
   },
   "missing_image": {
    "status": "none",
    "how": "the part has no photo"
   }
  }
 },
 "tokens": [
  "--ds-border-width-default",
  "--ds-color-bg-action-primary",
  "--ds-color-bg-action-primary-hover",
  "--ds-color-bg-action-primary-pressed",
  "--ds-color-bg-neutral-subtle",
  "--ds-color-border-default",
  "--ds-color-border-focus",
  "--ds-color-border-subtle",
  "--ds-color-surface-raised",
  "--ds-color-text-link",
  "--ds-color-text-on-action",
  "--ds-color-text-primary",
  "--ds-color-text-secondary",
  "--ds-focus-ring-offset",
  "--ds-focus-ring-width",
  "--ds-font-weight-heading",
  "--ds-font-weight-label",
  "--ds-icon-stroke-md",
  "--ds-motion-duration-extra",
  "--ds-motion-duration-short",
  "--ds-motion-easing-linear",
  "--ds-motion-easing-standard",
  "--ds-opacity-disabled-container",
  "--ds-radius-container",
  "--ds-radius-control",
  "--ds-radius-detail",
  "--ds-size-control-md",
  "--ds-size-control-sm",
  "--ds-size-icon-sm",
  "--ds-size-target-min",
  "--ds-space-inline-sm",
  "--ds-space-inset-lg",
  "--ds-space-inset-md",
  "--ds-space-inset-sm",
  "--ds-space-inset-xl",
  "--ds-space-stack-md",
  "--ds-space-stack-sm",
  "--ds-state-skeleton-base",
  "--ds-state-skeleton-highlight",
  "--ds-state-skeleton-pulse",
  "--ds-state-skeleton-radius",
  "--ds-text-body-md",
  "--ds-text-label-lg",
  "--ds-text-label-md",
  "--ds-text-title-lg",
  "--ds-text-title-md"
 ],
 "a11y": {
  "summary": "While loading, the content area is aria-busy and inert, so nobody can tab into placeholders; a polite status says when loading starts and when it is done. Under reduced motion the bones stay still.",
  "roles": [
   "article",
   "status"
  ],
  "keyboard": [
   "Tab reaches Show loaded (the demo toggle), then the loaded content once it's ready; nothing inside is focusable while loading"
  ],
  "controls": {
   "button": 1,
   "input": 0,
   "link": 0,
   "select": 0,
   "textarea": 0,
   "summary": 0
  },
  "focus_visible": true,
  "reduced_motion": true,
  "min_target": true
 },
 "files": {
  "html": "components/skeleton-text/component.html",
  "bytes": 7234,
  "script": true
 },
 "source": null,
 "photos": 0,
 "urls": {
  "html": "https://opendesigner.dev/library/skeleton-text.html",
  "json": "https://opendesigner.dev/library/skeleton-text.json",
  "page": "https://opendesigner.dev/library/skeleton-text/"
 },
 "get": {
  "curl": "curl -fsSLo skeleton-text.html https://opendesigner.dev/library/skeleton-text.html",
  "opendesigner": "python3 path/to/skills/opendesigner/scripts/library.py add skeleton-text --from https://opendesigner.dev",
  "prompt": "Add the OpenDesigner component skeleton-text to this project: https://opendesigner.dev/library/skeleton-text.html. Keep its markup and states; map its --ds-* variables to my tokens."
 }
}
