---
title: Hero Blocks for Astro
description: "Prebuilt Astro hero sections for business websites, portfolios, and landing pages. Compare layouts, preview examples, and install the source."
seo:
    title: "Astro Hero blocks: examples and source"
sidebar:
    label: "Hero"
related:
    - /blocks
    - /components
    - /docs/astro-business-websites
mode: wide
---

## Split image

Introduce the page with text, actions, and a supporting image.

```astro
---
import Hero1Block from "@/components/blocks/hero/hero-1.astro"
import placeholderImage from "@/assets/placeholder.webp"
---

<Hero1Block
  title="Which support task should you automate first?"
  description="Start with a request your team handles often. The gnostic AI pilot brief asks who receives it, what they need to know, and when a person should take over."
  badge={{
    label: "Sample workflow review",
    href: "/blocks/services#process",
  }}
  buttons={[
    {
      label: "Open the pilot brief",
      href: "/blocks/contact#editorial-contact",
      variant: "default",
    },
    {
      label: "Read the pilot questions",
      href: "/blocks/faqs#split",
      variant: "secondary",
    },
  ]}
  image={{ src: placeholderImage, alt: "Sample image placeholder" }}
/>
```

```sh
bunx --bun shadcn@latest add @gnostic/hero-1
```

## Fullscreen video

Place a heading and action over video with an image fallback.

```astro
---
import Block from "@/components/blocks/hero/hero-fullscreen-video.astro"
import poster from "../../../src/assets/wizard/wizard-overlooking-town.png"
import video from "../../../src/assets/wizard/wizard-overlooking-town.mp4?url"

const content = {
  eyebrow: "gnostic AI · Sample catalog",
  title: "Choose a kit for your first pilot",
  highlight: "first pilot",
  description:
    "Compare the sample tickets, invoices, and reply checklist. Pick the kit that fits the work your team wants to test.",
  image: {
    src: poster,
    alt: "A wizard overlooking the town",
  },
  video: video,
  buttons: [
    {
      label: "Compare the test kits",
      href: "/blocks/products#list",
    },
  ],
}
---

<Block {...content} />
```

```sh
bunx --bun shadcn@latest add @gnostic/hero-fullscreen-video
```

## Social proof

Place example social proof before the main page introduction.

```astro
---
import Hero2Block from "@/components/blocks/hero/hero-2.astro"
import { agentAvatars } from "@/lib/agent-avatars"
import placeholderImage from "@/assets/placeholder.webp"
---

<Hero2Block
  title="Follow one request from inbox to owner"
  description="In this sample gnostic AI pilot, a support lead traces a request through intake and checks whether the draft work order contains everything the owner needs."
  socialProof={{
    avatars: [
      { image: agentAvatars[0], initials: "LM", name: "Leila Moreno" },
      { image: agentAvatars[1], initials: "OP", name: "Owen Patel" },
      { image: agentAvatars[2], initials: "NC", name: "Nadia Chen" },
    ],
    rating: 5,
    text: "Fictional ratings for this example",
  }}
  buttons={[
    {
      label: "Follow the pilot steps",
      href: "/blocks/services#process",
      variant: "default",
    },
    {
      label: "View the sample inquiry",
      href: "/blocks/contact#split-form",
      variant: "secondary",
    },
  ]}
  image={{ src: placeholderImage, alt: "Sample image placeholder" }}
/>
```

```sh
bunx --bun shadcn@latest add @gnostic/hero-2
```

## Background

Keep the introduction over a background media area.

```astro
---
import Hero3Block from "@/components/blocks/hero/hero-3.astro"
import placeholderImage from "@/assets/placeholder.webp"
---

<Hero3Block
  title="Three field notes from the pilot queue"
  description="Follow a support ticket, an invoice, and a draft reply through three gnostic AI examples. Each field note shows what the reviewer checked."
  buttons={[
    {
      label: "Browse the field notes",
      href: "/blocks/articles#text-grid",
      variant: "default",
    },
    {
      label: "View the sample projects",
      href: "/blocks/gallery#project-columns",
      variant: "secondary",
    },
  ]}
  image={{ src: placeholderImage, alt: "Sample image placeholder" }}
/>
```

