---
title: "Tabs"
description: "Tabbed panels: one Tab is shown at a time."
---

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

# Tabs

```gistui
root = Tabs(Tab("Overview", "Revenue grew **8%** this quarter.", icon:trending-up), Tab("Customers", "3,410 active customers.", icon:users), Tab("Risks", Callout("Two renewals are at risk.", tone:warning)), v:pills)
```

## Signature

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

```gistui
Tabs(...Tab, v:line|pills, bind:$var)
```

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

## Props

| Prop | Type | How to write it | Notes |
|---|---|---|---|
| `v` | `line` · `pills` | named: `v:…` | Default `"line"`. |
| `bind` | `$state` variable | `bind:$name` | two-way binding to a $variable |

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

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

```svelte
<GistUI source={answer} components={{ Tabs: MyTabs }} />
```
### Solid

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

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

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

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

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