---
title: "Header"
description: "Title with optional subtitle."
---

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

# Header

```gistui
root = Header("Q3 revenue", "All regions · updated Oct 1", eyebrow:"Finance", size:lg)
```

## Signature

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

```gistui
Header(title, subtitle?, eyebrow:str, size:sm|md|lg|xl, align:start|center)
```

- **Group:** Layout
- **Children:** No
- **Positional arguments:** `title`, `subtitle?` (a trailing `?` means it may be left out)

## Props

| Prop | Type | How to write it | Notes |
|---|---|---|---|
| `title` | string | positional, required |  |
| `subtitle` | string | positional, optional |  |
| `eyebrow` | string | named: `eyebrow:…` | small label above |
| `size` | `sm` · `md` · `lg` · `xl` | named: `size:…` |  |
| `align` | `start` · `center` | 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({ Header: MyHeader });
<GistUI library={lib} stream={response.body} />;
```
### Vue

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

```svelte
<GistUI source={answer} components={{ Header: MyHeader }} />
```
### Solid

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

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

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

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

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