Interactive panels for toggling visibility of content.
Accordion elements help organize information by letting users show or hide sections as needed. They’re an effective way to manage progressive disclosure and simplify navigation through dense or optional content.
You can use the Accordion component directly within your MDX files without any import. The following example shows a basic usage:
<Accordion title="What is MDX?">
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>You can put any content in here, including other components, like code:
class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}The title of the accordion.
The content of the accordion.