---
title: "Slide"
description: "One slide; any content."
---

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

# Slide

```gistui
root = Slides(Slide(Header("One idea per slide", "Keep text short", size:lg), layout:center, bg:accent))
```

A `Slide` is only valid inside `Slides`.

## Signature

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

```gistui
Slide(...children, layout:center|top|split, bg:plain|inverse|accent|gradient, image:str)
```

- **Group:** Layout
- **Children:** Yes: any component or text
- **Positional arguments:** none

## Props

| Prop | Type | How to write it | Notes |
|---|---|---|---|
| `layout` | `center` · `top` · `split` | named: `layout:…` |  |
| `bg` | `plain` · `inverse` · `accent` · `gradient` | named: `bg:…` |  |
| `image` | string (URL) | named: `image:…` | background photo URL |

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

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

```svelte
<GistUI source={answer} components={{ Slide: MySlide }} />
```
### Solid

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

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

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

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

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