---
title: "Buttons"
description: "A row of buttons."
---

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

# Buttons

```gistui
root = Buttons(Button("Cancel", v:ghost), Button("Save draft", v:secondary), Button("Publish"), align:end)
```

## Signature

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

```gistui
Buttons(...Button, align:start|end)
```

- **Group:** Forms
- **Children:** Yes: Button
- **Positional arguments:** none

## Props

| Prop | Type | How to write it | Notes |
|---|---|---|---|
| `align` | `start` · `end` | named: `align:…` |  |

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

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

```svelte
<GistUI source={answer} components={{ Buttons: MyButtons }} />
```
### Solid

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

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

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

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

Source: https://gistui.com/docs/components/forms/buttons/index.mdx
