Accordion for Angular
Introduction
Section titled “Introduction”Vertically stacked headings that each show or hide a section of content (WAI-ARIA APG Accordion), built on native headings and buttons, with single or multiple expansion and an animated height transition.
- Single or multipleExpand one section at a time or several at once.
- Real headingsTriggers sit in headings at the level you choose, for document structure.
- Keyboard supportArrow keys, Home, and End move between section headers.
- Disabled sectionsIndividual sections can be disabled while staying visible.
Behavior, design tokens, and limitations are described on the Accordion page; this page covers the Angular API.
Live example
Section titled “Live example”import { Component } from '@angular/core';import type { AccordionItem } from '@absoluteui/components/accordion';import { AuiAccordion } from '@absoluteui/angular/accordion';
@Component({ selector: 'app-faq', imports: [AuiAccordion], template: `<aui-accordion [items]="items" [headingLevel]="2" [value]="open" (changed)="open = $event.value"></aui-accordion>`,})export class FaqComponent { open: string[] = ['shipping']; readonly items: AccordionItem[] = [ { id: 'shipping', title: 'Shipping', content: 'Orders ship within two business days.' }, { id: 'returns', title: 'Returns', content: 'Returns are free for 30 days.' }, ];}Install and start
Section titled “Install and start”npm install @absoluteui/angular @absoluteui/components @absoluteui/core @absoluteui/themeSetup with provideAbsoluteUI() is covered in Getting started. Styles are included with the component.
import { AuiAccordion } from '@absoluteui/angular/accordion';Defaults for every instance: provideAbsoluteUIConfig({ components: { accordion: { ... } } }) (see Configuration).
API reference
Section titled “API reference”<aui-accordion>
Section titled “<aui-accordion>”Class AuiAccordion; template reference #ref="auiAccordion".
Server rendering: Renders on the server; the browser re-creates it after hydration.
Inputs
Section titled “Inputs”| Input | Type | Default | Description |
|---|---|---|---|
items |
readonly AccordionItem[] |
Required. Items with unique ids. Titles and string content render as text. | |
icons |
Partial<AccordionIcons> |
Icon slot overrides. | |
multiple |
boolean |
false |
Allow several panels open at once; otherwise expanding one collapses the others. |
collapsible |
boolean |
true |
Single mode: the open panel can be collapsed. When false its header is aria-disabled. |
headingLevel |
AccordionHeadingLevel |
'3' |
Heading element wrapping each header button. |
Two-way bindings
Section titled “Two-way bindings”| Model | Type | Change output | Description |
|---|---|---|---|
[(value)] |
readonly string[] |
(valueChange) |
Expanded item ids (at most one when multiple is false). |
Outputs
Section titled “Outputs”| Output | Payload | Description |
|---|---|---|
(changed) |
AccordionChangeDetail |
The user expanded or collapsed an item. Re-emits aui-change. |
Methods
Section titled “Methods”Call them through a viewChild query or a template reference.
| Method | Description |
|---|---|
panel(id: string): HTMLDivElement | null | undefined |
Content container of an item’s panel. |
expand(id: string): void |
Expand programmatically (no events); collapses others in single mode. |
collapse(id: string): void |
Collapse programmatically (no events), even when not collapsible. |
toggle(id: string): void |
Expand or collapse programmatically (no events). |
Accessibility and performance
Section titled “Accessibility and performance”Pattern: WAI-ARIA APG Accordion pattern: native heading elements containing native buttons that control panels.
The Angular component renders the framework-neutral component, so its keyboard support, roles, WCAG 2.2 criteria, budgets, and import cost apply unchanged: see Accordion: Accessibility and performance.
(c) 2026 Kasadara Technology Solutions Pvt Ltd. AbsoluteUI is free to use under the AbsoluteUI Free Use License; it is not open source.