---
title: "Hero"
description: "Big intro: eyebrow, title, subtitle, image, call to action."
---

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

# Hero

```gistui
root = Hero("Ship generative UI in an afternoon", "Stream a program, render it natively, keep your design system.", eyebrow:"GistUI", image:"https://images.unsplash.com/photo-1498050108023-c5249f4df085?w=1200&q=75&auto=format&fit=crop", cta:"Start free")
```

## Signature

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

```gistui
Hero(title, subtitle?, eyebrow:str, image:str, cta:str, href:str, do:[@step…], 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:…` |  |
| `image` | string (URL) | named: `image:…` |  |
| `cta` | string | named: `cta:…` |  |
| `href` | string | named: `href:…` |  |
| `do` | action list | named: `do:…` | steps run on click |
| `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({ Hero: MyHero });
<GistUI library={lib} stream={response.body} />;
```
### Vue

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

```svelte
<GistUI source={answer} components={{ Hero: MyHero }} />
```
### Solid

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

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

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

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

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