```sh
bunx --bun shadcn@latest add @gnostic/hero-3
```

## Full height

Give the background hero more vertical space.

```astro
---
import Hero4Block from "@/components/blocks/hero/hero-4.astro"
import placeholderImage from "@/assets/placeholder.webp"
---

<Hero4Block
  title="Can the support lead take over the queue?"
  description="Practice handing a ticket routing rule to its owner. Use the test queue to check what happens when the rule pauses."
  features={[
    "Give the lead the routing rule",
    "Run the saved tickets together",
    "Assign a waiting ticket by hand",
  ]}
  buttons={[
    {
      label: "See the handoff checklist",
      href: "/blocks/features#illustrated-timeline",
      variant: "default",
    },
    {
      label: "Read the routing field note",
      href: "/blocks/article#image-header",
      variant: "secondary",
    },
  ]}
  image={{ src: placeholderImage, alt: "Sample image placeholder" }}
/>
```

```sh
bunx --bun shadcn@latest add @gnostic/hero-4
```

## Checklist

Pair the introduction with a short feature checklist.

```astro
---
import Hero5Block from "@/components/blocks/hero/hero-5.astro"
import { agentAvatars } from "@/lib/agent-avatars"
import placeholderImage from "@/assets/placeholder.webp"
---

<Hero5Block
  title="Catch the extra $24 on a sample invoice"
  description="A supplier bills $264 against a $240 purchase order. Check that the draft shows the difference and sends both documents to the reviewer."
  features={[
    "Match the supplier and invoice number",
    "Compare the two totals",
    "Flag the $24 difference",
    "Send the source documents for review",
  ]}
  buttons={[
    {
      label: "Trace the disputed invoice",
      href: "/blocks/article#editorial-article",
      variant: "default",
    },
  ]}
  socialProof={{
    avatars: [
      { image: agentAvatars[3], initials: "LM", name: "Leila Moreno" },
      { image: agentAvatars[4], initials: "OP", name: "Owen Patel" },
      { image: agentAvatars[5], initials: "NC", name: "Nadia Chen" },
    ],
    rating: 5,
    text: "Fictional ratings for this example",
  }}
  image={{ src: placeholderImage, alt: "Sample image placeholder" }}
/>
```

```sh
bunx --bun shadcn@latest add @gnostic/hero-5
```

## Split proof

Keep features and example social proof near the main message.

```astro
---
import Hero6Block from "@/components/blocks/hero/hero-6.astro"
import { agentAvatars } from "@/lib/agent-avatars"
import placeholderImage from "@/assets/placeholder.webp"
---

<Hero6Block
  title="Where should a mixed support ticket go?"
  description="A customer asks for an invoice and help setting up an account in the same message. Test what the reviewer receives when two queues match."
  features={[
    "Keep the original message",
    "Record the expected owner",
    "Compare the suggested queue",
  ]}
  buttons={[
    {
      label: "Read the ticket test",
      href: "/blocks/article#image-header",
      variant: "default",
    },
    {
      label: "Check the routing questions",
      href: "/blocks/faqs#centered",
      variant: "secondary",
    },
  ]}
  socialProof={{
    avatars: [
      { image: agentAvatars[6], initials: "LM", name: "Leila Moreno" },
      { image: agentAvatars[7], initials: "OP", name: "Owen Patel" },
      { image: agentAvatars[8], initials: "NC", name: "Nadia Chen" },
    ],
    rating: 5,
    text: "Fictional ratings for this example",
  }}
  image={{ src: placeholderImage, alt: "Sample image placeholder" }}
/>
```

```sh
bunx --bun shadcn@latest add @gnostic/hero-6
```

## Wide image

Give the supporting image a wider column.

