You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: "A dropdown component to toggle content visibility"
3
+
description: "Collapsible components to show and hide content"
4
4
icon: "chevron-down"
5
5
---
6
6
7
+
Accordions allow users to expand and collapse content sections. Use accordions for progressive disclosure and to organize information.
8
+
9
+
## Single accordion
10
+
7
11
<Accordiontitle="I am an Accordion.">
8
12
You can put any content in here, including other components, like code:
9
13
```java HelloWorld.java
@@ -15,9 +19,7 @@ icon: "chevron-down"
15
19
```
16
20
</Accordion>
17
21
18
-
<RequestExample>
19
-
20
-
````mdx Accordion Example
22
+
````mdx Accordion example
21
23
<Accordiontitle="I am an Accordion.">
22
24
You can put any content in here, including other components, like code:
23
25
@@ -31,9 +33,12 @@ icon: "chevron-down"
31
33
</Accordion>
32
34
````
33
35
34
-
````mdx Accordion Group Example
36
+
## Accordion Groups
37
+
38
+
Group related accordions together using `<AccordionGroup>`. This creates a cohesive section of accordions that can be individually expanded or collapsed.
39
+
35
40
<AccordionGroup>
36
-
<Accordiontitle="FAQ without Icon">
41
+
<Accordiontitle="Getting started">
37
42
You can put other components inside Accordions.
38
43
39
44
```java HelloWorld.java
@@ -43,23 +48,42 @@ icon: "chevron-down"
43
48
}
44
49
}
45
50
```
51
+
</Accordion>
52
+
53
+
<Accordiontitle="Advanced features"icon="bot">
54
+
Add icons to make accordions more visually distinct and scannable.
55
+
</Accordion>
56
+
57
+
<Accordiontitle="Troubleshooting">
58
+
Keep related content organized into groups.
59
+
</Accordion>
60
+
</AccordionGroup>
61
+
62
+
````mdx Accordion Group Example
63
+
<AccordionGroup>
64
+
<Accordiontitle="Getting started">
65
+
You can put other components inside Accordions.
46
66
47
-
Check out the [Accordion](/components/accordions) docs for all the supported props.
67
+
```java HelloWorld.java
68
+
classHelloWorld {
69
+
publicstaticvoidmain(String[] args) {
70
+
System.out.println("Hello, World!");
71
+
}
72
+
}
73
+
```
48
74
</Accordion>
49
75
50
-
<Accordiontitle="FAQ with Icon"icon="alien-8bit">
51
-
Check out the [Accordion](/components/accordions) docs for all the supported props.
0 commit comments