Skip to content

Commit 5ab07fc

Browse files
devin-ai-integration[bot]Swimburgerchdeskurdevalog
authored
docs: document defaultOpen property for Accordion component (#1424)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Niels Swimberghe <[email protected]> Co-authored-by: Catherine Deskur <[email protected]> Co-authored-by: Devin Logan <[email protected]>
1 parent d727144 commit 5ab07fc

File tree

3 files changed

+22
-12
lines changed

3 files changed

+22
-12
lines changed

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

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,18 @@ Accordion Groups allow you to organize content into collapsible sections, making
77

88
<AccordionGroup>
99
<Accordion title="Basic usage">
10-
Accordion Groups can contain multiple Accordion items. Each Accordion has a title and content that can be expanded or collapsed.
10+
Accordion Groups can contain multiple Accordion items. Each Accordion has a title and content that can be expanded or collapsed. You can use the `defaultOpen` prop to expand specific accordions by default when the page loads.
1111

12-
```
12+
```jsx
1313
<AccordionGroup>
14-
<Accordion title="Section 1">
15-
Content for section 1
14+
<Accordion title="Section 1" defaultOpen={true}>
15+
Content for section 1, expanded by default
1616
</Accordion>
1717
<Accordion title="Section 2">
1818
Content for section 2
1919
</Accordion>
2020
</AccordionGroup>
2121
```
22-
2322
</Accordion>
2423

2524
<Accordion title="Searchable content">
@@ -38,8 +37,8 @@ Accordion Groups allow you to organize content into collapsible sections, making
3837
<Tabs>
3938
<Tab title="Example">
4039
<AccordionGroup>
41-
<Accordion title="Simple text content">
42-
This is a basic example with text content.
40+
<Accordion title="Simple text content" defaultOpen={true}>
41+
This is a basic example with text content. It's open by default when the page loads.
4342
</Accordion>
4443
<Accordion title="Text content with multimedia">
4544
You can embed images, videos, and other media within accordions for rich interactive content.
@@ -69,8 +68,8 @@ Accordion Groups allow you to organize content into collapsible sections, making
6968
<CodeBlock>
7069
````jsx
7170
<AccordionGroup>
72-
<Accordion title="Simple text content">
73-
This is a basic example with text content.
71+
<Accordion title="Simple text content" defaultOpen={true}>
72+
This is a basic example with text content. It's open by default when the page loads.
7473
</Accordion>
7574
<Accordion title="Text content with multimedia">
7675
You can embed images, videos, and other media within accordions for rich interactive content.

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,23 @@ description: 'Expand or collapse to reveal more information'
66
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.
77

88
<Tabs>
9-
<Tab title="Example">
9+
<Tab title="Examples">
1010
<Accordion title='Single Accordion'>
1111
This is an example of an accordion component. When clicked, it expands to reveal this additional content.
1212
</Accordion>
13+
<Accordion title='Accordion open by default' defaultOpen={true}>
14+
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.
15+
</Accordion>
1316
</Tab>
1417
<Tab title="Markdown">
1518
```jsx
1619
<Accordion title='Single Accordion'>
1720
This is an example of an accordion component. When clicked, it expands to reveal this additional content.
1821
</Accordion>
22+
23+
<Accordion title='Accordion open by default' defaultOpen={true}>
24+
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.
25+
</Accordion>
1926
```
2027
</Tab>
2128
</Tabs>
@@ -30,4 +37,8 @@ The Accordion component allows you to create expandable sections in your documen
3037
The content to be displayed when the accordion is expanded. Can include text, markdown, and components.
3138
</ParamField>
3239

40+
<ParamField path="defaultOpen" type="boolean" default={false}>
41+
Whether the accordion should be open when the page loads. If not specified, the accordion will be collapsed by default.
42+
</ParamField>
43+
3344

fern/products/sdks/overview/java/changelog/2025-10-23.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## 3.9.2
22
**`(fix):`** Fix nullable field serialization in PATCH requests with wrapped request bodies. Explicit null values
3-
(Nullable.ofNull()) are now correctly serialized as `{"field": null}` instead of being omitted like
4-
Nullable.empty().
3+
`(Nullable.ofNull())` are now correctly serialized as `{"field": null}` instead of being omitted like
4+
`Nullable.empty()`.
55

66

77
## 3.9.1

0 commit comments

Comments
 (0)