Back to showcase

Code & Content Components

Components for code display, callouts, and expandable sections. These are the primary components usable directly in markdown files.

CodeBlock

Displays a code snippet with optional title bar and copy button.

Create a customer
const customer = await aress.customers.create({
  email: 'jane@example.com',
  name: 'Jane Doe'
});
curl https://api.example.com/v1/customers \\\n  -H 'Authorization: Bearer sk_test_xxx'
PropTypeDefaultDescription
codestringCode content to display
languagestring?Language for syntax highlighting (e.g. javascript, bash, json)
titlestring?Shows a title bar above the code
Markdown usage
```javascript title="Create a customer"
const customer = await aress.customers.create({
  email: 'jane@example.com'
});
```

CodeTabs

Multi-language code tab interface. Persists the selected language across pages via the language store.

curl https://api.example.com/v1/customers \
  -H "Authorization: Bearer sk_test_xxx" \
  -d email="jane@example.com"
PropTypeDescription
examplesCodeExample[]Array of { language, label, code } objects

CodeTabs are typically rendered from frontmatter codeExamples in the API code panel, not directly in markdown body.

CopyButton

Clipboard copy button with visual "Copied" feedback. Used internally by CodeBlock and CodeTabs.

Click to copy
PropTypeDescription
textstringText to copy to clipboard

Callout

Colored callout box with icon and optional title. Four variants: info, warning, error, tip.

Note
This endpoint requires authentication with a valid API key.
Deprecation notice
This parameter will be removed in API version 2025-01-01.
Breaking change
The response format has changed. See migration guide.
Pro tip
Use idempotency keys to safely retry requests.
PropTypeDescription
type'info' | 'warning' | 'error' | 'tip'Callout variant (changes color and icon)
titlestring?Optional title next to the icon
childrenSnippetCallout body content
Markdown usage
> [!info] Note
> This endpoint requires authentication with a valid API key.

> [!warning] Deprecation notice
> This parameter will be removed in API version 2025-01-01.

> [!tip] Pro tip
> Use idempotency keys to safely retry requests.

ExpandableSection

Collapsible section with smooth animation. Used for hiding optional or advanced content.

PropTypeDefaultDescription
titlestringHeader text
defaultExpandedbooleanfalseWhether to start expanded
childrenSnippetExpandable content