Accordions

The Accordion component allows you to create expandable sections in your documentation. Content within accordions is searchable using browser search (cmd+f) even when collapsed. The component is optimized for SEO with server-side HTML generation, ensuring search engines can properly index all content within accordions.

This is an example of an accordion component. When clicked, it expands to reveal this additional content.

Accordion open by default

You can use the defaultOpen property to have specific accordions expanded by default when the page loads. This is useful for highlighting important information or frequently accessed content.

Properties

title
stringRequired

The title shown in the accordion header

children
string | JSXRequired

The content to be displayed when the accordion is expanded. Can include text, markdown, and components.

defaultOpen
boolean

Whether the accordion should be open when the page loads. If not specified, the accordion will be collapsed by default.