Skip to main content

<st-items-accordion>

JSON type: ItemsAccordion

A vertical list of collapsible title/content rows; one open at a time unless allow-multiple. Each row's content is Markdown, sanitized. open-first starts with the first row open. The section title is an <h2> and each row title an <h3> wrapping its toggle button, which exposes aria-expanded and aria-controls for the row's panel.

Usage​

import '@sankhyatronics/sankhya-cms/items-accordion'; // registers <st-items-accordion>

Properties​

PropertyAttributeTypeDefaultDescription
titletitlestring''
subtitlesubtitlestring''
items—AccordionItem[][]
allowMultipleallow-multiplebooleanfalse
openFirstopen-firstbooleanfalseStarts with the first row open. Applies when items or this flag changes while nothing is open.

Events​

EventDetailDescription
accordion-toggleCustomEvent

See the live examples in Storybook.