Accordion-history

Mostrar parámetros

Parámetros del componente

              params:
- name: idPrefix
  type: string
  required: true
  description: String to prefix id for each accordion item if no id is specified on each item.
- name: headingLevel
  type: number
  required: false
  description: If headingLevel is 1, the parent heading tag needed inside this component will be a h1, if 2 will be a h2, and so on.
- name: allowToggle
  type: boolean
  required: false
  description: Defaults to `false`. Allow for each toggle to both open and close its section. Makes it possible for all sections to be closed. Assumes only one section may be open.
- name: allowMultiple
  type: boolean
  required: false
  description: Defaults to `false`. Allow for multiple accordion sections to be expanded at the same time. Assumes data-allow-toggle otherwise the toggle on open sections would be disabled.
- name: heading
  type: object
  required: false
  description: Options for the heading
  params:
  - name: text
    type: string
    required: true
    description: If `html` is set, this is not required. Text to use within the heading. If `html` is provided, the `text` argument will be ignored.
  - name: html
    type: string
    required: true
    description: If `text` is set, this is not required. HTML to use within the heading. If `html` is provided, the `text` argument will be ignored.
  - name: id
    type: string
    required: false
    description: Id to add to the item. Not required, but recommended to improve the accessibility.
  - name: classes
    type: string
    required: false
    description: Classes to add to the heading.
- name: showControl
  type: boolean
  required: false
  description: Defaults to `false`. If `true` a Show/Hide all button is displayed on top
- name: items
  type: array
  required: true
  description: Array of accordion items objects.
  params:
  - name: headerText
    type: string
    required: true
    description: If `summmaryHtml` is set, this is not required. Text to use within the header element (the visible part of the accordion item element). If `headerHtml` is provided, the `headerText` argument will be ignored.
  - name: headerHtml
    type: string
    required: true
    description: If `summmaryText` is set, this is not required. HTML to use within the header element (the visible part of the accordion item element). If `headerHtml` is provided, the `headerText` argument will be ignored.
  - name: text
    type: string
    required: true
    description: If `html` is set, this is not required. Text to use within the disclosed part of the accordion item element. If `html` is provided, the `text` argument will be ignored.
  - name: html
    type: string
    required: true
    description: If `text` is set, this is not required. HTML to use within the disclosed part of the accordion item element. If `html` is provided, the `text` argument will be ignored.
  - name: id
    type: string
    required: false
    description: Id to add to the item. Not required, but recommended to improve the accessibility.
  - name: open
    type: boolean
    required: false
    description: If true, accordion item will be expanded.
  - name: disabled
    type: boolean
    required: false
    description: If true, accordion item will be disabled and will not show the show/hide control.
  - name: status
    type: string
    required: false
    description: Available values: `current`,`past`,`pending`,`muted`, `currentmuted`. Defaults to `past`. If `current`, the item will show with primary border and white background. If `past`, the item will show with primary color. If `pending` the item has neutral color and dashed line. If `muted` the item has neutral color and background. `currentmuted` is like `current` but with `muted` styles.
  - name: show
    type: object
    required: false
    description: Options to customize the show info
    params:
    - name: text
      type: string
      required: true
      description: If `html` is set, this is not required. Text to use in show info. If `html` is provided, the `text` argument will be ignored.
    - name: html
      type: string
      required: true
      description: If `text` is set, this is not required. HTML to use within the show info. If `html` is provided, the `text` argument will be ignored.
    - name: classes
      type: string
      required: false
      description: Classes to add to the show info.
  - name: hide
    type: object
    required: false
    description: Options to customize the hide info
    params:
    - name: text
      type: string
      required: true
      description: If `html` is set, this is not required. Text to use in hide info. If `html` is provided, the `text` argument will be ignored.
    - name: html
      type: string
      required: true
      description: If `text` is set, this is not required. HTML to use within the hide info. If `html` is provided, the `text` argument will be ignored.
    - name: classes
      type: string
      required: false
      description: Classes to add to the hide info.
  - name: classes
    type: string
    required: false
    description: Classes to add to the accordion item element.
  - name: attributes
    type: object
    required: false
    description: HTML attributes (for example data attributes) to add to the accordion item.
