accordion-usage

Build accessible collapsible sections in React using Zag.js Accordion components.

2|Updated Dec 2, 2024
One-click install
npx skills add https://github.com/TechsioCZ/new-engine --skill accordion-usage
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: accordion-usage
Source: https://github.com/TechsioCZ/new-engine/tree/main/libs/ui/skills/accordion-usage
Command: npx skills add https://github.com/TechsioCZ/new-engine --skill accordion-usage

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provide a cohesive, accessible way to implement collapsible content sections in React apps using Zag.js-backed compound accordion components.

Core Features & Use Cases

  • Zag.js-backed compound anatomy with Accordion.Item, Accordion.Header, Accordion.Content, and optional indicators, titles, and subheaders.
  • Supports variant, shadow, size, value, multiple, and collapsible props to control behavior and presentation.
  • Real-world scenarios include FAQs, settings panels, and documentation sections that require expandable content.

Quick Start

Import the Accordion component from the UI kit and render an example with Accordion.Item, Accordion.Header, and Accordion.Content.

Frequently Asked Questions about accordion-usage

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Can I use Zag.js to create multiple expandable sections in a React UI kit?

Yes, you can control accordion behavior using the multiple and collapsible props. The multiple prop allows several accordion items to remain open simultaneously, while the collapsible prop enables users to toggle open items closed.

How do I structure collapsible FAQ panels in React?

Structure collapsible FAQ panels using a compound component anatomy with Accordion.Item, Accordion.Header, and Accordion.Content. This pattern ensures accessible expandable content sections that integrate seamlessly into your React design system.

Does this accordion component support size and variant props?

Yes, the accordion component supports variant, shadow, and size props to control presentation and visual styling. These props allow you to customize the accordion's appearance within your React UI kit.

When should I use a compound accordion component for settings panels?

Use a compound accordion component for settings panels when you need a cohesive, accessible way to organize expandable content. The compound anatomy with optional indicators and subheaders provides consistent structure for complex documentation or configuration sections.