---
title: Expandable
description: A collapsible inline section for nested API properties.
url: http://localhost:3040/components/expandable
---

# Expandable

A collapsible inline section for nested API properties.

`<Expandable>` renders an inline toggle used inside `<ResponseField>` or `<ParamField>` to reveal nested properties on demand. It keeps the top-level schema clean while keeping nested details accessible.

## Example

- **address** (object):
  The user's shipping address.

#### address properties

- **line1** (string):
      Street address line 1.

- **line2** (string):
      Street address line 2 (apartment, suite, etc.).

- **city** (string):
      City name.

- **postal_code** (string):
      Postal or ZIP code.

```mdx
<ResponseField name="address" type="object">
  Shipping address.

  <Expandable title="address properties">
    <ResponseField name="line1" type="string" required>
      Street address line 1.
    </ResponseField>
    <ResponseField name="city" type="string" required>
      City name.
    </ResponseField>
  </Expandable>
</ResponseField>
```

## Props

| Prop | Type | Default | Description |
|---|---|---|---|
| `title` | `string` | `"Show child attributes"` | Label shown on the toggle button |
| `defaultOpen` | `boolean` | `false` | Whether the section starts expanded |