- name: classes
  type: string
  required: false
  description: Classes to add to the accordion container.
- name: attributes
  type: object
  required: false
  description: HTML attributes (for example data attributes) to add to the accordion container.
              
            

Por defecto

Si abres uno, se cierran el resto. Una vez que abres un item, se mantiene al menos un item abierto. Asume que allowmultiple: false y allowToggle: false aunque no se defina expresamente.

Mostrar códigodel ejemplo: Por defecto

Contenido

Nunjucks macro

{% from "components/accordion-history/_macro.accordion-history.njk" import componentAccordionHistory %}

{{ componentAccordionHistory({
  "idPrefix": "accordion-example",
  "headingLevel": 3,
  "items": [
    {
      "headerText": "Item de acordeón 1",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>"
    },
    {
      "headerText": "Item de acordeón 2",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>"
    },
    {
      "headerText": "Item de acordeón 3",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>"
    }
  ]
}) }}

Con estado

Usa el parámetro "status": past/current/pending para establecer su apariencia de estado pasado, actual, pendiente. Usa el parámetro "status": muted/currentmuted para establecer su apariencia de estado muteado, actual muteado, que lo utilizamos para eventos sobre los que ya no se puede actuar.

Mostrar códigodel ejemplo: Con estado

Contenido

Nunjucks macro

{% from "components/accordion-history/_macro.accordion-history.njk" import componentAccordionHistory %}

{{ componentAccordionHistory({
  "idPrefix": "accordion-status",
  "headingLevel": 3,
  "items": [
    {
      "headerText": "Item de acordeón muteado",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>",
      "status": "muted"
    },
    {
      "headerText": "Item de acordeón actual muteado",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>",
      "status": "currentmuted"
    },
    {
      "headerText": "Item de acordeón pasado",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>",
      "status": "past"
    },
    {
      "headerText": "Item de acordeón actual",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>",
      "status": "current"
    },
    {
      "headerText": "Item de acordeón pendiente",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>",
      "status": "pending"
    }
  ]
}) }}

Permite múltiples

Permite tener abiertos varios items a la vez sin cerrar automáticamente ninguno. Define allowmultiple: true y asume que allowToggle: true.

Mostrar códigodel ejemplo: Permite múltiples

Contenido

Nunjucks macro

{% from "components/accordion-history/_macro.accordion-history.njk" import componentAccordionHistory %}

{{ componentAccordionHistory({
  "idPrefix": "allowmultiple-example",
  "headingLevel": 3,
  "allowMultiple": true,
  "items": [
    {
      "headerText": "Item de acordeón 1",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>"
    },
    {
      "headerText": "Item de acordeón 2",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>"
    },
    {
      "headerText": "Item de acordeón 3",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>"
    }
  ]
}) }}

Permite cerrar

Si abres uno, se cierran el resto. Permite que cierres el que está abierto para que queden todos cerrados. Define allowToggle: true y asume que allowMultiple: false.

Mostrar códigodel ejemplo: Permite cerrar

Contenido

Nunjucks macro

{% from "components/accordion-history/_macro.accordion-history.njk" import componentAccordionHistory %}

{{ componentAccordionHistory({
  "idPrefix": "allowtoggle-example",
  "headingLevel": 3,
  "allowToggle": true,
  "showControl": false,
  "items": [
    {
      "headerText": "Item de acordeón 1",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>"
    },
    {
      "headerText": "Item de acordeón 2",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>"
    },
    {
      "headerText": "Item de acordeón 3",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>"
    }
  ]
}) }}

Con un item abierto

Podemos abrir inicialmente un item si le añadimos el parámetro "open": true. También puedes usar con javascript la función global activateItemAccordion(elementMenu, activeItemId) para abrir un item, usando sus ids. Ej: Abre la consola del navegador y escribe activateItemAccordion("accordion-history", "with-one-item-opened-example-1-title") para cerrar el item actual y abrir el primer item de este ejemplo.

