---
title: "Slides"
description: "Presentation; v:viewer adds a title bar, thumbnail rail and present button."
---

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

# Slides

```gistui
root = Slides(Slide(Header("GistUI", "Generative UI, engineered for production", size:xl, align:center), layout:center, bg:inverse), Slide(Header("Why", "Three reasons"), Grid(Tile("Fast", "Each line is parsed once", icon:rocket), Tile("Safe", "Programs cannot run code", icon:shield), Tile("Small", "74 KB first load", icon:sparkles), cols:3)), v:viewer, title:"Launch deck")
```

## Signature

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

```gistui
Slides(...Slide, title:str, subtitle:str, v:deck|viewer, ratio:str)
```

- **Group:** Layout
- **Children:** Yes: Slide
- **Positional arguments:** none

## Props

| Prop | Type | How to write it | Notes |
|---|---|---|---|
| `title` | string | named: `title:…` |  |
| `subtitle` | string | named: `subtitle:…` |  |
| `v` | `deck` · `viewer` | named: `v:…` | Default `"deck"`. |
| `ratio` | string | named: `ratio:…` | 16:9 (default), 4:3 or auto |

## 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({ Slides: MySlides });
<GistUI library={lib} stream={response.body} />;
```
### Vue

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

```svelte
<GistUI source={answer} components={{ Slides: MySlides }} />
```
### Solid

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

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

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

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

Source: https://gistui.com/docs/components/layout/slides/index.mdx
