Expandable
The Expandable component and its companion components (ResponseField, Properties, Property) are designed for documenting API response schemas and nested data structures.
Expandable#
A collapsible section with a title and optional icon:
<Expandable>
Expandable with Icon#
<Expandable>
ResponseField#
Document a single API response field with its type and description:
<ResponseField>
Unique identifier for the resource. Format: UUID v4.
Display name of the resource. Max 255 characters.
Optional key-value metadata attached to the resource.
Timestamp when the resource was created.
Properties and Property#
Document a group of schema properties:
<Properties> <Property>
ID of the authenticated user making the request.
Workspace slug. Defaults to the user's personal workspace.
If true, validates the request without making changes.
Nested Schema Example#
Combine Expandable with ResponseField and Properties for complex nested schemas:
<ResponseField> <Expandable>
The authenticated user object.
Props Reference#
Expandable Props
| Prop | Type | Description |
|---|---|---|
title | string | Label shown when the section is collapsed. |
icon | string | Optional Clidey Design icon name. |
children | ReactNode | Content shown when expanded. |
ResponseField Props
| Prop | Type | Description |
|---|---|---|
name | string | Field name (e.g. "user_id"). |
type | string | Data type (e.g. "string", "object", "boolean"). |
required | boolean | If true, shows a "Required" badge. |
children | ReactNode | Description of the field. |
Property Props
| Prop | Type | Description |
|---|---|---|
name | string | Property name. |
type | string | Data type. |
children | ReactNode | Description of the property. |
Was this page helpful?