Skip to main content
The @std/dynamic template lets you build custom UIs by composing a tree of components. Unlike other templates that render a single content type, dynamic templates give you full control over layout and structure.
The Chart and Table components here are not the same as the top-level chart / table templates. They’re implemented by separate renderers and take different prop shapes. The Chart / Table components inside an @std/dynamic tree are defined in lib/json-render/catalog.ts, while the top-level Chart and Table templates live in components/templates/ChartRenderer.tsx and TableRenderer.tsx. A payload that renders correctly in one context will not work in the other.

Examples

Simple Example: Login Form

A basic login form using Card, Stack, Input, and Button components.

Comprehensive Example: Analytics Dashboard

A full dashboard with metrics, charts, tables, and activity feed.

Example Response


Content Schema

string
required
The key of the root element in the elements map. This is where rendering starts.
object
required
A flat map of element definitions keyed by unique string IDs. Each element defines its type, props, and optional children.

Element Structure

Each element in the elements map has this structure:

Supported Components

The dynamic template supports 21 components across 5 categories.

Layout Components

Components that contain and arrange other components.

Card

Container with header, content area, and optional footer. Has Children: Yes

Grid

Responsive grid layout with 1-4 columns. Has Children: Yes

Stack

Flex container for horizontal or vertical layouts. Has Children: Yes

Tabs

Tabbed navigation with content panels. Has Children: Yes (children must have matching tabId props)

Content Components

Components for displaying text and messages.

Heading

Typography heading (h1-h4).

Text

Styled paragraph text.

Markdown

Rich markdown content with GitHub Flavored Markdown support.

Alert

Status message with icon.

Divider

Horizontal separator, optionally with centered label.

Data Components

Components for displaying data and metrics.

Chart

Chart visualization (line/bar/area/pie/donut). Config object:

Table

Data table with optional search, pagination, sorting, and export. Column definition: Config object:

Metric

KPI metric with value, trend indicator, and label.

Badge

Status badge or tag indicator.

Progress

Progress bar with percentage.

List

Ordered or unordered list with optional icons.

Avatar

User avatar with image or initials fallback.

Interactive Components

Components for user interaction and navigation.

Accordion

Collapsible accordion sections. External link (opens in new tab).

Input

Text input field with optional label and icon.

Form Components

Components for building forms.

Button

Clickable button with variants.

FormField

Form field wrapper with label, description, and error message. Has Children: Yes

Use Cases

  • Dashboards: Analytics, admin panels, monitoring interfaces
  • Forms: Multi-step wizards, settings pages, data entry
  • Reports: Custom layouts combining metrics, charts, and tables
  • Landing Pages: Marketing content with flexible layouts
  • Documentation: Interactive guides with accordions and tabs