Standard
Basic collapsible panels with toggle controls for size, card view, and always-open mode
Overview of the service and how to begin your application.
Documents and eligibility criteria needed before applying.
Fee schedule and expected processing times.
With Leading Icons
Add icons before each title for visual context and faster scanning
Browse housing programs and check eligibility.
Scholarships, transcripts, and certification exams.
Registration renewal, fines, and driving tests.
Built-in Features
Activates when .nds-accordion is on the page. No JavaScript setup required.
CSS grid transitions with automatic fallback when users prefer reduced motion.
Arrow keys, Home, End, Enter, and Space for full keyboard control.
Public API to open, close, and toggle items. Custom events fire on state change for analytics or dependent UI.
All panels expand automatically so no content is hidden on paper.
High contrast and screen reader support built into every state.
Usage Guidelines
When to Use
- Use accordions to progressively disclose content. Show headings first, let users expand what they need
- Good for FAQs, categorized service lists, and settings panels where users scan then drill down
- Avoid accordions for content users need to compare side-by-side. Use tabs or a flat layout instead
- Keep accordion titles short and scannable. Users decide whether to expand based on the title alone
JavaScript API
The NDS.Accordion API provides methods to create instances, control panels programmatically, and listen for state changes. For dynamically added accordions, call NDS.Accordion.reinit() to initialize new elements.