cpn-basic-collapse

Group content into collapsible panels using the UDesign Collapse component.

1|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/UCloud-FE/udesign-cli --skill cpn-basic-collapse
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cpn-basic-collapse
Source: https://github.com/UCloud-FE/udesign-cli/tree/main/skills/cpn-basic-collapse
Command: npx skills add https://github.com/UCloud-FE/udesign-cli --skill cpn-basic-collapse

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Helps AI correctly use the UDesign Collapse component to group content and control visibility, reducing integration errors.

Core Features & Use Cases

  • Group content into collapsible panels to create organized, space-efficient interfaces.
  • Demonstrate proper usage of Collapse.Panel, defaultOpenKeys, and onChange callbacks in examples.
  • Provide safe, framework-aligned guidance that avoids external dependencies.

Quick Start

Wrap content with Collapse and Collapse.Panel to create toggleable sections.

Frequently Asked Questions about cpn-basic-collapse

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

FAQPage Schema
How do I group content into expandable sections in a React UI?

To group content into expandable sections in a React UI, wrap your content with the UDesign Collapse and Collapse.Panel components to create toggleable, space-efficient interfaces.

How do I control visibility for collapsible panels using defaultOpenKeys?

Control visibility for collapsible panels by configuring the defaultOpenKeys property on the Collapse component, which determines which panels remain expanded by default upon initial render.

How do I handle toggle state changes with the onChange callback in a Collapse component?

Handle toggle state changes in a Collapse component by attaching an onChange callback function, which captures the active panel keys whenever a user expands or collapses a section during interaction.

Do I need external libraries to create collapsible panels in UDesign?

No, you do not need external libraries to create collapsible panels in UDesign; the framework provides safe, built-in guidance using Collapse and Collapse.Panel without requiring additional dependencies.

What is the best way to document component demos with expandable sections?

The best way to document component demos with expandable sections is using the UDesign Collapse component to organize content, demonstrating proper usage of defaultOpenKeys and onChange callbacks in examples.