Sidecar Box
A framed panel with an optional head, body, and footer. The OpenAPI plugin builds its sidecar with it (the request body, response, and example boxes), so reaching for it in custom plugin pages or MDX gives you content that matches that look.
Import
Code
Components
SidecarBox.Root- The outer framed containerSidecarBox.Head- Header row, typically a title or controlsSidecarBox.Body- Main content area with its own inner borderSidecarBox.Footer- Footer row for notes or actions
Head, Body, and Footer are all optional. Use just Root and Body for a plain framed panel.
With a status badge
The head is a plain flex row, so justify-between aligns a title on the left and a status badge (or
any control) on the right, above an embedded code body.
Code
Anatomy
All four parts together. The head and footer sit flush against the framed body in the middle.
Code
With a code block
For code or JSON, drop the body padding with className="p-0" and let an embedded SyntaxHighlight
own the spacing. This is the pattern the OpenAPI plugin uses for its example boxes.
Code
Props
Each part accepts children and an optional className to extend or override its styling.
| Component | Description |
|---|---|
SidecarBox.Root | Outer frame. Sets the rounded border, background, and shadow. |
SidecarBox.Head | Top row. A flex container, so layout utilities apply directly. |
SidecarBox.Body | Content area with its own inner border. Use p-0 for code blocks. |
SidecarBox.Footer | Bottom row for notes or actions. |