```astro
---
import Hero7Block from "@/components/blocks/hero/hero-7.astro"
import { agentAvatars } from "@/lib/agent-avatars"
import placeholderImage from "@/assets/placeholder.webp"
---

<Hero7Block
  title="What should the agent say about the original box?"
  description="An AI draft tells every customer to keep the packaging. Read the sample returns policy to see when that advice applies."
  features={[
    "Find the rule for fragile items",
    "Check which product the customer named",
    "Ask about the item if its type is unclear",
  ]}
  buttons={[
    {
      label: "Read the reply field note",
      href: "/blocks/article#centered-header",
      variant: "default",
    },
    {
      label: "Compare four return requests",
      href: "/blocks/features#media-cards",
      variant: "secondary",
    },
  ]}
  socialProof={{
    avatars: [
      { image: agentAvatars[0], initials: "LM", name: "Leila Moreno" },
      { image: agentAvatars[1], initials: "OP", name: "Owen Patel" },
      { image: agentAvatars[2], initials: "NC", name: "Nadia Chen" },
    ],
    rating: 5,
    text: "Fictional ratings for this example",
  }}
  image={{ src: placeholderImage, alt: "Sample image placeholder" }}
/>
```

```sh
bunx --bun shadcn@latest add @gnostic/hero-7
```

## Image led

Let the image take more space than the introduction.

```astro
---
import Hero8Block from "@/components/blocks/hero/hero-8.astro"
import placeholderImage from "@/assets/placeholder.webp"
---

<Hero8Block
  title="Where will your routing rule send these three tickets?"
  description="Use the gnostic AI sample kit to test a billing request, a setup question, and a ticket that asks about both. Record the expected queue before you run the rule."
  buttons={[
    {
      label: "View the routing kit",
      href: "/blocks/product#featured",
      variant: "default",
    },
    {
      label: "Read the routing test",
      href: "/blocks/article#image-header",
      variant: "secondary",
    },
  ]}
  image={{ src: placeholderImage, alt: "Sample image placeholder" }}
/>
```

```sh
bunx --bun shadcn@latest add @gnostic/hero-8
```

## Masked image

Fade the background media behind the text area.

```astro
---
import Hero9Block from "@/components/blocks/hero/hero-9.astro"
import { agentAvatars } from "@/lib/agent-avatars"
import placeholderImage from "@/assets/placeholder.webp"
---

<Hero9Block
  title="Keep a duplicate invoice out of the payment queue"
  description="Copy a sample invoice and submit it twice. Check that the second draft points the reviewer to the first record."
  features={[
    "Use the same supplier",
    "Keep the original invoice number",
    "Find the first draft",
    "Count the drafts eligible for payment",
  ]}
  buttons={[
    {
      label: "Run the invoice test",
      href: "/blocks/article#editorial-article",
      variant: "default",
    },
    {
      label: "Read the intake questions",
      href: "/blocks/faqs#compact",
      variant: "secondary",
    },
  ]}
  socialProof={{
    avatars: [
      { image: agentAvatars[3], initials: "LM", name: "Leila Moreno" },
      { image: agentAvatars[4], initials: "OP", name: "Owen Patel" },
      { image: agentAvatars[5], initials: "NC", name: "Nadia Chen" },
    ],
    rating: 5,
    text: "Fictional ratings for this example",
  }}
  image={{ src: placeholderImage, alt: "Sample image placeholder" }}
/>
```

```sh
bunx --bun shadcn@latest add @gnostic/hero-9
```

## Spread overlay

Spread the title and actions over the background media.

```astro
---
import Hero10Block from "@/components/blocks/hero/hero-10.astro"
import { agentAvatars } from "@/lib/agent-avatars"
import placeholderImage from "@/assets/placeholder.webp"
---

<Hero10Block
  title="Does the reply still fit the revised policy?"
  description="Repeat the original return requests after the policy changes. Compare each draft with the answer the policy owner now expects."
  buttons={[
    {
      label: "See how to repeat the check",
      href: "/blocks/features#text-grid",
      variant: "default",
    },
    {
      label: "Open the review record example",
      href: "/blocks/features#cards",
      variant: "secondary",
    },
  ]}
  socialProof={{
    avatars: [
      { image: agentAvatars[6], initials: "LM", name: "Leila Moreno" },
      { image: agentAvatars[7], initials: "OP", name: "Owen Patel" },
      { image: agentAvatars[8], initials: "NC", name: "Nadia Chen" },
    ],
    rating: 5,
    text: "Fictional ratings for this example",
  }}
  image={{ src: placeholderImage, alt: "Sample image placeholder" }}
/>
```

