Skip to content
Layout

Accordion

Expandable/collapsible sections. Supports multi-expand mode and smooth CSS grid animations.

LlmAccordionGroup + LlmAccordionItem
WCAG AA0 deps

Demo

Live PreviewReact
jsx
<LlmAccordionGroup variant="separated">
  <LlmAccordionItem>
    <span llmAccordionHeader>Question 1</span>
    Answer content goes here.
  </LlmAccordionItem>
  <LlmAccordionItem>
    <span llmAccordionHeader>Question 2</span>
    Another answer here.
  </LlmAccordionItem>
</LlmAccordionGroup>

API (Angular)

PropTypeDefaultDescription
multibooleanfalseAllow multiple items expanded simultaneously
variant'default' | 'bordered' | 'separated''default'Visual style of the group

Composition parts

Accordion is composed from the parts below. Each part is its own component — drop the ones you don't need.

LlmAccordionItem

One expandable section. Mark the header content with the llmAccordionHeader directive; everything else renders as the panel body.

PropTypeDefaultDescription
expandedbooleanfalseControls the expanded state when used as a controlled component.
onExpandedChange(expanded: boolean) => voidCalled when the user toggles the item.
disabledbooleanfalsePrevents toggling.
headingLevel1 | 2 | 3 | 4 | 5 | 63HTML heading level wrapping the trigger. Match your page outline so heading order stays valid (e.g. pass 4 if the accordion is nested under an h3).

Import

ts
import { LlmAccordionGroup, LlmAccordionItem } from '@atelier-ui/angular';

Accessibility

ARIA roleheading + region (disclosure pattern)

KeyAction
TabMove focus between accordion headers.
Enter / SpaceExpand or collapse the focused section.
Arrow Up / DownMove between headers within the same group.
Home / EndJump to the first / last header in the group.
  • Each header is a real button with aria-expanded reflecting state and aria-controls pointing at its panel.
  • Panels have role="region" with aria-labelledby pointing at their header, so the section has a screen-reader landmark.