For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Book a demoLog inStart for free
  • Getting started
    • Overview
    • How it works
    • Quickstart
    • Project structure
    • Customer showcase
    • Changelog
  • Configuration
    • Overview
    • Site-level settings
    • Page-level settings
  • Writing content
    • Markdown basics
    • Rich media in Markdown
      • Overview
      • Accordion
      • Anchor
      • Aside
      • Badge
      • Button
      • Callout
      • Card
      • Code block
      • Copy
      • Download
      • Endpoint request snippet
      • Endpoint response snippet
      • Endpoint schema snippet
      • Webhook payload snippet
      • Files
      • Frame
      • Icon
      • If
      • Indent
      • Parameter field
      • Prompt
      • Runnable endpoint
      • Schema
      • Step
      • Table
      • Tab
      • Tooltip
      • Versions
    • Fern Editor
    • Reusable snippets
  • AI features
    • Overview
    • Fern Writer
    • AI-generated examples
    • Markdown access
      • Overview
      • Customize LLM output
      • Agent directives
      • Analytics and integration
    • MCP server
    • API catalog discovery
  • Public API
    • GETJWT from Fern API key
    • GETAlgolia search credentials
    • GETCurrent user information
  • Fern Writer API
    • GETGet Fern Writer Install Link
Checking status...
SOC2Soc 2 Type II
© 2026 Fern • Birch Solutions, Inc., a Postman company

Documentation

SDKsDocsAsk FernCLI Reference

API Definitions

OpenAPIAsyncAPIOpenRPCgRPC

Resources

BlogSupportPricing

Company

Brand KitPrivacy PolicyTerms of Service
LogoLogo
Book a demoLog inStart for free
On this page
  • Usage
  • Variants
  • Multimedia
  • Nested components
  • Default open
  • Properties
Writing contentComponents

Accordion

||View as Markdown|
Was this page helpful?
Edit this page
Previous

Components overview

Next

Anchor

The <Accordion> component creates expandable sections with searchable, SEO-friendly content that remains accessible even when collapsed. Use accordions for FAQs, documentation sections, settings panels, or any content where progressive disclosure improves readability.

You can use single accordions or group multiple accordions together with <AccordionGroup>.

Usage

Section 1

Content for section 1, expanded by default

Section 2

Content for section 2

Markdown
1<AccordionGroup>
2 <Accordion title="Section 1" defaultOpen={true}>
3 Content for section 1, expanded by default
4 </Accordion>
5 <Accordion title="Section 2">
6 Content for section 2
7 </Accordion>
8</AccordionGroup>

Variants

Within each accordion, you can embed images, videos, and other components (callouts, code blocks, etc) within accordions for rich interactive content.

Multimedia

Text content with multimedia
A sample image
Sample image
Markdown
1<Accordion title="Text content with multimedia">
2<Frame caption="Sample image">
3 <img src="https://images.pexels.com/photos/1867601/pexels-photo-1867601.jpeg" alt="A sample image" />
4</Frame>
5</Accordion>

Nested components

Nested components

Here’s a callout nested in an accordion

Markdown
1<Accordion title="Nested components">
2<Note>
3 Here's a callout nested in an accordion
4</Note>
5</Accordion>

Default open

Accordion open by default

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.

Markdown
1<Accordion title='Accordion open by default' defaultOpen={true}>
2 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.
3</Accordion>

Properties

title
stringRequired

The title shown in the accordion header

children
string | JSXRequired

The content to be displayed when the accordion is expanded. Can include text, markdown, and components.

defaultOpen
boolean

Whether the accordion should be open when the page loads. If not specified, the accordion will be collapsed by default.

id
string

The unique ID for the accordion. Used for linking and navigation. If not specified, an ID will be generated automatically.

className
string

Additional CSS classes to apply to the accordion