The Dynamic Accordion component is a collapsible content container.
It organizes information into expandable and collapsible sections.
Each accordion item (child component) has a title that remains visible.
The content of each section can be expanded or hidden.


Configures the events that the component can trigger and respond to:
"faq-accordion" allows test scripts to reliably locate this component. Configures the events that the component can trigger and respond to:
"faq-accordion" allows test scripts to reliably locate this component. "p-4" adds medium padding on all sides of the accordion for better visual separation from surrounding elements. An accordion is used as a progressive disclosure pattern when content is related but not always needed on screen.
The items hold secondary content that supports, but does not replace, the main content.
Each item title describes one clear topic so the collapsed list is easy to scan, and the localized title property shows the correct label for each language.
A meaningful displayName is set so the accordion can be recognized quickly in the structure panel.
The layout is chosen to match the content.
The layout property is set to "vertical" for stacked reading and forms, while the "horizontal" layout is reserved for short, side-by-side content. Gap classes are used to keep clear spacing between header parts and content.
Padding is applied with paddingClass so content does not touch the container edges and neighboring components still have enough breathing room.
Visibility rules ensure that the accordion appears only when it is relevant, and sections that do not apply to a user are not shown. Sensitive accordions are fully hidden for users without permission. Conditional visibility keeps the layout clean by hiding empty or irrelevant accordions.
Short, descriptive titles in sentence case are written so the title field clearly states what is inside each item.
Internal displayName values are aligned with the visible titles, and the names in the structure panel roughly match what users see in the UI.
Dos
The accordion is used as a progressive disclosure pattern when content is related but not always needed on screen, and the items hold this secondary content.
Each item title describes one clear topic so the collapsed list is easy to scan, using the localized title property for each language.
A meaningful displayName is set so the accordion is easy to recognize in the structure panel, with names such as “Product FAQ” or “Billing sections”.
Don’ts
The accordion is not used for key content that must always be visible, and critical information is not hidden behind expansion.
Unrelated topics are not combined into a single item, and one item does not describe several unrelated subjects.
Generic internal names such as “Accordion 1” are not kept, and machine-like keys or placeholders are not shown to end users.
Dos
The layout is selected to match the content.
The layout property is set to "vertical" for stacked reading and forms, while the "horizontal" layout is used only for short, side-by-side content.
Gap classes are applied to keep clear spacing between header parts and content.
Padding is added with paddingClass so content does not touch the container edges and the accordion has comfortable spacing to nearby components.
Don’ts
Horizontal layout is not forced for long labels or dense forms, so text does not wrap in awkward ways.
Misaligned icons and text are not left in place, and headers do not look uneven because alignItemsClass is missing or inconsistent. Very tight or missing gaps are avoided, and elements do not sit directly against each other when gapClass could provide spacing.
The accordion does not sit directly against neighboring components, and content does not appear cramped because paddingClass is removed or set too small.
Dos
Visibility rules are used so the accordion appears only when it is relevant, and sections that clearly do not apply to a user are not shown.
Sensitive accordions are fully hidden for users without permission.
Conditional visibility keeps the layout clean by hiding accordions that are empty or irrelevant.
Don’ts
Irrelevant accordions are not left visible just because they exist in the template.
Sensitive content is not shown and then blocked only with text such as “no access.”
Accordions are not left visible but empty, and unused shells do not clutter the page when displayConditions can hide them.
Dos
Short, descriptive titles in sentence case are written so the title field clearly states what is inside each item.
Internal displayName values are aligned with the visible titles, and the names shown in the structure panel roughly match what users see in the UI.
Don’ts
Long sentences, technical IDs, or slogans are not used in headers that users must scan quickly.
Completely different internal and external names are not used without a strong reason, so displayName and title do not create confusion for authors or testers.
elements.title). Use plain-language; avoid icon-only labels (elements.title).dataTestId).elements.title, elements.content).ON_INIT, elements).