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
full_namestring

The full name of the user.

is_over_21boolean

Whether the user is over 21 years old.

<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

Use metadata for implementation-owned values such as source page, campaign, or account ID.

<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.

customer Optional customer identity object passed to checkout. Hide customer fields

Include email when you already know the buyer. Plandalf can use it to prefill checkout and connect purchase records.

<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

bodyofferstringrequired

Offer slug or route key.

bodymetadataobjectoptional

Implementation-owned metadata for reporting, routing, or fulfillment.

Common keys include source, campaign, account_id, and template_id. Keep values flat unless your backend owns the nested shape.

<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

titlestring

The name of the object you are showing.

defaultOpenbooleandefault: false

Set to true for the expandable to open when the page loads.

Plandalf extensions

labelstringdefault: Show properties

Closed-state action text.

openLabelstringdefault: Hide properties

Open-state action text.

descriptionstring

Optional supporting text below the title.

icon | iconTypestring

Optional icon shown before the title.

class | classNamestring

Optional 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.

Feature detail