{
  "$schema": "https://next.0build.dev/schema/component.v1.json",
  "accessibility": {
    "aria": [],
    "notes": [
      "The host is a `role=\"region\"` with `aria-roledescription=\"carousel\"`; slides are `tabpanel`s (with nav) or `group`s labeled `n of total`.",
      "Nav lists become `role=\"tablist\"` with roving tabindex; arrow controls get `aria-controls` and localized labels.",
      "The items list is `aria-live=\"polite\"`, switched to `off` while autoplay runs."
    ]
  },
  "attributes": [
    {
      "default": "false",
      "description": "Navigates by viewport-wide sets of items instead of one item at a time; snap points land on set anchors.",
      "from": null,
      "name": "sets",
      "property": "sets",
      "reflect": false,
      "tokens": null,
      "type": "boolean",
      "values": null
    },
    {
      "default": "false",
      "description": "Centers the active item in the viewport instead of aligning it to the start.",
      "from": null,
      "name": "center",
      "property": "center",
      "reflect": false,
      "tokens": null,
      "type": "boolean",
      "values": null
    },
    {
      "default": "'all'",
      "description": "Which visible items get the active class: `all` visible items (default) or only the `first`.",
      "from": null,
      "name": "active-mode",
      "property": "active-mode",
      "reflect": false,
      "tokens": null,
      "type": "'all' | 'first'",
      "values": [
        "all",
        "first"
      ]
    },
    {
      "default": null,
      "description": "Index of the active slide; setting it navigates to that slide. `-1` before initialization.",
      "from": "CarouselBase",
      "name": "active",
      "property": "active",
      "reflect": false,
      "tokens": null,
      "type": "number",
      "values": null
    },
    {
      "default": "false",
      "description": "Stops at the first/last slide instead of looping; boundary controls are hidden and disabled.",
      "from": "CarouselBase",
      "name": "finite",
      "property": "finite",
      "reflect": false,
      "tokens": null,
      "type": "boolean",
      "values": null
    },
    {
      "default": "false",
      "description": "Advances automatically every `autoplay-interval` ms; ticks pause while hovered, focused within, dragging, or the document is hidden.",
      "from": "CarouselBase",
      "name": "autoplay",
      "property": "autoplay",
      "reflect": false,
      "tokens": null,
      "type": "boolean",
      "values": null
    },
    {
      "default": "7000",
      "description": "Autoplay interval in milliseconds (minimum 500, default 7000).",
      "from": "CarouselBase",
      "name": "autoplay-interval",
      "property": "autoplay-interval",
      "reflect": false,
      "tokens": null,
      "type": "number",
      "values": null
    },
    {
      "default": "false",
      "description": "Keeps autoplay running while the pointer is over the carousel.",
      "from": "CarouselBase",
      "name": "no-pause-on-hover",
      "property": "no-pause-on-hover",
      "reflect": false,
      "tokens": null,
      "type": "boolean",
      "values": null
    },
    {
      "default": "false",
      "description": "Disables pointer drag/swipe navigation.",
      "from": "CarouselBase",
      "name": "no-drag",
      "property": "no-drag",
      "reflect": false,
      "tokens": null,
      "type": "boolean",
      "values": null
    },
    {
      "default": "0",
      "description": "Transition duration in ms. When unset, the component default (slider 350, slideshow 450) divided by `velocity` is used; an explicit `0` makes transitions instant.",
      "from": "CarouselBase",
      "name": "duration",
      "property": "duration",
      "reflect": false,
      "tokens": null,
      "type": "number",
      "values": null
    },
    {
      "default": "1",
      "description": "Speed multiplier applied to the default duration (default 1); ignored when `duration` is set.",
      "from": "CarouselBase",
      "name": "velocity",
      "property": "velocity",
      "reflect": false,
      "tokens": null,
      "type": "number",
      "values": null
    },
    {
      "default": "''",
      "description": "CSS easing for programmatic transitions; empty uses the component default.",
      "from": "CarouselBase",
      "name": "easing",
      "property": "easing",
      "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": "navigation",
  "children": [],
  "cssClasses": [
    {
      "appliesTo": ".z-slider",
      "class": ".z-dragging",
      "description": "State class on the track during a drag; disables snap and smooth scrolling.",
      "role": "state"
    },
    {
      "appliesTo": "z-slider",
      "class": ".z-slider",
      "description": "Root class, also styled on the `z-slider` host.",
      "role": "root"
    },
    {
      "appliesTo": ".z-slider",
      "class": ".z-slider-container",
      "description": "Optional outer wrapper clipping the track.",
      "role": "element"
    },
    {
      "appliesTo": ".z-slider",
      "class": ".z-slider-items",
      "description": "The scrollable, scroll-snapping track holding the slides.",
      "role": "element"
    }
  ],
  "cssVars": [],
  "dataHooks": [
    {
      "appliesTo": "descendant",
      "attribute": "data-auto-nav-item",
      "description": "Marks nav items generated by the carousel; a fully auto nav is rebuilt to match the slide count.",
      "from": "CarouselBase",
      "role": "config",
      "values": []
    },
    {
      "appliesTo": "descendant",
      "attribute": "data-autoplay",
      "description": "On a slide video: plays it while the slide is active.",
      "from": "CarouselBase",
      "role": "config",
      "values": []
    },
    {
      "appliesTo": "descendant",
      "attribute": "data-fn",
      "description": "Marks a deferred `<template>` child whose content is mounted into the container on demand.",
      "from": "Controller",
      "role": "config",
      "values": [
        "template"
      ]
    },
    {
      "appliesTo": "descendant",
      "attribute": "data-keep-playing",
      "description": "On a slide video: keeps it playing when the slide becomes inactive.",
      "from": "CarouselBase",
      "role": "config",
      "values": []
    },
    {
      "appliesTo": "descendant",
      "attribute": "data-part",
      "description": "Marks arrow controls: `data-part=\"previous\"` and `data-part=\"next\"`.",
      "from": "CarouselBase",
      "role": "marker",
      "values": [
        "next",
        "previous"
      ]
    },
    {
      "appliesTo": "descendant",
      "attribute": "data-value",
      "description": "On a slide: its command value, usable as a `show()` target and carried in event detail.",
      "from": "CarouselBase",
      "role": "read-only",
      "values": []
    }
  ],
  "events": [
    {
      "bubbles": true,
      "cancelable": true,
      "description": "Cancelable; fires before the active slide changes. Detail carries `index`, `previousIndex`, `slide`, `previousSlide`, `value`, and `dir`.",
      "detail": {
        "fields": [],
        "type": "Record<string, unknown>"
      },
      "name": "z-slider:before-change"
    },
    {
      "bubbles": true,
      "cancelable": true,
      "description": "Cancelable; fires before the outgoing slide hides, with the same detail as `before-change`.",
      "detail": {
        "fields": [],
        "type": "Record<string, unknown>"
      },
      "name": "z-slider:before-hide"
    },
    {
      "bubbles": true,
      "cancelable": true,
      "description": "Cancelable; fires before the incoming slide shows, with the same detail as `before-change`.",
      "detail": {
        "fields": [],
        "type": "Record<string, unknown>"
      },
      "name": "z-slider:before-show"
    },
    {
      "bubbles": true,
      "cancelable": false,
      "description": "Fires when the active slide changes, with the same detail as `before-change`.",
      "detail": {
        "fields": [],
        "type": "Record<string, unknown>"
      },
      "name": "z-slider:change"
    },
    {
      "bubbles": true,
      "cancelable": false,
      "description": "Fires after the outgoing slide's transition completes.",
      "detail": {
        "fields": [],
        "type": "Record<string, unknown>"
      },
      "name": "z-slider:hidden"
    },
    {
      "bubbles": true,
      "cancelable": false,
      "description": "Fires when the outgoing slide starts hiding.",
      "detail": {
        "fields": [],
        "type": "Record<string, unknown>"
      },
      "name": "z-slider:hide"
    },
    {
      "bubbles": true,
      "cancelable": false,
      "description": "Fires when deferred template content is mounted into the container.",
      "detail": {
        "fields": [],
        "type": "Record<string, unknown>"
      },
      "from": "Controller",
      "name": "z-slider:mount"
    },
    {
      "bubbles": true,
      "cancelable": false,
      "description": "Fires when the incoming slide starts showing.",
      "detail": {
        "fields": [],
        "type": "Record<string, unknown>"
      },
      "name": "z-slider:show"
    },
    {
      "bubbles": true,
      "cancelable": false,
      "description": "Fires after the incoming slide's transition completes.",
      "detail": {
        "fields": [],
        "type": "Record<string, unknown>"
      },
      "name": "z-slider:shown"
    }
  ],
  "i18n": [],
  "icons": [],
  "id": "slider",
  "inherits": [
    "CarouselBase",
    "Controller",
    "Base"
  ],
  "keyboard": [
    {
      "action": "Previous/next slide (direction flips in RTL).",
      "keys": [
        "ArrowLeft",
        "ArrowRight"
      ]
    },
    {
      "action": "Move within a nav tablist; Home/End jump to the first/last slide.",
      "keys": [
        "ArrowLeft",
        "ArrowRight",
        "ArrowUp",
        "ArrowDown",
        "Home",
        "End"
      ],
      "when": "Focus is inside a `.z-slider-nav` list."
    }
  ],
  "kind": "controller",
  "methods": [
    {
      "description": "Returns the number of slides.",
      "from": "CarouselBase",
      "name": "count",
      "params": [],
      "returns": "number",
      "static": false
    },
    {
      "description": "Returns the current active index.",
      "from": "CarouselBase",
      "name": "index",
      "params": [],
      "returns": "number",
      "static": false
    },
    {
      "description": "Advances to the next slide (wraps unless `finite`); resolves to whether the index changed.",
      "from": "CarouselBase",
      "name": "next",
      "params": [
        {
          "default": "true",
          "name": "animate",
          "optional": true,
          "type": "boolean"
        }
      ],
      "returns": "Promise<boolean>",
      "static": false
    },
    {
      "description": "Moves to the previous slide (wraps unless `finite`); resolves to whether the index changed.",
      "from": "CarouselBase",
      "name": "previous",
      "params": [
        {
          "default": "true",
          "name": "animate",
          "optional": true,
          "type": "boolean"
        }
      ],
      "returns": "Promise<boolean>",
      "static": false
    },
    {
      "description": "Re-measures the track and re-initializes navigation, autoplay, and observers.",
      "name": "refresh",
      "params": [],
      "returns": "void",
      "static": false
    },
    {
      "description": "Navigates to an index, `next`/`previous`/`first`/`last`, or a slide's `data-value`/id; resolves to whether the index changed. Cancelable `before-*` events can veto it.",
      "name": "show",
      "params": [
        {
          "default": null,
          "name": "target",
          "optional": false,
          "type": "number | 'next' | 'previous' | 'first' | 'last' | string"
        },
        {
          "default": "true",
          "name": "animate",
          "optional": true,
          "type": "boolean"
        }
      ],
      "returns": "Promise<boolean>",
      "static": false
    },
    {
      "description": "Starts the autoplay timer; a no-op unless `autoplay` is enabled.",
      "from": "CarouselBase",
      "name": "startAutoplay",
      "params": [],
      "returns": "void",
      "static": false
    },
    {
      "description": "Stops the autoplay timer.",
      "from": "CarouselBase",
      "name": "stopAutoplay",
      "params": [],
      "returns": "void",
      "static": false
    }
  ],
  "notes": [
    "The track is `.z-slider-items` (or `[data-part=\"items\"]` / `[data-part=\"list\"]`); nav is `.z-slider-nav` (or `[data-part=\"nav\"]`).",
    "Nav controls target slides with `data-slider-item=\"<index|value>\"`; `data-slider-ignore` excludes a child from the slide list.",
    "Looping reorders slides with CSS `order` and scroll compensation, so the DOM order (and tab order) stays canonical; `finite` disables it.",
    "Drag navigation suppresses the follow-up click and ignores interactive content (buttons, inputs, `[data-no-drag]`, …).",
    "Slide videos with `data-autoplay` play while active; others pause unless `data-keep-playing` is set."
  ],
  "parts": {
    "defaultClsTarget": "active",
    "defaultStlTarget": "host-inner",
    "items": [
      {
        "defaultCls": "z-active",
        "description": "Class applied to active slides and nav controls (default `z-active`).",
        "foundIn": [
          "$cls"
        ],
        "key": "active",
        "supportsCls": true,
        "supportsStl": false
      },
      {
        "defaultCls": "z-dragging",
        "description": "Class applied to the items list while a pointer drag is in progress (default `z-dragging`).",
        "foundIn": [
          "$cls"
        ],
        "key": "dragging",
        "supportsCls": true,
        "supportsStl": false
      },
      {
        "defaultCls": "",
        "description": "Marker part for the next-arrow control (`data-part=\"next\"`).",
        "foundIn": [
          "render"
        ],
        "key": "next",
        "supportsCls": true,
        "supportsStl": false
      },
      {
        "defaultCls": "",
        "description": "Marker part for the previous-arrow control (`data-part=\"previous\"`).",
        "foundIn": [
          "render"
        ],
        "key": "previous",
        "supportsCls": true,
        "supportsStl": false
      }
    ]
  },
  "recipes": [],
  "related": [
    "slideshow",
    "switcher"
  ],
  "schemaVersion": 1,
  "sources": {
    "css": [
      "src/css/kit-components/slider.css"
    ],
    "cssSelectors": [
      ".z-slider",
      ".z-slider-*"
    ],
    "ts": "src/js/controllers/components/slider.ts"
  },
  "status": "experimental",
  "statusNote": "Under active stabilization; API and layout behavior may change before graduating to stable.",
  "summary": "Scroll-snap carousel for variable-width items, with drag/swipe, seamless looping, set-based paging, centered mode, and autoplay.",
  "tag": "z-slider",
  "title": "Slider"
}
