Expandables
Use expandables for optional field details, nested properties, and advanced notes.
Expandables keep secondary information nearby without making the first read heavy.
Basic expandable
Mintlify uses expandables most often inside response fields to reveal nested object properties without making the first read heavy.
userUser Object<ResponseField name="user" type="User Object">
<Expandable title="properties">
<ResponseField name="full_name" type="string">
The full name of the user.
</ResponseField>
<ResponseField name="is_over_21" type="boolean">
Whether the user is over 21 years old.
</ResponseField>
</Expandable>
</ResponseField>
Standalone expandable
<Expandable title="metadata" label="Show accepted shape" openLabel="Hide accepted shape" icon="braces">
Use metadata for implementation-owned values such as source page, campaign, or account ID.
</Expandable>
Open by default
Open an expandable when the nested detail is important but still visually secondary to the surrounding section.
<Expandable
title="customer"
description="Optional customer identity object passed to checkout."
label="Show customer fields"
openLabel="Hide customer fields"
icon="user"
defaultOpen
>
Include `email` when you already know the buyer.
</Expandable>
Nested API details
Use expandables inside request or response fields when the first read should show the object name, and the second read should show the nested shape.
Request body
offerstringrequiredOffer slug or route key.
metadataobjectoptionalImplementation-owned metadata for reporting, routing, or fulfillment.
<Fields title="Request body" variant="list">
<ParamField body="metadata" type="object" optional>
Implementation-owned metadata.
<Expandable title="metadata" label="Show example keys" openLabel="Hide example keys" icon="braces">
Common keys include `source`, `campaign`, `account_id`, and `template_id`.
</Expandable>
</ParamField>
</Fields>
Properties
titlestringThe name of the object you are showing.
defaultOpenbooleandefault: falseSet to true for the expandable to open when the page loads.
Plandalf extensions
labelstringdefault: Show propertiesClosed-state action text.
openLabelstringdefault: Hide propertiesOpen-state action text.
descriptionstringOptional supporting text below the title.
icon | iconTypestringOptional icon shown before the title.
class | classNamestringOptional classes for layout adjustments.
Authoring rules
- Put the primary explanation outside the expandable.
- Use expandables for optional shapes, advanced behavior, and nested API detail.
- Use accordions when the page has several peer sections the reader may open independently.
- Avoid hiding required setup steps inside an expandable.