```sh
bunx --bun shadcn@latest add @gnostic/hero-10
```

## Centered overlay

Center the introduction over the background media.

```astro
---
import Hero11Block from "@/components/blocks/hero/hero-11.astro"
import { agentAvatars } from "@/lib/agent-avatars"
import placeholderImage from "@/assets/placeholder.webp"
---

<Hero11Block
  title="Choose a test before you connect a live queue"
  description="Compare three gnostic AI sample kits. Each one gives your team a way to check a ticket assignment, an invoice draft, or a customer reply."
  buttons={[
    {
      label: "Compare the test kits",
      href: "/blocks/products#list",
      variant: "default",
    },
    {
      label: "Explore the routing kit",
      href: "/blocks/product#featured",
      variant: "secondary",
    },
  ]}
  socialProof={{
    avatars: [
      { image: agentAvatars[0], initials: "LM", name: "Leila Moreno" },
      { image: agentAvatars[1], initials: "OP", name: "Owen Patel" },
      { image: agentAvatars[2], initials: "NC", name: "Nadia Chen" },
    ],
    rating: 5,
    text: "Fictional ratings for this example",
  }}
  image={{ src: placeholderImage, alt: "Sample image placeholder" }}
/>
```

```sh
bunx --bun shadcn@latest add @gnostic/hero-11
```

## Editorial bar

Keep the introduction in a bordered bar above the image.

```astro
---
import Hero12Block from "@/components/blocks/hero/hero-12.astro"
import placeholderImage from "@/assets/placeholder.webp"
---

<Hero12Block
  title="A ticket for two queues"
  description="Leila Moreno follows a ticket that asks about both billing and setup. See what reaches the reviewer when the routing rule finds two possible owners."
  buttons={[
    {
      label: "Read the routing field note",
      href: "/blocks/article#image-header",
    },
  ]}
  image={{ src: placeholderImage, alt: "Sample image placeholder" }}
/>
```

```sh
bunx --bun shadcn@latest add @gnostic/hero-12
```

## Compact split

Keep the text compact beside a larger image.

```astro
---
import Hero13Block from "@/components/blocks/hero/hero-13.astro"
import placeholderImage from "@/assets/placeholder.webp"
---

<Hero13Block
  title="Choose a test kit for your pilot"
  description="The gnostic AI sample catalog includes support tickets, invoices, and a reply checklist. Compare the kits to find the inputs your team needs."
  buttons={[
    {
      label: "Compare the test kits",
      href: "/blocks/products#list",
    },
  ]}
  image={{ src: placeholderImage, alt: "Sample image placeholder" }}
/>
```

```sh
bunx --bun shadcn@latest add @gnostic/hero-13
```

## Page banner

Use a page introduction with a bordered bar and supporting image.

```astro
---
import PageHeroBlock from "@/components/blocks/hero/hero-full-image-2col.astro"
import placeholderImage from "@/assets/placeholder.webp"
---

<PageHeroBlock
  title="Explore the gnostic AI pilot projects"
  description="See how a team tests ticket assignments, checks a disputed invoice, or reviews a reply against the returns policy."
  buttonText="View the three sample projects"
  buttonHref="/blocks/gallery#project-columns"
  image={{ src: placeholderImage, alt: "" }}
/>
```

```sh
bunx --bun shadcn@latest add @gnostic/hero-full-image-2col
```

## Orbit hero

Supply your own content. The section uses the selected project preset.

