Collapse
Overview
Features
- Create collapsible content sections with smooth animations
- Support for accordion mode (only one section open at a time)
- Customizable headers and content areas
- Built-in toggle buttons with click events
- Programmatic control over collapse state
- Smooth height and opacity transitions
Usage
axCollapseGroup
: The container for collapsible itemsaxCollapseItem
: Individual collapsible sectionsaxCollapseItemHeader
: The header section of a collapsible itemaxCollapseItemContent
: The collapsible content areaaxCollapseCloseButton
: A button to toggle the collapse state
Basic Example (HTML)
Accordion Mode (HTML)
Usage in Component (TypeScript)
Options
Directive Options
Best Practices
- Use the accordion mode when you want only one section open at a time
- Include clear visual indicators for the collapse/expand state
- Ensure headers are descriptive and clearly indicate the content they control
- Consider adding keyboard navigation support for accessibility
- Use appropriate transition durations for smooth animations