Mostrar códigodel ejemplo: Con un item abierto

Contenido

Nunjucks macro

{% from "components/accordion-history/_macro.accordion-history.njk" import componentAccordionHistory %}

{{ componentAccordionHistory({
  "idPrefix": "with-one-item-opened-example",
  "headingLevel": 3,
  "allowToggle": true,
  "items": [
    {
      "headerText": "Item de acordeón 1",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>"
    },
    {
      "headerText": "Item de acordeón 2",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>",
      "open": true
    },
    {
      "headerText": "Item de acordeón 3",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>"
    }
  ],
  "attributes": {
    "id": "accordion-history"
  }
}) }}

Con 2 items abiertos

Podemos abrir inicialmente items si les añadimos el parámetro "open": true. También puedes usar con javascript la función global activateItemAccordion(elementMenu, activeItemsIds) para abrir varios items, usando sus ids. Ej: Abre la consola del navegador y escribe activateItemAccordion("accordion-history-multiple", ["with-2-items-opened-example-2-title", "with-2-items-opened-example-3-title"]).

Mostrar códigodel ejemplo: Con 2 items abiertos

Contenido

Nunjucks macro

{% from "components/accordion-history/_macro.accordion-history.njk" import componentAccordionHistory %}

{{ componentAccordionHistory({
  "idPrefix": "with-2-items-opened-example",
  "headingLevel": 3,
  "allowMultiple": true,
  "items": [
    {
      "headerText": "Item de acordeón 1",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>",
      "open": true
    },
    {
      "headerText": "Item de acordeón 2",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>"
    },
    {
      "headerText": "Item de acordeón 3",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>",
      "open": true
    }
  ],
  "attributes": {
    "id": "accordion-history-multiple"
  }
}) }}

Deshabilitados con allowtoggle y allowmultiple

Ocultará la infomación de mostrar/ocultar y deshabilitará el item para no poder ser clicado. Usando el parámetro "disabled": true.

Mostrar códigodel ejemplo: Deshabilitados con allowtoggle y allowmultiple

Contenido

Nunjucks macro

{% from "components/accordion-history/_macro.accordion-history.njk" import componentAccordionHistory %}

{{ componentAccordionHistory({
  "idPrefix": "accordion-disabled",
  "headingLevel": 3,
  "allowToggle": true,
  "allowMultiple": true,
  "items": [
    {
      "headerText": "Item de acordeón not deshabilitado",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>"
    },
    {
      "headerText": "Item de acordeón deshabilitado",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>",
      "disabled": true
    },
    {
      "headerText": "Item de acordeón disabled and open",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>",
      "disabled": true,
      "open": true
    }
  ]
}) }}

Con encabezado

Usa el parámetro "heading" para añadir un encabezado asociado al componente. Usa el parámetro "headingLevel" para establecer el nivel del encabezado. Por ejemplo: "headingLevel": 3 creará un encabezado <h3>.

Encabezado de acordeón

Mostrar códigodel ejemplo: Con encabezado

Contenido

Nunjucks macro

{% from "components/accordion-history/_macro.accordion-history.njk" import componentAccordionHistory %}

{{ componentAccordionHistory({
  "idPrefix": "heading-example",
  "headingLevel": 3,
  "heading": {
    "text": "Encabezado de acordeón"
  },
  "items": [
    {
      "headerText": "Item de acordeón 1",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>"
    },
    {
      "headerText": "Item de acordeón 2",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>"
    },
    {
      "headerText": "Item de acordeón 3",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>"
    }
  ]
}) }}

Con encabezado de nivel 4

Usa el parámetro "heading" para añadir un encabezado asociado al componente. Usa el parámetro "headingLevel" para establecer el nivel del encabezado. En este ejemplo: "headingLevel": 4 creará un encabezado de componente <h4> y los botones interiores tendrán los siguientes niveles de encabezado para conservar la jerarquía de encabezados correspondiente: en este caso <h5>.