```astro
---
import Block from "@/components/blocks/hero/hero-orbit/hero-orbit.astro"
import type { OrbitHeroContent } from "@/components/blocks/hero/hero-orbit/types"

const content = {
  label: "gnostic AI · Invoice intake",
  title: "Would you approve this invoice?",
  description:
    "In this sample for fictional print suppliers, an accounts team checks three invoices against one purchase order. Which draft can go to the approval queue?",
  announcement: "Sample pilot for an accounts team",
  buttons: [
    {
      label: "Run the invoice exercise",
      href: "/blocks/article#editorial-article",
    },
    {
      label: "Read the intake questions",
      href: "/blocks/faqs#compact",
    },
  ],
  clients: ["River Paper", "Elm Bindery", "Oak Type"],
} satisfies OrbitHeroContent
---

<Block {content} />
```

```sh
bunx --bun shadcn@latest add @gnostic/hero-orbit
```

<AutoTypeTable
    path="../../packages/ui/src/components/blocks/hero/hero-orbit/types.ts"
    name="OrbitHeroProps"
/>

## Centered page title

Supply your own content. The section uses the selected project preset.

```astro
---
import Block from "@/components/blocks/hero/hero-centered-page/hero-centered-page.astro"
import type { CenteredPageHeroContent } from "@/components/blocks/hero/hero-centered-page/types"
import { getImage } from "astro:assets"
import lake from "../../../src/assets/images/mountain-beyond-lake-scene.png"

const lakeUrl = (await getImage({ src: lake, width: 1200, format: "webp" })).src
const content = {
  label: "gnostic AI · Routing exercise",
  title: "Which queue should get the third ticket?",
  image: {
    src: lakeUrl,
    alt: "Mountain ridge beyond a lake",
  },
  description:
    "Two tickets ask about billing or setup. The third asks about both. Write down who should receive each one before running the rule.",
  stats: [
    {
      value: "3",
      label: "Sample tickets",
    },
    {
      value: "1",
      label: "Mixed request",
    },
  ],
  caption: "Ticket routing test kit · Sample exercise",
} satisfies CenteredPageHeroContent
---

<Block {content} />
```

```sh
bunx --bun shadcn@latest add @gnostic/hero-centered-page
```

<AutoTypeTable
    path="../../packages/ui/src/components/blocks/hero/hero-centered-page/types.ts"
    name="CenteredPageHeroProps"
/>

## Editorial hero

Use this section for the hero part of a studio site. Set `servicesHref` to the
services section or page, such as `"#capabilities"` or `"/services"`. The template
supplies `"/#service"`. If you change the section ID, change this value too.

```astro
---
import Section from "@/components/blocks/hero/hero-featured-project/hero-featured-project.astro"
import { getImage } from "astro:assets"
import lake from "../../../src/assets/images/mountain-beyond-lake-scene.png"

const lakeUrl = (await getImage({ src: lake, width: 1200, format: "webp" })).src
const section = {
  title: "One inbox,",
  accent: "three pilot projects",
  description:
    "Explore three sample projects for fictional print suppliers. Follow a request from its source to the person who checks the result.",
  action: {
    label: "View the sample brief",
    href: "/blocks/contact#editorial-contact",
  },
  servicesHref: "/blocks/services#process",
  image: {
    src: lakeUrl,
    alt: "Mountain ridge beyond a lake",
  },
  services: [
    {
      label: "Ticket routing",
      href: "/blocks/article#image-header",
    },
    {
      label: "Reply review",
      href: "/blocks/article#centered-header",
    },
    {
      label: "Invoice intake",
      href: "/blocks/article#editorial-article",
    },
  ],
  featured: {
    title: "Three invoices, one purchase order",
    href: "/blocks/article#editorial-article",
    image: {
      src: lakeUrl,
      alt: "Mountain ridge beyond a lake",
    },
  },
  clients: ["Elm Bindery", "River Paper"],
}
---

<Section {...section} id="hero-featured-project" />
```

```sh
bunx --bun shadcn@latest add @gnostic/hero-featured-project
```

