Skip to content

Frame

Free-form box: layout and look all from style.

Updated View as Markdown
Preview

Loading preview…

root = Frame(Text("BOARDING PASS", style:{size:11, tracking:2, color:"muted"}), Text("SFO → NRT", style:{size:32, weight:700}), style:{layout:"column", gap:6, pad:24, radius:16, fill:"accent/15", stroke:"accent/40"})

Frame is for the rare design the components cannot express. Everything comes from style.

Signature

This is the line a model reads in the system prompt.

Frame(...children, style:{…})
  • Group: Layout
  • Children: Yes: any component or text
  • Positional arguments: none

Props

Prop Type How to write it Notes
style object named: style:… see Custom design

Use your own component

Keep the name and schema, swap what is drawn. The prompt and the model’s output do not change.

import { ui } from "@gistui/react/ui";

const lib = ui.extend({ Frame: MyFrame });
<GistUI library={lib} stream={response.body} />;
<GistUI :source="answer" :components="{ Frame: MyFrame }" />
<GistUI source={answer} components={{ Frame: MyFrame }} />
<GistUI source={answer()} components={{ Frame: MyFrame }} />
import { ui } from "@gistui/vanilla/ui";

const lib = ui.extend({ Frame: (ctx) => ({ el: myElement(ctx) }) });

See Custom components for the full contract. Style hook: [data-gistui="Frame"].

Navigation

Type to search…

↑↓ navigate↵ selectEsc close