AI Structured Output
An object arriving field by field from the model, without the layout jumping.
- AI
- 1 file
- No extra npm packages
- Accessibility notes
pnpm dlx @dowel-ui/cli add ai-structured-outputNo npm packages are needed beyond what Dowel already requires.
import { StructuredOutput } from "@/components/ui/ai-structured-output";Default
Empty
Streaming
Streaming Live
With Confidence
Field Error
Crm Enrichment
<StructuredOutput>
| Prop | Type | Default |
|---|---|---|
fields (required)Declared up front, so layout is reserved before anything arrives. | OutputField[] | — |
value (required)The latest partial snapshot. | Record<string, unknown> | — |
errorsFields that failed to extract, with the reason shown in place. | Record<string, string> | — |
formatValue | (value: unknown, name: string) => string | defaultFormat |
settledFields the caller knows are finished. Supply this when the API gives a real signal; otherwise the default rule applies. | string[] | — |
streamingTrue while more of the object is still expected. When false every present field is settled, which is the only completion signal that is ever certain. | boolean | false |
children | ReactNode | — |
Plus every attribute of <dl> except children.
<StructuredField>
| Prop | Type | Default |
|---|---|---|
name (required) | string | — |
children | ReactNode | — |
Plus every attribute of <div> except children.
<StructuredConfidence>
| Prop | Type | Default |
|---|---|---|
value (required) | number | — |
lowBelow | number | 0.7 |
Plus every attribute of <p>.
<StructuredFieldError>
Plus every attribute of <p>.
8/8
checks passed
- Tested — passes
- axe assertion — passes
- Keyboard tested — does not apply
- Storybook examples — passes
- Accessibility documented — passes
- Semantic tokens only — passes
- Motion from tokens — passes
- className merged — passes
- Visible focus — does not apply
- No fixed widths — passes