{
 "id": "kpi-strip",
 "name": "Stat strip",
 "purpose": "Four headline numbers in one band, each with a plain note under it, and a small bar where a share matters.",
 "use_when": [
  "at the top of a dashboard, for its headline numbers",
  "a report or account page that opens with two to four totals before the detail"
 ],
 "avoid_when": [
  "one number tracked against a limit or goal: use budget-meters or savings-goal",
  "numbers over time: use bar-chart",
  "a share of a whole split into parts: use donut-breakdown"
 ],
 "type": "data",
 "style": "quiet",
 "width": "wide",
 "tags": {
  "audience": "work",
  "industries": [
   "finance",
   "saas",
   "any"
  ],
  "keywords": [
   "kpi",
   "stats",
   "summary",
   "dashboard",
   "metrics"
  ]
 },
 "root": ".odl-kpi-strip",
 "parts": [
  {
   "name": "stats",
   "selector": "dl > div",
   "what": "one headline number: label, value and a note",
   "slot": "list"
  },
  {
   "name": "label",
   "selector": "dt",
   "what": "what the number measures",
   "slot": "text"
  },
  {
   "name": "value",
   "selector": ".odl-value",
   "what": "the number, with cents set lighter",
   "slot": "number"
  },
  {
   "name": "note",
   "selector": ".odl-note",
   "what": "one plain line of context, sometimes with a warning word",
   "slot": "rich"
  },
  {
   "name": "meter",
   "selector": ".odl-meter",
   "what": "a small bar for a share, with the share in words beside it",
   "slot": "number"
  }
 ],
 "data": {
  "type": "object",
  "required": [
   "stats"
  ],
  "properties": {
   "label": {
    "type": "string",
    "maxLength": 40
   },
   "stats": {
    "type": "array",
    "minItems": 2,
    "maxItems": 4,
    "part": "stats",
    "items": {
     "type": "object",
     "required": [
      "label",
      "value"
     ],
     "properties": {
      "label": {
       "type": "string",
       "maxLength": 24,
       "part": "label"
      },
      "value": {
       "type": "string",
       "maxLength": 14,
       "part": "value"
      },
      "note": {
       "type": "string",
       "maxLength": 44,
       "part": "note"
      },
      "warning": {
       "type": "string",
       "maxLength": 16,
       "part": "note"
      },
      "share": {
       "type": "number",
       "minimum": 0,
       "maximum": 100,
       "part": "meter"
      }
     }
    }
   }
  }
 },
 "states": {
  "shown": [
   "warning note",
   "progress",
   "wraps to two or one column"
  ],
  "edge": {
   "empty": {
    "status": "handled",
    "evidence": "data-od-list",
    "how": "the Smart UI renderer puts one plain 'Nothing to show yet.' line in an empty list"
   },
   "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 a number cannot load, show a dash and put the reason in the note with the warning colour"
   },
   "disabled": {
    "status": "not_built",
    "how": "the strip has no controls, so there is no disabled state"
   },
   "overflow": {
    "status": "handled",
    "how": "two columns by default, four when the box is wide, and smaller figures on a phone",
    "evidence": "@container (min-width: 50rem)"
   },
   "long_text": {
    "status": "handled",
    "how": "values never wrap, so keep them short; labels and notes wrap in their cell",
    "evidence": ".odl-value { font: var(--ds-text-title-lg); font-variant-numeric: tabular-nums; white-space: nowrap; }"
   },
   "missing_image": {
    "status": "none",
    "how": "the part has no photo"
   }
  }
 },
 "tokens": [
  "--ds-border-width-default",
  "--ds-color-bg-inverse",
  "--ds-color-bg-neutral-subtle",
  "--ds-color-border-subtle",
  "--ds-color-surface-raised",
  "--ds-color-text-primary",
  "--ds-color-text-secondary",
  "--ds-color-text-tertiary",
  "--ds-color-text-warning",
  "--ds-elevation-raised",
  "--ds-radius-container",
  "--ds-radius-full",
  "--ds-space-6",
  "--ds-space-inline-sm",
  "--ds-space-inset-lg",
  "--ds-space-inset-xl",
  "--ds-space-stack-sm",
  "--ds-space-stack-xs",
  "--ds-text-body-md",
  "--ds-text-label-lg",
  "--ds-text-label-md",
  "--ds-text-title-lg",
  "--ds-text-title-sm"
 ],
 "a11y": {
  "summary": "A description list, so each number is read with its label; the bar is decorative and its value is in the text.",
  "roles": [],
  "keyboard": [],
  "controls": {
   "button": 0,
   "input": 0,
   "link": 0,
   "select": 0,
   "textarea": 0,
   "summary": 0
  },
  "focus_visible": false,
  "reduced_motion": false,
  "min_target": false
 },
 "files": {
  "html": "components/kpi-strip/component.html",
  "bytes": 3676,
  "script": false
 },
 "source": "brand/showcase/product/01-quoin-payments",
 "photos": 0,
 "urls": {
  "html": "https://opendesigner.dev/library/kpi-strip.html",
  "json": "https://opendesigner.dev/library/kpi-strip.json",
  "page": "https://opendesigner.dev/library/kpi-strip/"
 },
 "get": {
  "curl": "curl -fsSLo kpi-strip.html https://opendesigner.dev/library/kpi-strip.html",
  "opendesigner": "python3 path/to/skills/opendesigner/scripts/library.py add kpi-strip --from https://opendesigner.dev",
  "prompt": "Add the OpenDesigner component kpi-strip to this project: https://opendesigner.dev/library/kpi-strip.html. Keep its markup and states; map its --ds-* variables to my tokens."
 }
}
