Output & generative UI
Structured data
Use when the agent returns data in a schema and people need to read it without parsing JSON.
Schema output rendered as a readable card, raw JSON one toggle away.
Part of Output & generative UI. The stage where the response is a thing, not a paragraph: a document, a set of edits, a record, a chart. These patterns give that output a container the user can review, accept in part, and come back to later.
Do
- Render the fields as a labelled card, with status as a badge and numbers in mono.
- Keep the raw JSON one toggle away.
- Say where the data came from, such as the tool and schema.
Don't
- Don't show JSON by default to people who are not developers.
- Don't drop fields from the card that exist in the JSON.
- Don't reword values. The card and the JSON must agree.
States
- Card: A readable card with labelled fields, a status badge and a small events table.
- JSON: The same record as syntax-tinted JSON in a mono block.
Usage
import { StructuredDataPattern } from "./halaska-kit";
<StructuredDataPattern />
Built from
Badge, Card, Separator, Stack, Typography
Related patterns
Halaska UI · Components · Patterns · Screens · Install