{
  "$schema": "https://next.0build.dev/schema/component.v1.json",
  "accessibility": {
    "aria": [
      {
        "attributes": [],
        "description": "Toolbar action group; no static ARIA attributes.",
        "part": "actions"
      },
      {
        "attributes": [],
        "description": "Caption text; no static ARIA attributes.",
        "part": "caption"
      },
      {
        "attributes": [
          {
            "name": "aria-label",
            "value": "${closeLabel}"
          }
        ],
        "description": "Close button labeled by the close i18n text.",
        "part": "close"
      },
      {
        "attributes": [
          {
            "name": "aria-live",
            "value": "polite"
          }
        ],
        "description": "Item counter with `aria-live=\"polite\"`.",
        "part": "counter"
      },
      {
        "attributes": [
          {
            "name": "role",
            "value": "tablist"
          }
        ],
        "description": "Dot navigation with `role=\"tablist\"`.",
        "part": "dotnav"
      },
      {
        "attributes": [],
        "description": "Bottom chrome; no static ARIA attributes.",
        "part": "footer"
      },
      {
        "attributes": [],
        "description": "Slide deck; no static ARIA attributes (slides are labeled individually).",
        "part": "items"
      },
      {
        "attributes": [
          {
            "name": "aria-disabled",
            "value": "${atLast ? 'true' : 'false'}"
          },
          {
            "name": "aria-label",
            "value": "${nextLabel}"
          }
        ],
        "description": "Next arrow labeled by the next i18n text; `aria-disabled` at the last item when `finite`.",
        "part": "next"
      },
      {
        "attributes": [
          {
            "name": "aria-label",
            "value": "${this.ariaLabelText || 'Media viewer'}"
          },
          {
            "name": "aria-modal",
            "value": "true"
          },
          {
            "name": "role",
            "value": "dialog"
          }
        ],
        "description": "Viewer overlay: `role=\"dialog\"`, `aria-modal=\"true\"`, labeled by `aria-label` (default `Media viewer`).",
        "part": "overlay"
      },
      {
        "attributes": [
          {
            "name": "aria-disabled",
            "value": "${atFirst ? 'true' : 'false'}"
          },
          {
            "name": "aria-label",
            "value": "${prevLabel}"
          }
        ],
        "description": "Previous arrow labeled by the previous i18n text; `aria-disabled` at the first item when `finite`.",
        "part": "prev"
      },
      {
        "attributes": [
          {
            "name": "role",
            "value": "tablist"
          }
        ],
        "description": "Thumbnail navigation with `role=\"tablist\"`.",
        "part": "thumbnav"
      },
      {
        "attributes": [],
        "description": "Top toolbar; no static ARIA attributes.",
        "part": "toolbar"
      },
      {
        "attributes": [
          {
            "name": "aria-label",
            "value": "${zoomLabel}"
          },
          {
            "name": "aria-pressed",
            "value": "${this.isZoomed ? 'true' : 'false'}"
          }
        ],
        "description": "Zoom toggle labeled by the zoomIn/zoomOut i18n text; `aria-pressed` reflects the zoom state.",
        "part": "zoom"
      }
    ],
    "notes": [
      "Triggers are kept button-accessible and linked to the viewer; slides are labeled with the `slideLabel` template.",
      "The viewer renders into a portal appended to `document.body`; the host stays in place as the trigger container."
    ]
  },
  "attributes": [
    {
      "default": "'a[href]'",
      "description": "Selector for trigger elements inside the host (default `a[href]`); each match becomes one lightbox item.",
      "from": null,
      "name": "target",
      "property": "target",
      "reflect": false,
      "tokens": null,
      "type": "string",
      "values": null
    },
    {
      "default": "0",
      "description": "Index of the item shown when opening; setting it while open navigates to that item.",
      "from": null,
      "name": "active",
      "property": "active",
      "reflect": false,
      "tokens": null,
      "type": "number",
      "values": null
    },
    {
      "default": "'slide'",
      "description": "Item transition: `slide` (default), `fade`, or `scale`.",
      "from": null,
      "name": "animation",
      "property": "animation",
      "reflect": false,
      "tokens": null,
      "type": "'slide' | 'fade' | 'scale'",
      "values": [
        "slide",
        "fade",
        "scale"
      ]
    },
    {
      "default": "false",
      "description": "Stops at the first/last item instead of wrapping.",
      "from": null,
      "name": "finite",
      "property": "finite",
      "reflect": false,
      "tokens": null,
      "type": "boolean",
      "values": null
    },
    {
      "default": "false",
      "description": "Hides the `current / total` counter.",
      "from": null,
      "name": "no-counter",
      "property": "no-counter",
      "reflect": false,
      "tokens": null,
      "type": "boolean",
      "values": null
    },
    {
      "default": "'dotnav'",
      "description": "Navigation style: `dotnav` (default), `thumbnav`, or `none`/`false`/empty to hide it.",
      "from": null,
      "name": "nav",
      "property": "nav",
      "reflect": false,
      "tokens": null,
      "type": "'' | 'dotnav' | 'thumbnav' | 'none' | 'false'",
      "values": [
        "",
        "dotnav",
        "thumbnav",
        "none",
        "false"
      ]
    },
    {
      "default": "false",
      "description": "Hides the previous/next arrow buttons.",
      "from": null,
      "name": "no-slidenav",
      "property": "no-slidenav",
      "reflect": false,
      "tokens": null,
      "type": "boolean",
      "values": null
    },
    {
      "default": "false",
      "description": "Disables the zoom toggle for images.",
      "from": null,
      "name": "no-zoom",
      "property": "no-zoom",
      "reflect": false,
      "tokens": null,
      "type": "boolean",
      "values": null
    },
    {
      "default": "false",
      "description": "Disables swipe navigation between items.",
      "from": null,
      "name": "no-swipe",
      "property": "no-swipe",
      "reflect": false,
      "tokens": null,
      "type": "boolean",
      "values": null
    },
    {
      "default": "3000",
      "description": "Milliseconds of inactivity before the toolbar/chrome auto-hides (default 3000); pointer movement reveals it again.",
      "from": null,
      "name": "delay-controls",
      "property": "delay-controls",
      "reflect": false,
      "tokens": null,
      "type": "number",
      "values": null
    },
    {
      "default": "1",
      "description": "Number of neighboring items to preload on each side of the active item (default 1).",
      "from": null,
      "name": "preload",
      "property": "preload",
      "reflect": false,
      "tokens": null,
      "type": "number",
      "values": null
    },
    {
      "default": "false",
      "description": "Autoplays video items when shown.",
      "from": null,
      "name": "video-autoplay",
      "property": "video-autoplay",
      "reflect": false,
      "tokens": null,
      "type": "boolean",
      "values": null
    },
    {
      "default": "280",
      "description": "Item transition duration in milliseconds (default 280).",
      "from": null,
      "name": "duration",
      "property": "duration",
      "reflect": false,
      "tokens": null,
      "type": "number",
      "values": null
    },
    {
      "default": "'Media viewer'",
      "description": "Accessible name of the viewer overlay (default `Media viewer`).",
      "from": null,
      "name": "aria-label",
      "property": "ariaLabelText",
      "reflect": false,
      "tokens": null,
      "type": "string",
      "values": null
    },
    {
      "default": "false",
      "description": "Opens the dialog on first render and stays in sync with `show()` and `hide()`.",
      "from": "DialogMixin",
      "name": "open",
      "property": "open",
      "reflect": true,
      "tokens": null,
      "type": "boolean",
      "values": null
    },
    {
      "default": "false",
      "description": "Vertically centers the panel within the overlay.",
      "from": "DialogMixin",
      "name": "center",
      "property": "center",
      "reflect": false,
      "tokens": null,
      "type": "boolean",
      "values": null
    },
    {
      "default": "false",
      "description": "Adds `z-modal-container` to the overlay for a contained presentation.",
      "from": "DialogMixin",
      "name": "container",
      "property": "container",
      "reflect": false,
      "tokens": null,
      "type": "boolean",
      "values": null
    },
    {
      "default": "false",
      "description": "Adds `z-modal-full` to the overlay for a full-screen presentation.",
      "from": "DialogMixin",
      "name": "full",
      "property": "full",
      "reflect": false,
      "tokens": null,
      "type": "boolean",
      "values": null
    },
    {
      "default": "false",
      "description": "Keeps other open dialogs open; without it, showing this dialog hides them. Stacked overlays receive increasing z-index.",
      "from": "DialogMixin",
      "name": "stack",
      "property": "stack",
      "reflect": false,
      "tokens": null,
      "type": "boolean",
      "values": null
    },
    {
      "default": "false",
      "description": "Keeps the component in its original DOM position instead of teleporting it to `document.body`.",
      "from": "DialogMixin",
      "name": "inline",
      "property": "inline",
      "reflect": false,
      "tokens": null,
      "type": "boolean",
      "values": null
    },
    {
      "default": "false",
      "description": "Disables closing when the overlay background is clicked.",
      "from": "DialogMixin",
      "name": "no-bg-close",
      "property": "no-bg-close",
      "reflect": false,
      "tokens": null,
      "type": "boolean",
      "values": null
    },
    {
      "default": "false",
      "description": "Disables closing with the Esc key.",
      "from": "DialogMixin",
      "name": "no-esc-close",
      "property": "no-esc-close",
      "reflect": false,
      "tokens": null,
      "type": "boolean",
      "values": null
    },
    {
      "default": "false",
      "description": "Removes the rendered DOM after the close transition; the next show mounts it again.",
      "from": "DialogMixin",
      "name": "unmount",
      "property": "unmount",
      "reflect": false,
      "tokens": null,
      "type": "boolean",
      "values": null
    },
    {
      "default": "'dialog'",
      "description": "ARIA role of the panel: `dialog` or `alertdialog`.",
      "from": "DialogMixin",
      "name": "dialog-role",
      "property": "dialogRole",
      "reflect": false,
      "tokens": null,
      "type": "'dialog' | 'alertdialog'",
      "values": [
        "dialog",
        "alertdialog"
      ]
    },
    {
      "default": "''",
      "description": "Id of the element that names the panel; takes precedence over `aria-label`.",
      "from": "DialogMixin",
      "name": "aria-labelledby",
      "property": "ariaLabelledbyText",
      "reflect": false,
      "tokens": null,
      "type": "string",
      "values": null
    },
    {
      "default": "''",
      "description": "Per-instance text overrides as `key: text` pairs, merged over the global `z-i18n` script and the built-in defaults.",
      "from": "Hwc",
      "name": "i18n",
      "property": "i18n",
      "reflect": false,
      "tokens": null,
      "type": "string",
      "values": null
    },
    {
      "default": "''",
      "description": "Floating UI placement options (for example `offset` and `shiftPadding`) parsed as `key: value` pairs.",
      "from": "Hwc",
      "name": "floating",
      "property": "floating",
      "reflect": false,
      "tokens": null,
      "type": "string",
      "values": null
    },
    {
      "default": "false",
      "description": "Skips re-rendering after the first render; an existing `data-host-inner` child is adopted as the rendered DOM.",
      "from": "Hwc",
      "name": "force-prevent-rerender",
      "property": "force-prevent-rerender",
      "reflect": false,
      "tokens": null,
      "type": "boolean",
      "values": null
    },
    {
      "default": "''",
      "description": "Selector or id of an external element or `<template>` whose inner content is cloned in place of an inline `template[data-fn=\"template\"]` child.",
      "from": "Hwc",
      "name": "template",
      "property": "template",
      "reflect": false,
      "tokens": null,
      "type": "string",
      "values": null
    },
    {
      "default": "''",
      "description": "Adds classes to named parts as `key: classes` pairs; a plain string targets the default part.",
      "from": "Base",
      "name": "cls",
      "property": "cls",
      "reflect": false,
      "tokens": null,
      "type": "string",
      "values": null
    },
    {
      "default": "''",
      "description": "Adds inline styles to named parts as `key: styles` pairs; a plain string targets the default part.",
      "from": "Base",
      "name": "stl",
      "property": "stl",
      "reflect": false,
      "tokens": null,
      "type": "string",
      "values": null
    }
  ],
  "category": "overlays",
  "children": [
    {
      "attributes": [
        {
          "description": "Marks the script as configuration (value: `config`).",
          "name": "data-fn",
          "required": true,
          "values": [
            "config"
          ]
        },
        {
          "description": "Re-parses the configuration when the script mutates.",
          "name": "data-reactive",
          "required": false,
          "type": "boolean"
        }
      ],
      "description": "JSON configuration script parsed by the base class (i18n, cls, stl, floating).",
      "element": "script",
      "id": "config",
      "required": false,
      "selector": "script[data-fn=\"config\"][type=\"application/json\"]"
    },
    {
      "attributes": [
        {
          "description": "Marks the select as the data source (value: `data-source`).",
          "name": "data-fn",
          "required": true,
          "values": [
            "data-source"
          ]
        },
        {
          "description": "Re-parses the options when the select mutates.",
          "name": "data-reactive",
          "required": false,
          "type": "boolean"
        }
      ],
      "children": [
        {
          "attributes": [
            {
              "description": "Group header text; also the default group key.",
              "name": "label",
              "required": true,
              "type": "string"
            },
            {
              "description": "Disables every option in the group.",
              "name": "disabled",
              "required": false,
              "type": "boolean"
            },
            {
              "description": "Overrides the group key used in the parsed data.",
              "name": "data-key",
              "required": false,
              "type": "string"
            },
            {
              "description": "Comma-separated keywords stored with the group's data.",
              "name": "data-keywords",
              "required": false,
              "type": "comma-separated string"
            }
          ],
          "children": [
            {
              "attributes": [
                {
                  "description": "Value carried by this option in the parsed data.",
                  "name": "value",
                  "required": false,
                  "type": "string"
                },
                {
                  "description": "Makes the option non-selectable.",
                  "name": "disabled",
                  "required": false,
                  "type": "boolean"
                },
                {
                  "description": "Marks the option as initially selected.",
                  "name": "selected",
                  "required": false,
                  "type": "boolean"
                },
                {
                  "description": "Extra search terms, comma-separated; searched alongside the label and value.",
                  "name": "data-keywords",
                  "required": false,
                  "type": "comma-separated string"
                }
              ],
              "description": "One option entry within the group.",
              "element": "option",
              "repeatable": true
            }
          ],
          "description": "Groups options under a label.",
          "element": "optgroup",
          "repeatable": true
        },
        {
          "attributes": [
            {
              "description": "Value carried by this option in the parsed data.",
              "name": "value",
              "required": false,
              "type": "string"
            },
            {
              "description": "Makes the option non-selectable.",
              "name": "disabled",
              "required": false,
              "type": "boolean"
            },
            {
              "description": "Marks the option as initially selected.",
              "name": "selected",
              "required": false,
              "type": "boolean"
            },
            {
              "description": "Extra search terms, comma-separated.",
              "name": "data-keywords",
              "required": false,
              "type": "comma-separated string"
            }
          ],
          "description": "One ungrouped option entry.",
          "element": "option",
          "repeatable": true
        }
      ],
      "description": "Hidden select parsed into grouped option data by the base class.",
      "element": "select",
      "id": "data-source",
      "required": false,
      "selector": "select[data-fn=\"data-source\"]"
    },
    {
      "attributes": [
        {
          "description": "Marks the template as an icon source (value: `icons`).",
          "name": "data-fn",
          "required": true,
          "values": [
            "icons"
          ]
        },
        {
          "description": "Re-parses the icons when the template mutates.",
          "name": "data-reactive",
          "required": false,
          "type": "boolean"
        }
      ],
      "children": [
        {
          "attributes": [
            {
              "description": "Icon key referenced by `$icons`.",
              "name": "data-key",
              "required": true,
              "type": "string"
            }
          ],
          "description": "One icon element.",
          "element": "*",
          "repeatable": true
        }
      ],
      "description": "Instance-level icon repository.",
      "element": "template",
      "id": "icons",
      "required": false,
      "selector": "template[data-fn=\"icons\"]"
    },
    {
      "attributes": [
        {
          "description": "Marks the template for deferred mounting (value: `template`).",
          "name": "data-fn",
          "required": true,
          "values": [
            "template"
          ]
        },
        {
          "description": "Re-parses the template when it mutates.",
          "name": "data-reactive",
          "required": false,
          "type": "boolean"
        }
      ],
      "description": "Deferred content template mounted by the base class.",
      "element": "template",
      "id": "template",
      "required": false,
      "selector": "template[data-fn=\"template\"]"
    }
  ],
  "cssClasses": [
    {
      "appliesTo": "z-lightbox",
      "class": ".z-lightbox",
      "description": "Overlay root: fixed, dimmed, blurred viewer.",
      "role": "root"
    },
    {
      "appliesTo": ".z-lightbox",
      "class": ".z-lightbox-caption",
      "description": "Caption text styling.",
      "role": "state"
    },
    {
      "appliesTo": ".z-lightbox",
      "class": ".z-lightbox-chrome",
      "description": "Shared chrome class faded out when controls auto-hide.",
      "role": "element"
    },
    {
      "appliesTo": ".z-lightbox",
      "class": ".z-lightbox-controls-hidden",
      "description": "State class while the chrome is hidden.",
      "role": "element"
    },
    {
      "appliesTo": ".z-lightbox",
      "class": ".z-lightbox-counter",
      "description": "The item counter.",
      "role": "state"
    },
    {
      "appliesTo": ".z-lightbox",
      "class": ".z-lightbox-dotnav",
      "description": "Dot navigation list.",
      "role": "element"
    },
    {
      "appliesTo": ".z-lightbox",
      "class": ".z-lightbox-footer",
      "description": "Bottom chrome holding the caption.",
      "role": "element"
    },
    {
      "appliesTo": ".z-lightbox",
      "class": ".z-lightbox-iframe",
      "description": "Sizing frame for iframe/embed items.",
      "role": "element"
    },
    {
      "appliesTo": ".z-lightbox",
      "class": ".z-lightbox-items",
      "description": "The deck holding the item slides.",
      "role": "state"
    },
    {
      "appliesTo": ".z-lightbox",
      "class": ".z-lightbox-items-fit",
      "description": "Fit mode sizing the deck to the media.",
      "role": "modifier"
    },
    {
      "appliesTo": ".z-lightbox",
      "class": ".z-lightbox-loader",
      "description": "Loading indicator shown while media loads.",
      "role": "element"
    },
    {
      "appliesTo": ".z-lightbox",
      "class": ".z-lightbox-page",
      "description": "Page root class clipping scroll while the viewer is open.",
      "role": "element"
    },
    {
      "appliesTo": ".z-lightbox",
      "class": ".z-lightbox-slidenav",
      "description": "Previous/next arrow buttons.",
      "role": "element"
    },
    {
      "appliesTo": ".z-lightbox",
      "class": ".z-lightbox-thumbnav",
      "description": "Thumbnail navigation list.",
      "role": "element"
    },
    {
      "appliesTo": ".z-lightbox",
      "class": ".z-lightbox-thumbnav-vertical",
      "description": "Vertical thumbnail navigation.",
      "role": "element"
    },
    {
      "appliesTo": ".z-lightbox",
      "class": ".z-lightbox-toolbar",
      "description": "Top toolbar chrome.",
      "role": "element"
    },
    {
      "appliesTo": ".z-lightbox",
      "class": ".z-lightbox-toolbar-actions",
      "description": "Toolbar action group.",
      "role": "state"
    },
    {
      "appliesTo": ".z-lightbox",
      "class": ".z-lightbox-zoom",
      "description": "Zoom affordance styling.",
      "role": "modifier"
    },
    {
      "appliesTo": ".z-lightbox",
      "class": ".z-lightbox-zoomed",
      "description": "State class while an image is zoomed.",
      "role": "element"
    }
  ],
  "cssVars": [
    {
      "affects": [
        "background-color"
      ],
      "default": "var(--z-bg)",
      "description": "Overlay base color, mixed with transparency using `--z-lightbox-bg-o`.",
      "file": "src/css/kit-components/lightbox.css",
      "kind": "base",
      "name": "--z-lightbox-bg",
      "scope": ".z-lightbox",
      "syntax": "<color>"
    },
    {
      "affects": [
        "background-color"
      ],
      "default": "95%",
      "description": "Overlay opacity percentage used in the background mix.",
      "file": "src/css/kit-components/lightbox.css",
      "kind": "base",
      "name": "--z-lightbox-bg-o",
      "scope": ".z-lightbox",
      "syntax": "<percentage>"
    },
    {
      "affects": [
        "-webkit-backdrop-filter",
        "backdrop-filter"
      ],
      "default": "var(--z-global-blur)",
      "description": "Overlay backdrop blur radius.",
      "file": "src/css/kit-components/lightbox.css",
      "kind": "base",
      "name": "--z-lightbox-blur",
      "scope": ".z-lightbox",
      "syntax": ""
    },
    {
      "affects": [
        "background-color"
      ],
      "default": "var(--z-bg)",
      "description": "Caption background base color, mixed with transparency using `--z-lightbox-caption-bg-o`.",
      "file": "src/css/kit-components/lightbox.css",
      "kind": "base",
      "name": "--z-lightbox-caption-bg",
      "scope": ".z-lightbox-caption",
      "syntax": "<color>"
    },
    {
      "affects": [
        "background-color"
      ],
      "default": "80%",
      "description": "Caption background opacity percentage used in the mix.",
      "file": "src/css/kit-components/lightbox.css",
      "kind": "base",
      "name": "--z-lightbox-caption-bg-o",
      "scope": ".z-lightbox-caption",
      "syntax": "<percentage>"
    },
    {
      "affects": [
        "color"
      ],
      "default": "var(--z-bg-f)",
      "description": "Caption text base color, mixed with transparency using `--z-lightbox-caption-color-o`.",
      "file": "src/css/kit-components/lightbox.css",
      "kind": "base",
      "name": "--z-lightbox-caption-color",
      "scope": ".z-lightbox-caption",
      "syntax": "<color>"
    },
    {
      "affects": [
        "color"
      ],
      "default": "100%",
      "description": "Caption text opacity percentage used in the mix.",
      "file": "src/css/kit-components/lightbox.css",
      "kind": "base",
      "name": "--z-lightbox-caption-color-o",
      "scope": ".z-lightbox-caption",
      "syntax": "<percentage>"
    },
    {
      "affects": [
        "padding"
      ],
      "default": "0.625rem 1rem",
      "description": "Caption padding.",
      "file": "src/css/kit-components/lightbox.css",
      "kind": "base",
      "name": "--z-lightbox-caption-padding",
      "scope": ".z-lightbox-caption",
      "syntax": "<length>"
    },
    {
      "affects": [
        "height"
      ],
      "default": "80%",
      "description": "Height of iframe/embed items.",
      "file": "src/css/kit-components/lightbox.css",
      "kind": "base",
      "name": "--z-lightbox-iframe-height",
      "scope": ".z-lightbox-iframe",
      "syntax": "<length>"
    },
    {
      "affects": [
        "width"
      ],
      "default": "80%",
      "description": "Width of iframe/embed items.",
      "file": "src/css/kit-components/lightbox.css",
      "kind": "base",
      "name": "--z-lightbox-iframe-width",
      "scope": ".z-lightbox-iframe",
      "syntax": "<length>"
    },
    {
      "affects": [
        "max-height"
      ],
      "default": "100px",
      "description": "Maximum thumbnail height in thumbnav.",
      "file": "src/css/kit-components/lightbox.css",
      "kind": "base",
      "name": "--z-lightbox-thumb-max-height",
      "scope": ".z-lightbox-thumbnav:not(.z-lightbox-thumbnav-vertical) :where(img, video)",
      "syntax": "<length>"
    },
    {
      "affects": [
        "max-width"
      ],
      "default": "100px",
      "description": "Maximum thumbnail width in thumbnav.",
      "file": "src/css/kit-components/lightbox.css",
      "kind": "base",
      "name": "--z-lightbox-thumb-max-width",
      "scope": ".z-lightbox-thumbnav-vertical :where(img, video)",
      "syntax": "<length>"
    },
    {
      "affects": [
        "transition"
      ],
      "default": "opacity 150ms cubic-bezier(0.16, 1, 0.3, 1)",
      "description": "Transition timing of the viewer chrome.",
      "file": "src/css/kit-components/lightbox.css",
      "kind": "base",
      "name": "--z-lightbox-transition",
      "scope": ".z-lightbox",
      "syntax": ""
    },
    {
      "affects": [
        "z-index"
      ],
      "default": "1010",
      "description": "Stacking order of the viewer.",
      "file": "src/css/kit-components/lightbox.css",
      "kind": "base",
      "name": "--z-lightbox-z-index",
      "scope": ".z-lightbox",
      "syntax": "<integer>"
    },
    {
      "affects": [
        "transform"
      ],
      "default": "1",
      "description": "Scale applied to a zoomed image.",
      "file": "src/css/kit-components/lightbox.css",
      "kind": "hook",
      "name": "--z-lightbox-zoom-scale",
      "scope": ".z-lightbox-items > .z-lightbox-zoomed > img",
      "syntax": "<number>"
    }
  ],
  "dataHooks": [
    {
      "appliesTo": "descendant",
      "attribute": "data-alt",
      "description": "On a trigger: alt text for the image item.",
      "role": "config",
      "values": []
    },
    {
      "appliesTo": "descendant",
      "attribute": "data-caption",
      "description": "On a trigger: caption shown under the item.",
      "role": "config",
      "values": []
    },
    {
      "appliesTo": "external-trigger",
      "attribute": "data-close",
      "description": "Clicking the element closes the dialog matched by the selector (usually `#id`).",
      "from": "DialogMixin",
      "role": "trigger",
      "values": []
    },
    {
      "appliesTo": "descendant",
      "attribute": "data-host-inner",
      "description": "Marks the rendered inner wrapper so `force-prevent-rerender` can adopt server-rendered DOM without re-rendering.",
      "from": "Hwc",
      "role": "config",
      "values": []
    },
    {
      "appliesTo": "descendant",
      "attribute": "data-lightbox-ignore",
      "description": "Excludes a trigger (or subtree) from item collection.",
      "role": "config",
      "values": []
    },
    {
      "appliesTo": "descendant",
      "attribute": "data-lightbox-slide",
      "description": "Set by the component on each slide to its index.",
      "role": "marker",
      "values": []
    },
    {
      "appliesTo": "external-trigger",
      "attribute": "data-open",
      "description": "Clicking the element opens the dialog matched by the selector without toggling.",
      "from": "DialogMixin",
      "role": "trigger",
      "values": []
    },
    {
      "appliesTo": "descendant",
      "attribute": "data-part",
      "description": "Marks the overlay and items deck in the rendered DOM (`data-part=\"overlay\"` / `data-part=\"items\"`).",
      "role": "marker",
      "values": [
        "items",
        "overlay"
      ]
    },
    {
      "appliesTo": "descendant",
      "attribute": "data-poster",
      "description": "On a trigger: poster image for a video item.",
      "role": "config",
      "values": []
    },
    {
      "appliesTo": "descendant",
      "attribute": "data-reactive",
      "description": "Opts the marked child (config script, data source, icons, or template) into live re-parsing when its DOM mutates.",
      "from": "Hwc",
      "role": "config",
      "values": []
    },
    {
      "appliesTo": "descendant",
      "attribute": "data-sizes",
      "description": "On a trigger: `sizes` attribute for the responsive image.",
      "role": "config",
      "values": []
    },
    {
      "appliesTo": "descendant",
      "attribute": "data-source",
      "description": "On a trigger: explicit media URL when the href is a placeholder (`#`/`#!`) or differs from the media.",
      "role": "trigger",
      "values": [
        "#",
        "#!"
      ]
    },
    {
      "appliesTo": "descendant",
      "attribute": "data-srcset",
      "description": "On a trigger: `srcset` attribute for the responsive image.",
      "role": "config",
      "values": []
    },
    {
      "appliesTo": "descendant",
      "attribute": "data-thumb",
      "description": "On a trigger: thumbnail URL for thumbnav.",
      "role": "config",
      "values": []
    },
    {
      "appliesTo": "external-trigger",
      "attribute": "data-toggle",
      "description": "Clicking the element toggles the dialog matched by the selector (usually `#id`).",
      "from": "DialogMixin",
      "role": "trigger",
      "values": []
    },
    {
      "appliesTo": "descendant",
      "attribute": "data-type",
      "description": "On a trigger: media type override — `image`, `video`, `youtube`, `vimeo`, or `iframe`; otherwise inferred from the URL.",
      "role": "trigger",
      "values": [
        "iframe",
        "image",
        "video",
        "vimeo",
        "youtube"
      ]
    }
  ],
  "events": [
    {
      "bubbles": true,
      "cancelable": true,
      "description": "Fires before closing; call `preventDefault()` to abort.",
      "detail": null,
      "from": "DialogMixin",
      "name": "z-lightbox:before-hide"
    },
    {
      "bubbles": true,
      "cancelable": true,
      "description": "Cancelable; fires before navigating to another item. Detail: `index`, `previousIndex`, `item`, `dir`.",
      "detail": {
        "fields": [
          {
            "name": "index",
            "type": "number"
          },
          {
            "name": "previousIndex",
            "type": "number"
          },
          {
            "name": "item",
            "type": "LightboxItem"
          },
          {
            "name": "dir",
            "type": "1 | -1"
          }
        ],
        "type": "{ index: number; previousIndex: number; item: LightboxItem; dir: 1 | -1 }"
      },
      "name": "z-lightbox:before-item-change"
    },
    {
      "bubbles": true,
      "cancelable": true,
      "description": "Fires before opening; call `preventDefault()` to abort.",
      "detail": null,
      "from": "DialogMixin",
      "name": "z-lightbox:before-show"
    },
    {
      "bubbles": true,
      "cancelable": false,
      "description": "Fires when the mounted DOM is removed, via `unmount` or `destroy()`.",
      "detail": null,
      "from": "DialogMixin",
      "name": "z-lightbox:destroy"
    },
    {
      "bubbles": true,
      "cancelable": false,
      "description": "Fires after the close transition completes and focus is restored to the opener.",
      "detail": null,
      "from": "DialogMixin",
      "name": "z-lightbox:hidden"
    },
    {
      "bubbles": true,
      "cancelable": false,
      "description": "Fires when the dialog starts closing.",
      "detail": null,
      "from": "DialogMixin",
      "name": "z-lightbox:hide"
    },
    {
      "bubbles": true,
      "cancelable": false,
      "description": "Fires when the active item changes, with the same detail as `before-item-change`.",
      "detail": {
        "fields": [],
        "type": "Record<string, unknown>"
      },
      "name": "z-lightbox:item-change"
    },
    {
      "bubbles": true,
      "cancelable": false,
      "description": "Fires when an item's media fails to load. Detail: `index`, `item`.",
      "detail": {
        "fields": [
          {
            "name": "index",
            "type": "number"
          },
          {
            "name": "item",
            "type": "LightboxItem"
          }
        ],
        "type": "{ index: number; item: LightboxItem }"
      },
      "name": "z-lightbox:item-error"
    },
    {
      "bubbles": true,
      "cancelable": false,
      "description": "Fires when an item's media finishes loading. Detail: `index`, `item`.",
      "detail": {
        "fields": [
          {
            "name": "index",
            "type": "number"
          },
          {
            "name": "item",
            "type": "LightboxItem"
          }
        ],
        "type": "{ index: number; item: LightboxItem }"
      },
      "name": "z-lightbox:item-load"
    },
    {
      "bubbles": true,
      "cancelable": false,
      "description": "Fires after the item transition completes, with the same detail as `before-item-change`.",
      "detail": {
        "fields": [],
        "type": "Record<string, unknown>"
      },
      "name": "z-lightbox:item-shown"
    },
    {
      "bubbles": true,
      "cancelable": false,
      "description": "Fires once when the dialog DOM is first mounted.",
      "detail": null,
      "from": "DialogMixin",
      "name": "z-lightbox:mount"
    },
    {
      "bubbles": true,
      "cancelable": false,
      "description": "Fires when the dialog starts opening, before the transition completes.",
      "detail": null,
      "from": "DialogMixin",
      "name": "z-lightbox:show"
    },
    {
      "bubbles": true,
      "cancelable": false,
      "description": "Fires after the open transition completes.",
      "detail": null,
      "from": "DialogMixin",
      "name": "z-lightbox:shown"
    }
  ],
  "i18n": [
    {
      "default": "Close",
      "description": "Label of the close button.",
      "key": "close",
      "placeholders": [],
      "usedIn": [
        "close"
      ]
    },
    {
      "default": "{current} / {total}",
      "description": "Counter template with `{current}` and `{total}` placeholders.",
      "key": "counter",
      "placeholders": [
        "current",
        "total"
      ],
      "usedIn": [
        "counter"
      ]
    },
    {
      "default": "Unable to load media.",
      "description": "Message shown when an item fails to load.",
      "key": "error",
      "placeholders": [],
      "usedIn": []
    },
    {
      "default": "Next",
      "description": "Label of the next arrow.",
      "key": "next",
      "placeholders": [],
      "usedIn": [
        "next"
      ]
    },
    {
      "default": "Previous",
      "description": "Label of the previous arrow.",
      "key": "previous",
      "placeholders": [],
      "usedIn": [
        "prev"
      ]
    },
    {
      "default": "Item {index} of {total}",
      "description": "Accessible slide label template with `{index}` and `{total}` placeholders.",
      "key": "slideLabel",
      "placeholders": [
        "index",
        "total"
      ],
      "usedIn": []
    },
    {
      "default": "Zoom in",
      "description": "Label of the zoom toggle when zooming in.",
      "key": "zoomIn",
      "placeholders": [],
      "usedIn": []
    },
    {
      "default": "Zoom out",
      "description": "Label of the zoom toggle when zooming out.",
      "key": "zoomOut",
      "placeholders": [],
      "usedIn": []
    }
  ],
  "icons": [],
  "id": "lightbox",
  "inherits": [
    "DialogMixin",
    "Hwc",
    "Base"
  ],
  "keyboard": [
    {
      "action": "Previous/next item (direction flips in RTL).",
      "keys": [
        "ArrowLeft",
        "ArrowRight"
      ]
    },
    {
      "action": "Closes the viewer (or exits zoom first).",
      "keys": [
        "Escape"
      ]
    }
  ],
  "kind": "hwc",
  "methods": [
    {
      "description": "Closes and unmounts the dialog DOM; optionally removes the host element as well.",
      "from": "DialogMixin",
      "name": "destroy",
      "params": [
        {
          "default": "false",
          "name": "removeHost",
          "optional": true,
          "type": "boolean"
        }
      ],
      "returns": "Promise<void>",
      "static": false
    },
    {
      "description": "Navigates to an index (wraps unless `finite`); resolves to whether the item changed.",
      "name": "goTo",
      "params": [
        {
          "default": null,
          "name": "target",
          "optional": false,
          "type": "number | 'next' | 'previous' | 'first' | 'last'"
        },
        {
          "default": "true",
          "name": "animate",
          "optional": true,
          "type": "boolean"
        }
      ],
      "returns": "Promise<boolean>",
      "static": false
    },
    {
      "description": "Closes the dialog and restores focus to the opener.",
      "from": "DialogMixin",
      "name": "hide",
      "params": [],
      "returns": "Promise<void>",
      "static": false
    },
    {
      "description": "Returns the current item index.",
      "name": "index",
      "params": [],
      "returns": "number",
      "static": false
    },
    {
      "description": "Advances to the next item.",
      "name": "next",
      "params": [
        {
          "default": "true",
          "name": "animate",
          "optional": true,
          "type": "boolean"
        }
      ],
      "returns": "Promise<boolean>",
      "static": false
    },
    {
      "description": "Moves to the previous item.",
      "name": "previous",
      "params": [
        {
          "default": "true",
          "name": "animate",
          "optional": true,
          "type": "boolean"
        }
      ],
      "returns": "Promise<boolean>",
      "static": false
    },
    {
      "description": "Re-collects items from the trigger elements.",
      "name": "refresh",
      "params": [],
      "returns": "void",
      "static": false
    },
    {
      "description": "Opens the dialog; the trigger element receives focus back on close.",
      "name": "show",
      "params": [
        {
          "default": null,
          "name": "target",
          "optional": true,
          "type": "number | HTMLElement | null"
        }
      ],
      "returns": "Promise<void>",
      "static": false
    },
    {
      "description": "Opens the dialog if closed, otherwise closes it.",
      "from": "DialogMixin",
      "name": "toggle",
      "params": [
        {
          "default": null,
          "name": "trigger",
          "optional": true,
          "type": "HTMLElement | null"
        }
      ],
      "returns": "Promise<void>",
      "static": false
    },
    {
      "description": "Toggles zoom on the active image item.",
      "name": "toggleZoom",
      "params": [],
      "returns": "void",
      "static": false
    }
  ],
  "notes": [
    "Items are collected from the `target` matches: href (or `data-source`) plus optional `data-type`, `data-caption`, `data-alt`, `data-poster`, `data-thumb`, `data-srcset`, `data-sizes`.",
    "YouTube/Vimeo URLs are converted to privacy-friendly embed URLs; unknown URLs fall back to iframe.",
    "The viewer defaults to `inline` + `unmount`: it renders in a portal and tears down after closing.",
    "Zoom applies to loaded images; swipe and arrow navigation wrap unless `finite` is set."
  ],
  "parts": {
    "defaultClsTarget": "overlay",
    "defaultStlTarget": "overlay",
    "items": [
      {
        "defaultCls": "z-lightbox-toolbar-actions",
        "description": "Toolbar action group (default `z-lightbox-toolbar-actions`).",
        "foundIn": [
          "$cls",
          "render"
        ],
        "key": "actions",
        "supportsCls": true,
        "supportsStl": true
      },
      {
        "defaultCls": "z-lightbox-caption",
        "description": "Caption text under the active item (default `z-lightbox-caption`).",
        "foundIn": [
          "$cls",
          "render"
        ],
        "key": "caption",
        "supportsCls": true,
        "supportsStl": true
      },
      {
        "defaultCls": "z-slidenav z-lightbox-close",
        "description": "Close button (default `z-slidenav z-lightbox-close`).",
        "foundIn": [
          "$cls",
          "render"
        ],
        "key": "close",
        "supportsCls": true,
        "supportsStl": true
      },
      {
        "defaultCls": "z-lightbox-counter",
        "description": "The `current / total` counter (default `z-lightbox-counter`).",
        "foundIn": [
          "$cls",
          "render"
        ],
        "key": "counter",
        "supportsCls": true,
        "supportsStl": true
      },
      {
        "defaultCls": "z-lightbox-dotnav z-dotnav",
        "description": "Dot navigation (default `z-lightbox-dotnav z-dotnav`).",
        "foundIn": [
          "$cls",
          "render"
        ],
        "key": "dotnav",
        "supportsCls": true,
        "supportsStl": true
      },
      {
        "defaultCls": "z-lightbox-footer z-lightbox-chrome",
        "description": "Bottom chrome holding the caption (default `z-lightbox-footer z-lightbox-chrome`).",
        "foundIn": [
          "$cls",
          "render"
        ],
        "key": "footer",
        "supportsCls": true,
        "supportsStl": true
      },
      {
        "defaultCls": "z-lightbox-items",
        "description": "The deck holding the item slides (default `z-lightbox-items`).",
        "foundIn": [
          "$cls",
          "render"
        ],
        "key": "items",
        "supportsCls": true,
        "supportsStl": true
      },
      {
        "defaultCls": "z-slidenav z-lightbox-slidenav z-position-center-right z-position-small z-lightbox-chrome",
        "description": "Next arrow (default `z-slidenav z-lightbox-slidenav z-position-center-right z-position-small z-lightbox-chrome`).",
        "foundIn": [
          "$cls",
          "render"
        ],
        "key": "next",
        "supportsCls": true,
        "supportsStl": true
      },
      {
        "defaultCls": "z-lightbox",
        "description": "The lightbox overlay root (default `z-lightbox`); the default `cls`/`stl` target.",
        "foundIn": [
          "$cls",
          "render"
        ],
        "key": "overlay",
        "supportsCls": true,
        "supportsStl": true
      },
      {
        "defaultCls": "z-slidenav z-lightbox-slidenav z-position-center-left z-position-small z-lightbox-chrome",
        "description": "Previous arrow (default `z-slidenav z-lightbox-slidenav z-position-center-left z-position-small z-lightbox-chrome`).",
        "foundIn": [
          "$cls",
          "render"
        ],
        "key": "prev",
        "supportsCls": true,
        "supportsStl": true
      },
      {
        "defaultCls": "z-lightbox-thumbnav z-thumbnav",
        "description": "Thumbnail navigation (default `z-lightbox-thumbnav z-thumbnav`).",
        "foundIn": [
          "$cls",
          "render"
        ],
        "key": "thumbnav",
        "supportsCls": true,
        "supportsStl": true
      },
      {
        "defaultCls": "z-lightbox-toolbar z-lightbox-chrome",
        "description": "Top toolbar with counter and actions (default `z-lightbox-toolbar z-lightbox-chrome`).",
        "foundIn": [
          "$cls",
          "render"
        ],
        "key": "toolbar",
        "supportsCls": true,
        "supportsStl": true
      },
      {
        "defaultCls": "z-slidenav z-lightbox-zoom-btn",
        "description": "Zoom toggle button (default `z-slidenav z-lightbox-zoom-btn`).",
        "foundIn": [
          "$cls",
          "render"
        ],
        "key": "zoom",
        "supportsCls": true,
        "supportsStl": true
      }
    ]
  },
  "recipes": [],
  "related": [
    "dialog",
    "slider"
  ],
  "schemaVersion": 1,
  "sources": {
    "css": [
      "src/css/kit-components/lightbox.css"
    ],
    "cssSelectors": [
      ".z-lightbox",
      ".z-lightbox-*"
    ],
    "ts": "src/js/hwc/components/lightbox.ts"
  },
  "summary": "Media viewer overlay for images, videos, YouTube/Vimeo embeds, and iframes, collected from links, with zoom, swipe, captions, and dot/thumb navigation.",
  "tag": "z-lightbox",
  "title": "Lightbox"
}
