Skip to main content
Use expandables to show and hide nested content within response fields. They are particularly useful for displaying complex object properties in API documentation.
user
User Object
Expandable example
<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>

Behavior

Expandable sections render their content lazily — nested content is only rendered when the section is opened. The open/closed state is persisted in session storage, so it is remembered as users navigate between pages. If a URL contains an anchor that points to content inside an expandable, the section automatically opens and scrolls the target into view.

Properties

title
string
The name of the object you are showing.
defaultOpen
boolean
default:"false"
Set to true for the expandable to open when the page loads.