Components
Doc components express semantics such as notes, diffs, structured blocks, and columns. Most components can be used as MDX tags or Markdown directives.
Callout
Callouts should reflect intent:
Tip/Note: neutral white block for light hints or clarifications.Info: blue block for stable info or consistency notes.Warning: orange block for risks or hard constraints.Deprecated: red block for deprecations and migration notices.
Use for hints and small reminders.
Use for stable rules or consistency notes.
Use for risk or hard constraints.
Use to mark deprecated features or migration notices.
Alerts (GitHub syntax)
Use GitHub-style alerts in Markdown and they will map to callouts automatically.
This maps to the Note callout and keeps migration syntax consistent.
Use for risks or hard constraints.
Columns
Good for pairing concepts or steps.
Helps readers quickly understand differences.
Cards
Use cards to surface key entry points, landing sections, or recommended reading. The grid defaults to four columns and collapses to two on mobile.
- Quickstart
Install dependencies and scaffold the docs.
- Components
Built-in MDX UI primitives.
- Project structure
Understand content and navigation layout.
- Build validation
CI checks for doc quality and broken links.
Cards (directive)
- Quickstart
Install dependencies and scaffold the docs.
- Components
Built-in MDX UI primitives.
- Project structure
Understand content and navigation layout.
- Build validation
CI checks for doc quality and broken links.
Link Buttons
Badges
Beta Stable CautionInline syntax: Experimental.
Math Equations
Inline math uses $...$. Block math uses $$...$$ and renders with KaTeX.
Inline example: .
Diff Block
Use to compare two approaches side by side. beforeLabel and afterLabel are optional when you want the top labels.
cache: "manual"Cache strategy maintained by hand.
cache: "filesystem"Automatically synced with the file structure.
Code Block
Use standard Markdown code fences. The renderer adds the shared code styling and copy action.
export const navStrategy = "filesystem";export const contentPath = "content";Colored Diffs
Lines starting with + or - in code blocks are rendered with diff backgrounds for upgrade guides.
- cache: "manual"+ cache: "filesystem"Code Tabs
Switch between multiple snippets inside one block. Use the code-group directive without extra JSX.
const completion = await openai.chat.completions.create({ model: "gpt-5", messages: [{ role: "user", content: "Jane, 54 years old" }],});const response = await openai.responses.create({ model: "gpt-5", input: "Jane, 54 years old",});Rich panels
For mixed content (text, images, blocks), use :::code-group with :::tab panels.
Use tabs for notes, prose, or images alongside code.
Config
[docs]static = true:::
Steps
Turn ordered lists into step-by-step flows for long procedures.
Install the
typematterdependencies.Update the
content/directory structure.Run
npm run validate:docsbefore building.
File Tree
Render Markdown lists as a file tree with collapsible folders.
app
- layout.tsx
- page.tsx
content
core-concepts
- components.mdx
- package.jsonProject metadata
Details / Accordion
Use collapsible blocks for supporting or optional content.
Why this matters
This keeps long explanations out of the main reading flow.
Annotations
Inline annotations add contextual tooltips that still support Markdown.
This API is experimental Heads upSee the migration guide for constraints..
Feature Matrix
Compare multiple offerings with a semantic Markdown table.
| Capabilities | Chat Completions API | Responses API |
|---|---|---|
| Text generation | ||
| Audio | coming soon | |
| Vision | ||
| Structured Outputs | ||
| Function calling | ||
| Web search | ||
| File search | ||
| Computer use | ||
| Code interpreter | ||
| MCP | ||
| Image generation | ||
| Reasoning summaries |