This header starts with h4

Mostrar códigodel ejemplo: Con encabezado de nivel 4

Contenido

Nunjucks macro

{% from "components/accordion-history/_macro.accordion-history.njk" import componentAccordionHistory %}

{{ componentAccordionHistory({
  "idPrefix": "accordion-heading-level-example",
  "headingLevel": 4,
  "heading": {
    "text": "This header starts with h4"
  },
  "items": [
    {
      "headerText": "This is Item 1 with h5",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>"
    },
    {
      "headerText": "This is Item 2 with h5",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>"
    },
    {
      "headerText": "This is Item 3 with h5",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>"
    }
  ]
}) }}

Con encabezado y controles de mostrar todo

Usa el parámetro "showControl": true para mostrar un controlador que permite mostrar/ocultar todos los items de una vez.

Encabezado de acordeón

Mostrar códigodel ejemplo: Con encabezado y controles de mostrar todo

Contenido

Nunjucks macro

{% from "components/accordion-history/_macro.accordion-history.njk" import componentAccordionHistory %}

{{ componentAccordionHistory({
  "idPrefix": "heading-and-show-controls-example",
  "headingLevel": 3,
  "heading": {
    "text": "Encabezado de acordeón"
  },
  "showControl": true,
  "allowMultiple": true,
  "items": [
    {
      "headerText": "Item de acordeón 1",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>"
    },
    {
      "headerText": "Item de acordeón 2",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>",
      "open": true
    },
    {
      "headerText": "Item de acordeón 3",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>"
    }
  ]
}) }}

Mostrar todo u ocultar todo con javascript

Es necesario usar el parámetro "showControl": true. Puedes usar con javascript la función global activateAllAccordion(element, show), para mostrar u ocultar todos los items, usando el id del botón, el parámetro show admite true o false, si le pasamos true se mostrarán todos los items expandidos, y si le pasamos false se mostrarán cerrados. Ej: Abre la consola del navegador y escribe activateAllAccordion("show-all-accordion-history-button-js", true) para mostrar todos los items expandidos.

Encabezado de acordeón

Mostrar códigodel ejemplo: Mostrar todo u ocultar todo con javascript

Contenido

Nunjucks macro

{% from "components/accordion-history/_macro.accordion-history.njk" import componentAccordionHistory %}

{{ componentAccordionHistory({
  "idPrefix": "show-all-accordion-example-history-js",
  "id": "show-all-accordion-history-button-js",
  "headingLevel": 3,
  "heading": {
    "text": "Encabezado de acordeón"
  },
  "showControl": true,
  "allowMultiple": true,
  "items": [
    {
      "headerText": "Item de acordeón 1",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>"
    },
    {
      "headerText": "Item de acordeón 2",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>",
      "open": true
    },
    {
      "headerText": "Item de acordeón 3",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>"
    }
  ]
}) }}

Con controles personalizados para mostrar/ocultar

Usa los parámetros "show" y "hide" para personalizar los controles que permiten abrir cada item. El último item de este ejemplo no muestra ningún controlador visible.

Mostrar códigodel ejemplo: Con controles personalizados para mostrar/ocultar

Contenido

Nunjucks macro

{% from "components/accordion-history/_macro.accordion-history.njk" import componentAccordionHistory %}

