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.
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'| Prop | Type | Default | Description |
|---|---|---|---|
| code | string | — | Code content to display |
| language | string? | — | Language for syntax highlighting (e.g. javascript, bash, json) |
| title | string? | — | Shows a title bar above the code |
```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"| Prop | Type | Description |
|---|---|---|
| examples | CodeExample[] | 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
| Prop | Type | Description |
|---|---|---|
| text | string | Text 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.
| Prop | Type | Description |
|---|---|---|
| type | 'info' | 'warning' | 'error' | 'tip' | Callout variant (changes color and icon) |
| title | string? | Optional title next to the icon |
| children | Snippet | Callout body content |
> [!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.
| Prop | Type | Default | Description |
|---|---|---|---|
| title | string | — | Header text |
| defaultExpanded | boolean | false | Whether to start expanded |
| children | Snippet | — | Expandable content |