{
 "id": "page-header-tabs",
 "name": "Page header with tabs",
 "purpose": "The top of a record page: breadcrumb, title with a favourite star and summary chips, two actions, and an underline tab bar with counts that scrolls on its own when narrow.",
 "use_when": [
  "at the top of a record page with several tabs",
  "a record such as a company, deal or project whose content splits into sections with counts"
 ],
 "avoid_when": [
  "moving between top-level areas of an app: use sidebar-nav",
  "a person's public profile with photos and followers: use profile-hero",
  "a header for a list with filters rather than one record: use filter-bar"
 ],
 "type": "navigation",
 "style": "quiet",
 "width": "wide",
 "tags": {
  "audience": "work",
  "industries": [
   "crm",
   "saas",
   "any"
  ],
  "keywords": [
   "page header",
   "tabs",
   "breadcrumb",
   "record",
   "title"
  ]
 },
 "root": ".odl-page-header-tabs",
 "parts": [
  {
   "name": "breadcrumb",
   "selector": ".odl-crumbs li",
   "what": "the path to this record; the last item is the current page and is hidden on a phone",
   "slot": "list"
  },
  {
   "name": "mark",
   "selector": ".odl-mark",
   "what": "the record's initials in a tile, hidden on a phone",
   "slot": "text"
  },
  {
   "name": "title",
   "selector": "h1",
   "what": "the record's name",
   "slot": "text"
  },
  {
   "name": "star",
   "selector": ".odl-star",
   "what": "a favourite toggle beside the title",
   "slot": "action"
  },
  {
   "name": "summary",
   "selector": ".odl-meta li",
   "what": "one summary chip: an icon or small photo, a label and a bold value",
   "slot": "list"
  },
  {
   "name": "secondary",
   "selector": ".odl-secondary",
   "what": "the quieter action",
   "slot": "action"
  },
  {
   "name": "primary",
   "selector": ".odl-primary",
   "what": "the main action",
   "slot": "action"
  },
  {
   "name": "tabs",
   "selector": "[role=\"tab\"]",
   "what": "one section tab with an icon and an optional count",
   "slot": "list"
  },
  {
   "name": "more",
   "selector": ".odl-more",
   "what": "a More button that appears when some tabs are out of view and scrolls the row",
   "slot": "action"
  }
 ],
 "data": {
  "type": "object",
  "required": [
   "title",
   "tabs"
  ],
  "properties": {
   "breadcrumb": {
    "type": "array",
    "minItems": 1,
    "maxItems": 4,
    "part": "breadcrumb",
    "items": {
     "type": "object",
     "required": [
      "label"
     ],
     "properties": {
      "label": {
       "type": "string",
       "maxLength": 28
      },
      "href": {
       "type": "string",
       "maxLength": 300
      }
     }
    }
   },
   "initials": {
    "type": "string",
    "maxLength": 3,
    "part": "mark"
   },
   "title": {
    "type": "string",
    "maxLength": 48,
    "part": "title"
   },
   "starred": {
    "type": "boolean",
    "part": "star"
   },
   "summary": {
    "type": "array",
    "minItems": 0,
    "maxItems": 4,
    "part": "summary",
    "items": {
     "type": "object",
     "required": [
      "value"
     ],
     "properties": {
      "label": {
       "type": "string",
       "maxLength": 16
      },
      "value": {
       "type": "string",
       "maxLength": 28
      },
      "icon": {
       "type": "string",
       "maxLength": 24
      },
      "photo": {
       "type": "string",
       "maxLength": 300
      }
     }
    }
   },
   "actions": {
    "type": "object",
    "properties": {
     "secondary": {
      "type": "string",
      "maxLength": 18,
      "part": "secondary"
     },
     "primary": {
      "type": "string",
      "maxLength": 18,
      "part": "primary"
     }
    }
   },
   "tabs": {
    "type": "array",
    "minItems": 2,
    "maxItems": 12,
    "part": "tabs",
    "items": {
     "type": "object",
     "required": [
      "label"
     ],
     "properties": {
      "label": {
       "type": "string",
       "maxLength": 16
      },
      "count": {
       "type": "integer"
      },
      "icon": {
       "type": "string",
       "maxLength": 24
      },
      "selected": {
       "type": "boolean"
      }
     }
    }
   }
  }
 },
 "states": {
  "shown": [
   "selected tab",
   "hover",
   "focus",
   "starred",
   "narrow"
  ],
  "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 the record fails to load, keep the breadcrumb and put an alert-banners notice where the title row is"
   },
   "disabled": {
    "status": "not_built",
    "how": "for someone who cannot act on the record, set disabled on the two action buttons and add a :disabled style"
   },
   "overflow": {
    "status": "handled",
    "how": "tabs scroll sideways in their own row, the clipped edge fades, and a More button appears while some are out of view",
    "evidence": "overflow-x: auto; overscroll-behavior-x: contain"
   },
   "long_text": {
    "status": "handled",
    "how": "the title balances its lines and breaks long words; tab and button labels never wrap; summary chips wrap to new lines",
    "evidence": "overflow-wrap: break-word; text-wrap: balance"
   },
   "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-border-width-selected",
  "--ds-color-bg-action-primary",
  "--ds-color-bg-action-primary-hover",
  "--ds-color-bg-action-primary-pressed",
  "--ds-color-bg-neutral-subtle",
  "--ds-color-bg-neutral-subtle-hover",
  "--ds-color-border-default",
  "--ds-color-border-focus",
  "--ds-color-border-subtle",
  "--ds-color-icon-default",
  "--ds-color-icon-subtle",
  "--ds-color-surface-base",
  "--ds-color-surface-raised",
  "--ds-color-text-on-action",
  "--ds-color-text-primary",
  "--ds-color-text-secondary",
  "--ds-color-text-tertiary",
  "--ds-color-text-warning",
  "--ds-focus-ring-offset",
  "--ds-focus-ring-width",
  "--ds-font-weight-heading",
  "--ds-font-weight-label",
  "--ds-icon-stroke-md",
  "--ds-motion-duration-short",
  "--ds-motion-easing-hover",
  "--ds-radius-12",
  "--ds-radius-container",
  "--ds-radius-control",
  "--ds-radius-control-sm",
  "--ds-radius-full",
  "--ds-radius-person",
  "--ds-size-control-lg",
  "--ds-size-control-md",
  "--ds-size-control-sm",
  "--ds-size-icon-md",
  "--ds-size-icon-sm",
  "--ds-size-target-min",
  "--ds-space-2",
  "--ds-space-4",
  "--ds-space-48",
  "--ds-space-inline-md",
  "--ds-space-inline-sm",
  "--ds-space-inline-xs",
  "--ds-space-inset-lg",
  "--ds-space-inset-sm",
  "--ds-space-inset-xl",
  "--ds-space-stack-lg",
  "--ds-space-stack-sm",
  "--ds-space-stack-xs",
  "--ds-text-body-md",
  "--ds-text-headline-sm",
  "--ds-text-label-lg",
  "--ds-text-label-md",
  "--ds-text-label-sm",
  "--ds-text-title-lg"
 ],
 "a11y": {
  "summary": "Breadcrumb is a labelled nav with aria-current; the star is a toggle button with aria-pressed; tabs are a tablist with roving focus (arrow keys, Home, End).",
  "roles": [
   "banner",
   "list",
   "navigation",
   "tab",
   "tablist"
  ],
  "keyboard": [
   "Tab reaches the breadcrumb links, the favourite star, Add to list, Compose email, then the selected tab, then More when it is shown",
   "Enter or Space on the star adds or removes the favourite",
   "In the tab row, Left and Right arrows move to and select the previous or next tab, wrapping at the ends; Home and End go to the first and last tab"
  ],
  "controls": {
   "button": 12,
   "input": 0,
   "link": 2,
   "select": 0,
   "textarea": 0,
   "summary": 0
  },
  "focus_visible": true,
  "reduced_motion": true,
  "min_target": true
 },
 "files": {
  "html": "components/page-header-tabs/component.html",
  "bytes": 20937,
  "script": true
 },
 "source": "brand/showcase/product/03-corvane-record",
 "photos": 1,
 "urls": {
  "html": "https://opendesigner.dev/library/page-header-tabs.html",
  "json": "https://opendesigner.dev/library/page-header-tabs.json",
  "page": "https://opendesigner.dev/library/page-header-tabs/"
 },
 "get": {
  "curl": "curl -fsSLo page-header-tabs.html https://opendesigner.dev/library/page-header-tabs.html",
  "opendesigner": "python3 path/to/skills/opendesigner/scripts/library.py add page-header-tabs --from https://opendesigner.dev",
  "prompt": "Add the OpenDesigner component page-header-tabs to this project: https://opendesigner.dev/library/page-header-tabs.html. Keep its markup and states; map its --ds-* variables to my tokens."
 }
}
