Usage
<RequestExample> is a thin wrapper around <CodeGroup> that adds a small "Request" eyebrow header. Use it on API endpoint pages to show the same call in multiple languages.
<RequestExample>
```bash cURL
curl -X POST https://api.nookdocs.com/v1/projects \
-H "Authorization: Bearer $TOKEN"
```
```bash HTTPie
http POST https://api.nookdocs.com/v1/projects \
Authorization:"Bearer $TOKEN"
```
</RequestExample>Request
curl -X POST https://api.nookdocs.com/v1/projects \
-H "Authorization: Bearer $TOKEN"Custom title
The default eyebrow text is "Request". Override with the title prop if you want something more specific:
<RequestExample title="Authentication request">
...
</RequestExample>Inside a Panel
For Mintlify-style endpoint pages, place <RequestExample> inside a <Panel> to push it into the right sidebar:
<Panel title="Sample request">
<RequestExample>
```bash cURL
curl -X POST https://api.nookdocs.com/v1/projects
```
</RequestExample>
</Panel>The reader sees the prose on the left and the request example sticky on the right — like the Stripe and Mintlify API references.
Auto-generation
In Phase 4, the OpenAPI parser auto-generates <RequestExample> blocks for every endpoint with curl, JavaScript, Python, Go, and Ruby tabs. You don't need to author them by hand for endpoints that come from a spec.
Props
| Prop | Type | Default | Description |
title | string | "Request" | Eyebrow header text |
children | ReactNode | required | Fenced code blocks (one per language) |
For response examples, use <ResponseExample>.