{
  "$schema": "https://design.senvenli.com/schema/component.full.json",
  "kind": "component",
  "family": "display",
  "status": "alpha",
  "import": "@senvenli/react/display",
  "name": "carousel",
  "title": "Carousel",
  "exports": [
    "Carousel",
    "CarouselSlide"
  ],
  "description": "Pages through a set of images with previous/next and optional thumbnails; never auto-advances.",
  "keywords": [
    "compound",
    "gallery",
    "images",
    "photos",
    "slider",
    "slides"
  ],
  "usage": {
    "when": [
      "A few photos of one item."
    ],
    "instead": [
      {
        "use": "image-viewer",
        "when": "Photos need to be seen full screen."
      }
    ]
  },
  "a11y": {
    "keyboard": [
      {
        "keys": "Arrow left / right",
        "does": "Move to the previous or next image."
      }
    ],
    "builtIn": [
      "The position is announced as \"Image N of M\"."
    ],
    "youProvide": [
      "Meaningful alt text for each image.",
      "With CarouselSlide children: real alt text on images inside slides, and a label per slide when thumbnails are shown."
    ]
  },
  "related": [
    "image-viewer",
    "grid-list"
  ],
  "genui": {
    "expose": false
  },
  "source": [
    "src/display/carousel.tsx"
  ],
  "props": {
    "Carousel": [
      {
        "name": "items",
        "type": "CarouselItem[]",
        "required": false,
        "origin": "own",
        "description": "Images as data. Leave it out to compose `CarouselSlide`s as children instead (any content: a card, a quote).",
        "schema": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "id": {
                "type": "string"
              },
              "src": {
                "type": "string"
              },
              "alt": {
                "type": "string"
              }
            },
            "required": [
              "src",
              "alt"
            ]
          }
        }
      },
      {
        "name": "children",
        "type": "React.ReactNode",
        "required": false,
        "origin": "own",
        "description": "With no `items`: `CarouselSlide`s, one per page."
      },
      {
        "name": "aria-label",
        "type": "string",
        "required": true,
        "origin": "own",
        "description": "Names the carousel (\"Product photos\").",
        "schema": {
          "type": "string"
        }
      },
      {
        "name": "index",
        "type": "number",
        "required": false,
        "origin": "own",
        "description": "The shown image, controlled. The carousel calls `onIndexChange` and expects the new value back.",
        "schema": {
          "type": "number"
        }
      },
      {
        "name": "defaultIndex",
        "type": "number",
        "required": false,
        "origin": "own",
        "description": "The first image shown when uncontrolled.",
        "schema": {
          "type": "number"
        }
      },
      {
        "name": "onIndexChange",
        "type": "(index: number) => void",
        "required": false,
        "origin": "own"
      },
      {
        "name": "showThumbnails",
        "type": "boolean",
        "required": false,
        "origin": "own",
        "description": "A strip of thumbnails under the frame; the current one outlined. The dots then only indicate. With\n`CarouselSlide`s, shown only when every slide has a `thumbnail`.",
        "schema": {
          "type": "boolean"
        }
      },
      {
        "name": "aspectRatio",
        "type": "\"16/9\" | \"4/3\"",
        "required": false,
        "origin": "own",
        "schema": {
          "type": "string",
          "enum": [
            "16/9",
            "4/3"
          ]
        }
      },
      {
        "name": "isLandmark",
        "type": "boolean",
        "required": false,
        "origin": "own",
        "description": "A `region` landmark (default) for a gallery that is part of the page's outline; `false` inside\nrepeated cards, so a listing does not fill the landmark list.",
        "schema": {
          "type": "boolean"
        }
      },
      {
        "name": "motion",
        "type": "ComponentMotion",
        "required": false,
        "origin": "own",
        "description": "`auto` (follow the device), `reduce` or `none`, for this component; the provider's setting otherwise.",
        "schema": {
          "type": "string",
          "enum": [
            "none",
            "auto",
            "reduce"
          ]
        }
      }
    ],
    "CarouselSlide": [
      {
        "name": "id",
        "type": "string",
        "required": false,
        "origin": "own",
        "description": "Stable key; the position by default.",
        "schema": {
          "type": "string"
        }
      },
      {
        "name": "label",
        "type": "string",
        "required": false,
        "origin": "own",
        "description": "The slide's name for its thumbnail (\"Front view\"); the position by default.",
        "schema": {
          "type": "string"
        }
      },
      {
        "name": "thumbnail",
        "type": "string",
        "required": false,
        "origin": "own",
        "description": "An image URL for the thumbnail strip.",
        "schema": {
          "type": "string"
        }
      },
      {
        "name": "children",
        "type": "React.ReactNode",
        "required": true,
        "origin": "own",
        "description": "What the page shows: an image, a card, a quote. It fills the frame."
      }
    ]
  },
  "tokens": [
    "ds-background-neutral-bold",
    "ds-border-focused",
    "ds-border-selected",
    "ds-icon",
    "ds-icon-brand",
    "ds-icon-danger",
    "ds-icon-information",
    "ds-icon-subtle",
    "ds-icon-success",
    "ds-icon-warning",
    "ds-radius-full",
    "ds-radius-medium",
    "ds-radius-xlarge",
    "ds-shadow-overlay",
    "ds-size-icon",
    "ds-size-icon-large",
    "ds-size-icon-small",
    "ds-space-025",
    "ds-space-100",
    "ds-space-150",
    "ds-surface-hovered",
    "ds-surface-overlay",
    "ds-surface-sunken",
    "ds-text-inverse"
  ],
  "strings": [
    "goToImage",
    "imagePosition",
    "nextImage",
    "previousImage"
  ],
  "quality": {
    "tests": true,
    "a11y": false,
    "docs": false,
    "visual": false,
    "dark": false,
    "rtl": false,
    "mcp": true,
    "generic": true
  }
}
