"$schema": "https://git.drupalcode.org/project/drupal/-/raw/10.1.x/core/modules/sdc/src/metadata.schema.json"
name: Accordion
description: A single section of content than can be collapsed and expanded.
group: Layout
props:
  type: object
  required:
    - heading_level
  properties:
    title:
      type: string
      title: Heading
      examples:
        - Section title
    heading_level:
      type: number
      enum: [2, 3, 4, 5, 6]
      title: Heading level
      examples:
        - 3
    open_by_default:
      type: boolean
      title: Expanded by default
      examples:
        - false

slots:
  accordion_content:
    title: Accordion content
    description: Content in this slot will be hidden when the accordion is collapsed.

libraryOverrides:
  js:
    accordion.js: { attributes: { type: module } }
