Preview
Loading preview…
root = Video("https://www.youtube.com/watch?v=aqz-KE-bpKQ", title:"Big Buck Bunny (sample)")Signature
This is the line a model reads in the system prompt.
Video(src, title:str, poster:str, ratio:str)- Group: Content
- Children: No
- Positional arguments:
src(a trailing?means it may be left out)
Props
| Prop | Type | How to write it | Notes |
|---|---|---|---|
src |
string (URL) | positional, required | |
title |
string | named: title:… |
|
poster |
string (URL) | named: poster:… |
|
ratio |
string | named: ratio:… |
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({ Video: MyVideo });
<GistUI library={lib} stream={response.body} />;<GistUI :source="answer" :components="{ Video: MyVideo }" /><GistUI source={answer} components={{ Video: MyVideo }} /><GistUI source={answer()} components={{ Video: MyVideo }} />import { ui } from "@gistui/vanilla/ui";
const lib = ui.extend({ Video: (ctx) => ({ el: myElement(ctx) }) });See Custom components for the full contract. Style hook: [data-gistui="Video"].