Files
mintlify__docs/components/accordions.mdx
mintlify[bot] e2787cfd93 Apply brand tone and writing style fixes (#6893)
* docs: standardize documentation writing style

* docs: apply brand tone and style fixes

* docs: refine brand tone and writing style

* Revert changelog.mdx changes

The changelog is generated content and shouldn't be rewritten by the
brand tone and writing style pass.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Update ai/model-context-protocol.mdx

* Update ai/model-context-protocol.mdx

---------

Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com>
Co-authored-by: Ethan Palm <56270045+ethanpalm@users.noreply.github.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-07 16:56:42 -07:00

110 lines
3.0 KiB
Plaintext

---
title: "Accordions"
description: "Use the accordion component to show and hide content sections, organize related information, and enable progressive disclosure in your docs."
keywords: ["accordions", "collapsible content", "expandable sections", "progressive disclosure"]
boost: 3
---
import IconsOptional from "/snippets/icons-optional.mdx";
Use accordions to organize information and progressively disclose content. Users can expand and collapse each section.
When you open an accordion, the URL hash updates, which lets you share direct links to specific accordion sections.
## Single accordion
<Accordion title="I am an Accordion.">
You can put any content in here, including other components, like code:
```java HelloWorld.java
class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
```
</Accordion>
````mdx Accordion example
<Accordion title="I am an Accordion.">
You can put any content in here, including other components, like code:
```java HelloWorld.java
class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
```
</Accordion>
````
## Accordion groups
Group related accordions together using `<AccordionGroup>`. This creates a cohesive section of accordions that can be individually expanded or collapsed.
<AccordionGroup>
<Accordion title="Getting started">
You can put other components inside Accordions.
```java HelloWorld.java
class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
```
</Accordion>
<Accordion title="Advanced features" icon="bot">
Add icons to make accordions more visually distinct and scannable.
</Accordion>
<Accordion title="Troubleshooting">
Keep related content organized into groups.
</Accordion>
</AccordionGroup>
````mdx Accordion Group Example
<AccordionGroup>
<Accordion title="Getting started">
You can put other components inside Accordions.
```java HelloWorld.java
class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
```
</Accordion>
<Accordion title="Advanced features" icon="alien-8bit">
Add icons to make accordions more visually distinct and scannable.
</Accordion>
<Accordion title="Troubleshooting">
Keep related content organized into groups.
</Accordion>
</AccordionGroup>
````
## Properties
<ResponseField name="title" type="string" required>
Title in the Accordion preview.
</ResponseField>
<ResponseField name="description" type="string">
Detail below the title in the Accordion preview.
</ResponseField>
<ResponseField name="defaultOpen" type="boolean" default="false">
Whether the Accordion is open by default.
</ResponseField>
<ResponseField name="id" type="string">
A custom ID for the accordion used for anchor linking. If omitted, defaults to the same value as `title`.
</ResponseField>
<IconsOptional />