Code Example 5 - API request and response panelsPro
An API reference-style section with an endpoint list, a request panel and a JSON response panel showing status and latency for the selected endpoint. Use it on API product pages to preview real request and response shapes.
About Code Example 5
An API reference-style section with an endpoint list, a request panel and a JSON response panel showing status and latency for the selected endpoint. Use it on API product pages to preview real request and response shapes.
Code Example 5 is a pro code example block for React, built on shadcn/ui and Tailwind CSS. It ships as 111 lines of TypeScript you own: every piece of copy is a prop with a sensible default, so you can drop it in and replace the content without touching the layout.
- code
- api
- rest
- request
- response
- json
- reference
Installation
- Add the Chocolate UI registry to your
components.json(see the installation guide). - Run the shadcn CLI:
npx shadcn@latest add @chocolate/code-example-05Uses: badge, reveal, utils.
Usage
import CodeExample05 from "@/components/blocks/code-example-05"
export default function Page() {
return <CodeExample05 />
}