---
title: "Video"
description: "YouTube, Vimeo or an mp4/webm URL."
---

> Documentation Index
> Fetch the complete documentation index at: https://gistui.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Video

```gistui
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.

```gistui
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.

### React

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

const lib = ui.extend({ Video: MyVideo });
<GistUI library={lib} stream={response.body} />;
```
### Vue

```vue
<GistUI :source="answer" :components="{ Video: MyVideo }" />
```
### Svelte

```svelte
<GistUI source={answer} components={{ Video: MyVideo }} />
```
### Solid

```tsx
<GistUI source={answer()} components={{ Video: MyVideo }} />
```
### Vanilla

```ts
import { ui } from "@gistui/vanilla/ui";

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

See [Custom components](/docs/guides/custom-components/) for the full contract. Style hook: `[data-gistui="Video"]`.

Source: https://gistui.com/docs/components/content/video/index.mdx