{{ componentAccordionHistory({
  "idPrefix": "accordion-show-hide",
  "headingLevel": 3,
  "allowMultiple": true,
  "items": [
    {
      "headerText": "Item de acordeón 1",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>",
      "show": {
        "text": "Expandir detalles"
      },
      "hide": {
        "text": "Contraer"
      }
    },
    {
      "headerText": "Item de acordeón 2",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>",
      "show": {
        "html": "<svg class=\"w-4 h-4\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 48 48\"><path d=\"M14 7a1 1 0 0 0-1-1H8.25A.25.25 0 0 1 8 5.75V1a1 1 0 0 0-2 0v4.75a.25.25 0 0 1-.25.25H1a1 1 0 0 0 0 2h4.75a.25.25 0 0 1 .25.25V13a1 1 0 0 0 2 0V8.25A.25.25 0 0 1 8.25 8H13a1 1 0 0 0 1-1Z\" fill=\"currentColor\" transform=\"scale(3.42857)\"/></svg>"
      },
      "hide": {
        "html": "<svg class=\"w-4 h-4\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 48 48\"><path d=\"M13 8H1a1 1 0 0 1 0-2h12a1 1 0 0 1 0 2Z\" fill=\"currentColor\" transform=\"scale(3.42857)\"/></svg>"
      }
    },
    {
      "headerText": "Item de acordeón 3",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>",
      "show": {
        "text": ""
      },
      "hide": {
        "text": ""
      }
    }
  ]
}) }}

Con html en las cabeceras de los items

Podemos añadir texto adicional bajo las cabeceras de los items. Para evitar problemas de eventos el el click, usamos la clase pointer-events-none en los subelementos.

Mostrar códigodel ejemplo: Con html en las cabeceras de los items

Contenido

Nunjucks macro

{% from "components/accordion-history/_macro.accordion-history.njk" import componentAccordionHistory %}

{{ componentAccordionHistory({
  "idPrefix": "accordion-example-pointer-events-none",
  "headingLevel": 3,
  "items": [
    {
      "headerHtml": "<span class=\"block pointer-events-none\">Item de acordeón 1</span><span class=\"block pointer-events-none font-normal\">El subelemento también recibe eventos</span>",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>"
    },
    {
      "headerHtml": "<span class=\"block pointer-events-none\">Item de acordeón 2</span><span class=\"block pointer-events-none font-normal\">El subelemento también recibe eventos</span>",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>"
    },
    {
      "headerHtml": "<span class=\"block pointer-events-none\">Item de acordeón 3</span><span class=\"block pointer-events-none font-normal\">El subelemento también recibe eventos</span>",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>"
    }
  ]
}) }}

Con clases de css aplicadas

Los parámetros classes nos permiten aplicar clases de Tailwind CSS a nuestro componente.

Mostrar códigodel ejemplo: Con clases de css aplicadas

Contenido

Nunjucks macro

{% from "components/accordion-history/_macro.accordion-history.njk" import componentAccordionHistory %}

{{ componentAccordionHistory({
  "idPrefix": "classes-example",
  "headingLevel": 3,
  "classes": "px-lg pt-base border-t border-b border-neutral-base",
  "items": [
    {
      "headerText": "Item de acordeón 1",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>"
    },
    {
      "headerText": "Item de acordeón 2",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-white rounded-lg h-40\"></div></div>",
      "classes": "p-sm bg-primary-light",
      "open": true
    },
    {
      "headerText": "Item de acordeón 3",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>"
    }
  ]
}) }}

Con atributos aplicados

Los parámetros attributes nos permiten aplicar atributos de HTML a nuestro componente, como por ejemplo id o etiquetas ARIA como aria-label. Mira el código para ver los atributos aplicados.

Mostrar códigodel ejemplo: Con atributos aplicados

Contenido

Nunjucks macro

{% from "components/accordion-history/_macro.accordion-history.njk" import componentAccordionHistory %}

{{ componentAccordionHistory({
  "idPrefix": "attributes-example",
  "headingLevel": 3,
  "attributes": {
    "id": "accordion-test"
  },
  "items": [
    {
      "headerText": "Item de acordeón 1",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>",
      "attributes": {
        "data-attr": "accordion-item-test-a"
      }
    },
    {
      "headerText": "Item de acordeón 2",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>",
      "attributes": {
        "data-attr": "accordion-item-test-b"
      }
    },
    {
      "headerText": "Item de acordeón 3",
      "html": "<div class=\"w-48 p-2\"><div class=\"border-4 border-dashed border-neutral-light rounded-lg h-40\"></div></div>",
      "attributes": {
        "data-attr": "accordion-item-test-c"
      }
    }
  ]
}) }}