Files
skeptrune 9200586a3a Boost search ranking for single-word title pages (#5670)
* docs: boost search ranking for single-word title pages

Apply `boost: 3` to English pages whose H1 / frontmatter title is a single word (e.g. "Assistant", "Quickstart", "Cards"). Short titles tend to be canonical landing pages for a topic, so users searching the exact term should land on them first.

* docs: drop boost on websocket-playground stub to keep canonical Playground ranking

`api-playground/websocket-playground.mdx` is an auto-generated AsyncAPI stub with no body content but shares the title "Playground" with `api-playground/overview.mdx`. Boosting both equally diluted the canonical overview page in search for the query "playground". Drop the boost on the stub.
2026-05-05 10:30:58 -07:00

47 lines
1.4 KiB
Plaintext

---
title: "Expandables"
description: "Use the expandable component to toggle nested object properties in API documentation, showing child fields for request and response objects."
keywords: ["expandables", "nested properties", "expandable fields", "toggle content"]
boost: 3
---
Use expandables to show and hide nested content within response fields. They are particularly useful for displaying complex object properties in API documentation.
<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>
```mdx 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>
```
## Properties
<ResponseField name="title" type="string">
The name of the object you are showing.
</ResponseField>
<ResponseField name="defaultOpen" type="boolean" default="false">
Set to `true` for the expandable to open when the page loads
</ResponseField>