<AutoTypeTable
    path="../../packages/ui/src/components/blocks/hero/hero-featured-project/types.ts"
    name="HeroFeaturedProjectProps"
/>

See [serif accent font setup](/ui/docs/installation#serif-accent-fonts-for-editorial-blocks) when installing this section.

## Editorial intro

Use this section for the title of a secondary page.

```astro
---
import Section from "@/components/blocks/hero/hero-serif-introduction.astro"

const section = {
  label: "gnostic AI · Reply review",
  title: "Read the policy",
  accent: "before sending the draft",
}
---

<Section {...section} id="hero-serif-introduction" />
```

```sh
bunx --bun shadcn@latest add @gnostic/hero-serif-introduction
```

<AutoTypeTable
    path="../../packages/ui/src/components/blocks/shared/content-types.ts"
    name="EditorialHeadingProps"
/>

See [serif accent font setup](/ui/docs/installation#serif-accent-fonts-for-editorial-blocks) when installing this section.

## Masked background

Place a heading and links above a background photo. Use the `action` prop for one link or the `actions` slot for custom buttons.

```astro
---
import HeroMaskedBackground from "@/components/blocks/hero/hero-masked-background/hero-masked-background.astro"
import { getImage } from "astro:assets"
import field from "../../../src/assets/images/open-field-illustration.png"

const fieldUrl = (await getImage({ src: field, width: 1200, format: "webp" }))
  .src
const content = {
  eyebrow: "gnostic AI · Sample project brief",
  title: "Who answers a return request after the print fair?",
  description:
    "A print seller wants help with return questions. Use the pilot brief to name the policy an AI draft should cite and the person who checks the reply.",
  action: {
    label: "Open the reply pilot brief",
    href: "/blocks/contact#editorial-contact",
  },
  background: {
    src: fieldUrl,
    alt: "Illustration of an open field",
  },
}
---

<HeroMaskedBackground
  eyebrow={content.eyebrow}
  title={content.title}
  description={content.description}
  action={content.action}
  background={content.background}
  id="spring-print-fair"
/>
```

```sh
bunx --bun shadcn@latest add @gnostic/hero-masked-background
```

## Choose a hero layout

Choose a hero from the content you have. A short service page can use a title and two actions. A product page may need a screenshot that explains the product. Portfolio and editorial variants place more weight on the work or story. Use one clear page heading and make the first action describe the next step.

## Pass content from Astro

The variants have different prop types. For example, Hero 1 accepts title, description, an optional badge, buttons, and an image object. Import the block shown in the Code tab and pass your data into those props. Keep route queries and collection access in the page. Change sample claims and links before using the block in a real site.

## Responsive layout and images

Test the actual heading at a narrow width; a short demo title does not reveal every line-wrap problem. Buttons can wrap, but their reading order should remain clear. Hero 1 uses an Astro image with responsive widths and eager loading. Supply a local image import where ImageMetadata is required. Choose a crop that keeps the subject visible and write alt text for what the image adds to the page.

## Compose the next section

Follow the hero with [Features](/ui/blocks/features) that support its claim or [Content](/ui/blocks/content) that explains the offer. Use [Reviews](/ui/blocks/reviews) only for real evidence. A hero does not need an image when the image adds no useful information.

## Named slots

These slots are optional. Use the slot name on a direct child of the block.

### `hero-masked-background`

| Prop | Type | Default | Description |
| - | - | - | - |
| `background?` | `Astro content` | `Astro Image from data.background` | Replaces the background image. |
| `actions?` | `Astro content` | `CTA button when data.action is present` | Sets the actions below the description. |

### `hero-orbit`

| Prop | Type | Default | Description |
| - | - | - | - |
| `background?` | `Astro content` | - | Adds a background layer behind the hero content. |
| `mark?` | `Astro content` | - | Places the same mark before each client name. |

### `page-top`

| Prop | Type | Default | Description |
| - | - | - | - |
| `buttons?` | `Astro content` | - | Adds actions after the buttons supplied through props. |
| `image?` | `Astro content` | - | Adds content after the image supplied through props. |
