
syncfusion-react-accordion
Guide users to implement Syncfusion React Accordion component for collapsible content panels. Use this skill whenever the user needs to create expandable/collapsible sections, accordion layouts, tabbed content panels, multi-step forms, FAQs, or navigation with expandable items. Covers component setup, expand modes, animations, dynamic content loading, styling, events, lifecycle, React hooks integration, and complete API reference.
- Installs
- 622
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/syncfusion/react-ui-components-skills --skill syncfusion-react-accordion- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads syncfusion-react-accordion automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Implementing Syncfusion React Accordion
The React Accordion component provides a clean, organized way to display content in collapsible panels. It's perfect for creating expandable content sections, FAQs, multi-step forms, and navigation menus with minimal code.
Component Overview
The Accordion component renders a stack of collapsible panels where:
- Each panel has a header (clickable to toggle) and content area
- Headers can be simple text or custom templates
- Content can be static, dynamic, or rendered from other React components
- Supports single expand mode (one panel at a time) or multiple (many panels at once)
- Built-in animations for smooth expand/collapse transitions
- Full keyboard navigation and accessibility support
Documentation and Navigation Guide
Getting Started
📄 Read: references/getting-started.md
When to read: First time setting up the Accordion component
- Package installation (@syncfusion/ej2-react-navigations)
- CSS imports and theme configuration (Tailwind, Bootstrap)
- Two initialization methods (Items API vs HTML markup)
- Item configuration (header, content, cssClass, disabled, expanded)
- Basic component setup with examples
- First render and minimal working example
Expand Modes
📄 Read: references/expand-modes.md
When to read: Controlling which panels expand at the same time
- Single expand mode (only one panel open at a time)
- Multiple expand mode (default, many panels can be open)
- Setting initial expanded state with
expandedIndicesproperty - Toggle behavior on header click
- Use cases for choosing each mode
- Keeping single pane open always pattern
Animation Effects
📄 Read: references/animation-effects.md
When to read: Customizing panel transitions and visual effects
- Default animations (SlideDown for expand, SlideUp for collapse)
- Choosing from available animation effects (FadeIn, ZoomIn, etc.)
- Configuring easing and duration properties
- Separate expand/collapse animation control
- Disabling animations entirely
- Performance considerations
Content Loading
📄 Read: references/content-loading.md
When to read: Loading content dynamically or from external sources
- Loading accordion items dynamically with
addItem()method - Loading content from data sources (dataSource property)
- Fetching content via HTTP requests and POST
- Template-based rendering (headerTemplate, itemTemplate)
- Rendering other React components inside panels
- Lazy loading and deferred content patterns
Events & Lifecycle
📄 Read: references/events-lifecycle.md
When to read: Handling user interactions and component lifecycle
- Component lifecycle events (created, destroyed)
- Expand/collapse events (expanding, expanded)
- Click event handling (clicked)
- Event arguments and properties
- Preventing default actions with event.cancel
- Real-world event patterns and examples
Styling & Customization
📄 Read: references/styling-customization.md
When to read: Customizing appearance and integrating with design systems
- CSS classes for styling (header, panel, content areas)
- Built-in theme options and theme switching
- Custom styling with CSS and utilities (Tailwind, Bootstrap)
- RTL (right-to-left) support
- Responsive design patterns
- Using cssClass property for custom styling
Advanced Features
📄 Read: references/advanced-features.md
When to read: Building complex layouts and optimizing performance
- Component methods (expandItem, enableItem, hideItem, etc.)
- Nested accordions and hierarchical structures
- React hooks integration (useState, useRef, useEffect)
- Keyboard navigation behavior
- Accessibility features (ARIA attributes, screen readers)
- Performance optimization for large accordion lists
- Custom expand/collapse action patterns
Quick Start Example
Basic accordion with three collapsible panels:
import React from 'react';
import { AccordionComponent, AccordionItemDirective, AccordionItemsDirective } from '@syncfusion/ej2-react-navigations';
import '@syncfusion/ej2-base/styles/tailwind3.css';
import '@syncfusion/ej2-buttons/styles/tailwind3.css';
import '@syncfusion/ej2-popups/styles/tailwind3.css';
import '@syncfusion/ej2-react-navigations/styles/tailwind3.css';
export default function App() {
return (
<AccordionComponent expandMode='Multiple'>
<AccordionItemsDirective>
<AccordionItemDirective
header='HTML'
content='HTML is a markup language used to create web pages.'
/>
<AccordionItemDirective
header='CSS'
content='CSS is used to style HTML elements and create layouts.'
/>
<AccordionItemDirective
header='JavaScript'
content='JavaScript adds interactivity to web applications.'
/>
</AccordionItemsDirective>
</AccordionComponent>
);
}
Common Patterns
Pattern 1: FAQ Section (Single Expand Mode)
Questions automatically collapse when a new one is opened:
<AccordionComponent expandMode='Single'>
<AccordionItemsDirective>
<AccordionItemDirective header='What is React?' content='React is a JavaScript library for building UIs with components.' />
<AccordionItemDirective header='What is JSX?' content='JSX is a syntax extension for writing HTML-like code in JavaScript.' />
</AccordionItemsDirective>
</AccordionComponent>
Pattern 2: Persistent Expansion (Multiple Mode)
All panels can remain expanded simultaneously:
<AccordionComponent expandMode='Multiple'>
<AccordionItemsDirective>
<AccordionItemDirective expanded={true} header='Features' content='...' />
<AccordionItemDirective expanded={true} header='Installation' content='...' />
</AccordionItemsDirective>
</AccordionComponent>
Pattern 3: Default Expanded State
Pre-expand specific panels on load:
<AccordionItemDirective
expanded={true}
header='Quick Start'
content='This section opens by default.'
/>
Key Props & Methods
Component Properties
| Property | Type | Purpose | Default |
|---|---|---|---|
expandMode | 'Single' | 'Multiple' | Control single/multiple panel expansion | 'Multiple' |
expandedIndices | number[] | Array of indices for initially expanded items | [] |
animation | AnimationSettings | Expand/collapse animation config | SlideDown/SlideUp |
dataSource | Object[] | Array of items for data binding | [] |
headerTemplate | string | function | Custom header template for all items | null |
itemTemplate | string | function | Custom item template for rendering | null |
height | string | number | Component height in px/% | 'auto' |
width | string | number | Component width in px/% | '100%' |
enableHtmlSanitizer | boolean | Sanitize untrusted HTML content | true |
enablePersistence | boolean | Persist expanded state between reloads | false |
enableRtl | boolean | Enable right-to-left layout | false |
locale | string | Locale code for internationalization | '' |
Item Properties
| Property | Type | Purpose | Default |
|---|---|---|---|
header | string | Item header text (accepts HTML) | - |
content | string | Item content text (accepts HTML) | - |
expanded | boolean | Set initial expanded state for item | false |
disabled | boolean | Disable specific accordion item | false |
cssClass | string | Custom CSS classes for item | - |
Component Methods
| Method | Parameters | Purpose |
|---|---|---|
addItem() | item, index (optional) | Add new accordion item(s) |
removeItem() | index | Remove item at specified index |
enableItem() | index, isEnable | Enable/disable specific item |
hideItem() | index, isHidden | Show/hide specific item |
expandItem() | isExpand, index (optional) | Expand/collapse items |
select() | index | Set focus to item header |
destroy() | none | Remove component from DOM |
Common Use Cases
| Use Case | Mode | Key Feature |
|---|---|---|
| FAQ Section | Single | Only one question visible at a time |
| Settings Panel | Multiple | Check multiple options simultaneously |
| Multi-Step Form | Single | Guide user through steps sequentially |
| Content Organizer | Multiple | Browse multiple topics at once |
| Navigation Menu | Single | Tree-like hierarchical navigation |
| Data Dashboard | Multiple | View multiple data sections together |
Next Steps
- Start with Getting Started to set up your first Accordion
- Choose Expand Mode based on your use case
- Add Animations for polish and user feedback
- Load Content Dynamically if using data sources
- Customize Styling to match your design system
- Explore Advanced Features for complex scenarios
Need help? Check the specific reference files above based on what you're trying to build!
FAQ
What does the syncfusion-react-accordion skill do?
Guide users to implement Syncfusion React Accordion component for collapsible content panels. Use this skill whenever the user needs to create expandable/collapsible sections, accordion layouts, tabbed content panels, multi-step forms, FAQs, or navigation with expandable items. Covers component setup, expand modes, animations, dynamic content loading, styling, events, lifecycle, React hooks integration, and complete API reference.
How do I install syncfusion-react-accordion?
Run npx skills add https://github.com/syncfusion/react-ui-components-skills --skill syncfusion-react-accordion in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/syncfusion-react-accordion/ (personal) or .claude/skills/syncfusion-react-accordion/ (project).
Which AI agents can use syncfusion-react-accordion?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is syncfusion-react-accordion safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains syncfusion-react-accordion?
It is published by syncfusion in syncfusion/react-ui-components-skills. It has 622 recorded installs.
More from syncfusion/react-ui-components-skills
syncfusion-react-grid
syncfusion/react-ui-components-skills
Implements Syncfusion React Grid component for feature-rich data tables and grids. Use this when working with data display, sorting, filtering, grouping, aggregates, editing, or exporting. This skill covers grid configuration, CRUD operations, virtual scrolling or infinite scrolling, hierarchy grids, state persistence, and advanced data management features for data-intensive applications.
syncfusion-react-scheduler
syncfusion/react-ui-components-skills
Implement Syncfusion React Scheduler component for calendar, event scheduling, and appointment management. Use this when building scheduling systems, calendar applications, booking systems, or time management interfaces. Covers all scheduler views (Day, Week, Month, Timeline, Agenda, Year), data binding, resource scheduling, recurring events, CRUD operations, drag-and-drop scheduling, customization, accessibility, and advanced features.
syncfusion-react-gantt-chart
syncfusion/react-ui-components-skills
Implement, configure, and customize the Syncfusion React Gantt Chart component. Use this when building project scheduling applications with task timelines, dependencies, resource management, and calendar-driven scheduling. Covers GanttComponent setup, task constraints, taskbar customization, filtering, sorting, Excel/PDF export, critical path analysis, milestones, predecessors, resource view, baseline tracking, and task calendar configuration.
syncfusion-react-rich-text-editor
syncfusion/react-ui-components-skills
Implements the Syncfusion React Rich Text Editor (RichTextEditorComponent) from ej2-react-richtexteditor, supporting HTML (WYSIWYG) and Markdown editing. Use this skill for toolbar configuration, image/video/audio insertion, paste cleanup, AI assistant integration, emoji picker, slash menu, mentions, import/export Word/PDF, form validation, and source code view in React applications.
syncfusion-react-charts
syncfusion/react-ui-components-skills
Implement Syncfusion React Charts component for data visualization. Use this when creating charts, configuring axes and series, or customizing visualization styles. This skill covers chart types, data binding, user interactions, financial indicators, accessibility features, and professional data visualization in React applications.
syncfusion-react-treegrid
syncfusion/react-ui-components-skills
Implements Syncfusion React TreeGrid for hierarchical data with sorting, filtering, editing, exporting, paging, virtual scrolling, and advanced features. Supports configuration, CRUD, aggregates, templates, state persistence, and performance optimization in React applications.
Popular frontend & design skills
setup-matt-pocock-skills
mattpocock/skills
Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.
frontend-design
anthropics/skills
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.
hyperframes-animation
heygen-com/hyperframes
All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.
prototype
mattpocock/skills
Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.
hyperframes-core
heygen-com/hyperframes
The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.
vercel-react-best-practices
vercel-labs/agent-skills
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.