CodeBlock
Read-only syntax-highlighted code.
On this page
Props
| Prop | Type | Default | Description |
|---|---|---|---|
label required | string | FieldReference | None | Block label |
value required | string | FieldReference | None | Code content |
language | "python" | "sql" | "text" | FieldReference | "text" | Syntax language |
data | Readonly<Record<string, unknown>> | None | Inline data to render as the code block content (alternative to source) |
Example
ts
CodeBlock({
label: "Query",
value: "SELECT * FROM orders WHERE total > 100",
language: "sql",
})