Skip to content

Commit 39acfaa

Browse files
Adjust Accordion Groups page for clarity and style (#1452)
Co-authored-by: fern-api[bot] <115122769+fern-api[bot]@users.noreply.github.com>
1 parent 26e835b commit 39acfaa

File tree

1 file changed

+67
-72
lines changed

1 file changed

+67
-72
lines changed

fern/products/docs/pages/component-library/default-components/accordion-groups.mdx

Lines changed: 67 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,104 +1,99 @@
11
---
2-
title: 'Accordion Groups'
3-
description: 'Display expandable/collapsible options that reveal more information with improved search functionality'
2+
title: Accordion Groups
3+
description: Display expandable/collapsible options that reveal more information with improved search functionality
44
---
55

66
Accordion Groups allow you to organize content into collapsible sections, making it easier for users to navigate through information. With recent updates, our Accordion component now supports improved search functionality using the browser's built-in search feature.
77

88
<AccordionGroup>
99
<Accordion title="Basic usage">
10-
Accordion Groups can contain multiple Accordion items. Each item has a title and content that can be expanded or collapsed.
11-
12-
```jsx
13-
<AccordionGroup>
14-
<Accordion title="Section 1">
15-
Content for section 1
16-
</Accordion>
17-
<Accordion title="Section 2">
18-
Content for section 2
19-
</Accordion>
20-
</AccordionGroup>
21-
```
10+
Accordion Groups can contain multiple Accordion items. Each Accordion has a title and content that can be expanded or collapsed.
11+
12+
```
13+
<AccordionGroup>
14+
<Accordion title="Section 1">
15+
Content for section 1
16+
</Accordion>
17+
<Accordion title="Section 2">
18+
Content for section 2
19+
</Accordion>
20+
</AccordionGroup>
21+
```
22+
2223
</Accordion>
2324

2425
<Accordion title="Searchable content">
25-
The updated Accordion component now uses HTML5 `<details>` and `<summary>` elements, enabling browser search (Cmd+F / Ctrl+F) to find content within collapsed sections.
26+
Accordion components use HTML5 `<details>` and `<summary>` elements, enabling browser search (Cmd+F / Ctrl+F) so users can find content within collapsed sections.
27+
2628
</Accordion>
2729

2830
<Accordion title="Accessibility">
29-
Our Accordion component is built with accessibility in mind, supporting keyboard navigation and screen readers.
31+
The Accordion component supports keyboard navigation and screen readers.
3032
</Accordion>
3133
</AccordionGroup>
3234

33-
### Enhanced search functionality
34-
35-
The recent update to our Accordion component improves content discoverability by allowing users to search through all content, including collapsed sections, using the browser's search function (Cmd+F / Ctrl+F).
3635

37-
### Usage examples
38-
39-
Here are some examples of how to use the Accordion Group component:
36+
## Usage examples
4037

4138
<Tabs>
4239
<Tab title="Example">
4340
<AccordionGroup>
44-
<Accordion title="Simple text content">
45-
This is a basic example with text content.
46-
</Accordion>
41+
<Accordion title="Simple text content">
42+
This is a basic example with text content.
43+
</Accordion>
44+
<Accordion title="Text content with multimedia">
45+
You can embed images, videos, and other media within accordions for rich interactive content.
4746

48-
<Accordion title="With code snippets">
49-
You can include code snippets within Accordions:
47+
<Frame caption="Sample image">
48+
<img src="https://images.pexels.com/photos/1867601/pexels-photo-1867601.jpeg" alt="A sample image" />
49+
</Frame>
50+
</Accordion>
51+
<Accordion title="Nested components">
52+
Accordions can contain other components, such as code blocks and callouts.
5053

51-
```javascript
52-
function greet(name) {
53-
console.log(`Hello, ${name}!`);
54-
}
55-
```
56-
</Accordion>
54+
```ts
55+
export function greet(name: string) {
56+
return `Hello, ${name}!`;
57+
}
58+
```
5759

58-
<Accordion title="Nested components">
59-
Accordions can contain other components:
60+
<Note>
61+
Here's a nested callout.
62+
</Note>
6063

61-
<Frame caption="Sample image">
62-
<img src="https://images.pexels.com/photos/1867601/pexels-photo-1867601.jpeg" alt="A sample image" />
63-
</Frame>
64-
</Accordion>
64+
</Accordion>
6565
</AccordionGroup>
66+
6667
</Tab>
6768
<Tab title="Markdown">
68-
<CodeBlock title="Example usage">
69+
<CodeBlock>
6970
````jsx
70-
<AccordionGroup>
71-
<Accordion title="Text example">
72-
This is a basic example of an accordion group.
73-
</Accordion>
74-
75-
<Accordion title="Multimedia example">
76-
You can embed photos, videos, and other media within accordions for rich interactive content.
77-
78-
<embed
79-
src="./growing-fern.mp4"
80-
type="video/mp4"
81-
width="640"
82-
height="360"
83-
/>
84-
</Accordion>
85-
86-
<Accordion title="Rich content support">
87-
Accordions can contain rich content including code blocks, callouts, and other components.
88-
89-
```ts
90-
export function greet(name: string) {
91-
return `Hello, ${name}!`;
92-
}
93-
```
94-
</Accordion>
95-
96-
<Accordion title="Best practices using Accordion Groups">
97-
- Use accordion groups when you have multiple related sections
98-
- Each accordion should have a clear title
99-
- Keep content concise and focused
100-
</Accordion>
101-
</AccordionGroup>
71+
<AccordionGroup>
72+
<Accordion title="Simple text content">
73+
This is a basic example with text content.
74+
</Accordion>
75+
<Accordion title="Text content with multimedia">
76+
You can embed images, videos, and other media within accordions for rich interactive content.
77+
78+
<Frame caption="Sample image">
79+
<img src="https://images.pexels.com/photos/1867601/pexels-photo-1867601.jpeg" alt="A sample image" />
80+
</Frame>
81+
</Accordion>
82+
<Accordion title="Nested components">
83+
Accordions can contain other components, such as code blocks and callouts.
84+
85+
```ts
86+
export function greet(name: string) {
87+
return `Hello, ${name}!`;
88+
}
89+
```
90+
91+
<Note>
92+
Here's a nested callout.
93+
</Note>
94+
95+
</Accordion>
96+
</AccordionGroup>
10297
````
10398
</CodeBlock>
10499
</Tab>

0 commit comments

Comments
 (0)