---
title: ResponseField
description: Document response object properties returned by API endpoints.
url: http://localhost:3040/components/response-field
---

# ResponseField

Document response object properties returned by API endpoints.

`<ResponseField>` renders a structured property entry for API response documentation. Pair it with `<Expandable>` to document nested objects.

## Example

- **id** (string):
  Unique identifier for the pet. Format: `pet_xxxxxxxx`

- **name** (string):
  The pet's display name.

- **status** (string):
  Current status. One of `available`, `pending`, or `sold`.

- **tags** (Tag[]):
  Array of tags associated with the pet.

#### Tag properties

- **id** (integer):
      Tag identifier.

- **name** (string):
      Tag display name.

```mdx
<ResponseField name="id" type="string" required>
  Unique identifier.
</ResponseField>

<ResponseField name="tags" type="Tag[]">
  Associated tags.
  <Expandable title="Tag properties">
    <ResponseField name="name" type="string">
      Tag name.
    </ResponseField>
  </Expandable>
</ResponseField>
```

## Props

| Prop | Type | Description |
|---|---|---|
| `name` | `string` | Property name |
| `type` | `string` | Data type (e.g. `string`, `integer`, `boolean`, `object`) |
| `required` | `boolean` | Shows a "required" badge |

> **Tip:**
  Use `<Expandable>` inside a `<ResponseField>` to document nested object properties without cluttering the top-level response schema.