Response Tabs
Example responses by status code. Tabs with a coloured dot and a sliding marker, a collapsible headers section, a JSON tree that folds, truncates long strings and copies values, a raw view, and a schema view.
pixikit.com/docs/app-ui/docs/response-tabs
Customize
Default value
Default view
Collapsed depth2
Copy
Max height360px
Props
12| Name | Type | Default | Description |
|---|---|---|---|
responses | ApiResponse[] | Required | The responses, one tab each. |
value | number | None | The open status code, when you hold the state. |
defaultValue | number | None | The status code open at first, when the tabs hold the state. |
onValueChange | (status: number) => void | None | Called with the status code the user opens. |
view | "example" | "schema" | None | Which view of a response is shown, when you hold the state. |
defaultView | "example" | "schema" | "example" | The view shown at first, when the tabs hold the state. |
onViewChange | (view: "example" | "schema") => void | None | Called with the view the user picks. |
collapsedDepth | number | 2 | JSON nested deeper than this many levels starts folded. |
copy | boolean | true | Shows the copy button. |
maxHeight | number | None | The tallest the body gets in px; it scrolls inside. |
title | string | None | A name shown before the tabs. |
className | string | None |