Collapse

Content folded behind its own heading, one panel or several, with an accordion mode that keeps one panel open at a time.

Basic

Pass items a list of panels, each with a label and children, and defaultActiveKey to open some of them at first.

Accordion

Set accordion to keep at most one panel open, so opening a panel closes the one that was open before.

Sizes

Set size to small, medium or large to change the header and body padding, from a dense settings list to a roomy FAQ.

Borderless

Set bordered={false} to drop the outer frame and keep only the lines between panels, on a light fill.

Ghost

Set ghost to remove the frame, the fill and the lines, so the panels sit on whatever surface is behind them.

Icon as the trigger

Set collapsible="icon" so only the arrow toggles a panel, which leaves the rest of the header free for links and controls.

Disabled panel

Set collapsible: "disabled" on an item to lock that one panel, or set it on the Collapse to lock all of them.

Custom expand icon

Pass expandIcon a function of isActive to draw your own icon, like a plus that turns into a minus when the panel opens.

Icon at the end

Set expandIconPlacement="end" to move the arrow to the end of the header, on the side opposite the label.

Icon in the label

Put an Icon in an item's label to mark the panel next to its title, like a star or a status check.

Extra content

Pass an item's extra a node for the end of its header, like a count or an edit button, and stop its clicks from toggling the panel.

Hidden arrow

Set showArrow: false on an item to hide its expand icon, and a click on the header still toggles the panel.

Nested

Put a ghost Collapse in a panel's children to nest a second level of panels without doubling the frame.

Numbered panels

Number the panels with a CSS counter in className, so reordering items renumbers them with no index in the data.

Card accordion

Style the open item through className so it lifts off the page as a card, with ghost clearing the default lines.

Tinted accordion

Give the open item a neutral fill and rounded corners instead of a shadow, with ghost clearing the default lines.

In context

The component inside real screens, with the components it usually sits beside.

FAQ list

A flat FAQ with the arrows at the end and the header padding removed, so each question lines up with its answer.

Onboarding checklist

A setup checklist in accordion panels, with each group's progress in its header so the whole flow reads while the panels are closed.

Header as a row

Headers that work as rows: a checkbox over a loading body, an edit button, and a label split into a name and a total.

API Reference

Collapse
Collapse's props. Rows marked antuikit in the Version column are added by the kit.
ItemType
ItemType's props.