Jamdesk Documentation logo

Expandable

Expandable hides supplementary details, long API responses, and troubleshooting steps behind one clickable disclosure, a lighter alternative to Accordion

Use Expandable to hide long API responses, troubleshooting steps, or extra details that would break the reading flow. It renders as one clickable disclosure. It is lighter than Accordion. Accordion is for grouped, navigable sections.

Use Expandable when:

  • Supplementary details would interrupt the main narrative
  • Optional information benefits some readers but not all
  • Long content (like full API responses) should be collapsed by default

Basic Usage

<Expandable title="Show more details">

  These details are hidden by default and revealed when clicked.

</Expandable>

Default Open

Start expanded:

This section starts visible.

<Expandable title="Expanded by default" defaultOpen>

  This section starts visible.

</Expandable>

Common Use Cases

API Response Details

Collapse long responses:

Troubleshooting Steps

Props

stringrequired

Section header text.

booleandefault: false

Start expanded.

Expandable vs Accordion

FeatureExpandableAccordion
PurposeHide supplementary contentOrganize sections of equal importance
IconsNoYes
DescriptionsNoYes (subtitle support)
GroupingStandaloneCan be grouped with AccordionGroup
Best forOptional details, long examplesFAQs, feature lists, navigation

Rule of thumb: If the content is "nice to have," use Expandable. If readers choose between sections, use Accordion.

What's Next?

Components Overview

Browse all available components

MDX Basics

Learn how to use components in MDX