---
title: Content Blocks for Astro
description: "Astro media-and-text sections for explanations, stories, and project details."
seo:
    title: "Astro Content blocks: examples and source"
sidebar:
    label: "Content"
related:
    - /blocks
    - /components
    - /docs/astro-business-websites
mode: wide
---

## Stacked media

Put the explanation before a full-width media area.

```astro
---
import Content1Block from "@/components/blocks/content/content-1.astro"
import Photo from "@/assets/images/winter-landscape-orion.png"
---

<Content1Block
  image={{ src: Photo, alt: "Winter landscape" }}
  title="Prepare three tickets for a routing test"
  description="In the gnostic AI sample, one customer needs an invoice, one needs help with setup, and one asks for both. Have the support lead record the expected owner for each."
  features={[
    "Copy each original message into the test queue",
    "Assign the invoice request to billing",
    "Assign the setup question to support",
    "Send the mixed request to an intake reviewer",
  ]}
  buttons={[
    {
      label: "View the routing kit",
      href: "/blocks/product#featured",
    },
    {
      label: "Read the test steps",
      href: "/blocks/features#image-steps",
      variant: "secondary",
    },
  ]}
/>
```

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

## Metrics and materials

Present measurements and material samples in two linked sections.

```astro
---
import Block from "@/components/blocks/content/content-metrics-and-materials.astro"
import lake from "../../../src/assets/images/mountain-beyond-lake-scene.png"
import { getImage } from "astro:assets"

const lakeUrl = (await getImage({ src: lake, width: 1200, format: "webp" })).src
const content = {
  signals: {
    eyebrow: "gnostic AI · Invoice review",
    title: "Why did this invoice stop?",
    description:
      "The supplier billed $264 against a $240 purchase order in this sample.",
    headline: "$24 over the order",
    summary:
      "The reviewer needs both source documents before deciding what to do.",
    metrics: [
      {
        label: "Billed amount",
        value: "$264",
        description: "Total on the disputed invoice.",
        source: "Sample invoice",
      },
    ],
    methodologyTitle: "How to check the difference",
    methodologyDescription:
      "Use the totals from the invoice and its purchase order.",
    methodology: [
      {
        question: "How much more did the supplier bill?",
        answer:
          "Subtract the $240 order from the $264 invoice. Record the $24 difference on the draft.",
      },
    ],
  },
  materials: {
    eyebrow: "Review documents",
    title: "What the reviewer receives",
    description:
      "Keep the invoice and the order together so the reviewer can check both totals.",
    tags: ["Supplier invoice", "Purchase order"],
    specifications: [
      {
        label: "Order amount",
        value: "$240",
      },
    ],
    gallery: [
      {
        src: lakeUrl,
        alt: "Mountain ridge beyond a lake",
      },
    ],
    note: "The disputed draft stays in the review queue.",
    action: {
      label: "Read the invoice field note",
      href: "/blocks/article#editorial-article",
    },
  },
}
---

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

```sh
bunx --bun shadcn@latest add @gnostic/content-metrics-and-materials
```

## Split media

Keep a supporting image beside the explanation.

```astro
---
import Content2Block from "@/components/blocks/content/content-2.astro"
---

<Content2Block
  title="What happens when two queues match?"
  description="Run the mixed ticket through the rule. Check that the reviewer receives both questions before deciding who should answer first."
  features={[
    "Keep both questions in the ticket",
    "Record the queue the rule suggests",
    "Compare it with the expected owner",
  ]}
  actions={[
    {
      label: "Read the routing field note",
      href: "/blocks/article#image-header",
    },
    {
      label: "Check the routing FAQ",
      href: "/blocks/faqs#centered",
      variant: "secondary",
    },
  ]}
/>
```

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

## Features tabs

Give each tab a heading, a description, and an image. Select a tab or a dot to show its image.

```astro
---
import FeaturesTabs from "@/components/blocks/content/features-tabs.astro"
import ship from "@/assets/wizard/wizard-spaceship.png"
import dock from "@/assets/images/spaceship-docking-in-ocean.png"
import field from "@/assets/wizard/wizard-in-field-looking-at-planet.png"
import moon from "@/assets/wizard/wizard-on-moon.jpeg"
---

<FeaturesTabs
  title="Which image tags should the editor keep?"
  description="In this gnostic AI sample, a tool suggests a search tag for each illustration. Select a tag to compare it with the image."
  tabs={[
    {
      heading: "Forest clearing",
      content:
        "Keep this tag. Trees surround the open ground where the spaceship sits.",
      image: {
        src: ship,
        alt: "A white spaceship in a forest clearing",
        class: "object-left",
      },
    },
    {
      heading: "Ocean liner",
      content:
        "Change this tag to “spaceship.” The craft hovers above the water beside a coastal road.",
      image: {
        src: dock,
        alt: "A spaceship above the water beside a coastal road",
      },
    },
    {
      heading: "Saturn",
      content:
        "Change this tag to “planet.” The illustration shows a planet, but the image alone cannot identify it as Saturn.",
      image: { src: field, alt: "A giant planet above a field" },
    },
    {
      heading: "Earth",
      content:
        "Keep this tag. The view from the Moon shows Earth above the ridge.",
      image: { src: moon, alt: "Earth above the lunar horizon" },
    },
  ]}
/>
```

```sh
bunx --bun shadcn@latest add @gnostic/features-tabs
```

## Spread header

Arrange the heading and actions above the media.

```astro
---
import Content3Block from "@/components/blocks/content/content-3.astro"
---

<Content3Block
  title="Run the same tickets after a rule change"
  description="A change that sends the setup question to the right queue can also move the billing request. Repeat all three cases and record which assignments changed."
  buttons={[
    {
      label: "Review the three test cases",
      href: "/blocks/features#image-steps",
    },
    {
      label: "Open the pilot reading list",
      href: "/blocks/articles#text-grid",
      variant: "secondary",
    },
  ]}
/>
```

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

## Wide media

Give the media more room than the supporting text.

```astro
---
import Content4Block from "@/components/blocks/content/content-4.astro"
---

<Content4Block
  title="Can the queue owner take over?"
  description="Ask the incoming support lead to pause the routing rule in the test queue and assign a waiting request. Keep the test tickets and expected owners with the handoff notes."
  features={[
    "Find the requests that are still waiting",
    "Assign one request by hand",
    "Repeat the saved tests when the rule changes",
  ]}
  buttons={[
    {
      label: "See the handoff checklist",
      href: "/blocks/features#illustrated-timeline",
    },
    {
      label: "Read the routing questions",
      href: "/blocks/faqs#centered",
      variant: "secondary",
    },
  ]}
/>
```

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

## Product introduction

Place partner logos above a large heading and product image.

```astro
---
import Block from "@/components/blocks/content/content-logo-statement.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 content = {
  title: "Keep the tenant’s original words",
  description:
    "The work order pilot keeps the request beside the draft. A reviewer can check the unit number and the reported problem before scheduling a repair.",
  image: {
    src: lakeUrl,
    alt: "Mountain ridge beyond a lake",
  },
  logos: [
    {
      src: "/gnostic-ai-logo.svg",
      alt: "gnostic AI",
    },
  ],
}
---

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

```sh
bunx --bun shadcn@latest add @gnostic/content-logo-statement
```

## Results and method

Pair a main result with metric cards and expandable method notes.

```astro
---
import Block from "@/components/blocks/content/content-metrics-methodology.astro"
const content = {
  eyebrow: "gnostic AI · Sample invoice test",
  title: "Which invoices should reach approval?",
  description:
    "These are the expected results for three test submissions against one purchase order. Compare them with the queue after each test run.",
  headline: "1 of 3 ready for approval",
  summary:
    "Only the original invoice with the matching total should reach the usual approval queue.",
  metrics: [
    {
      label: "Matching invoice",
      value: "$240",
      description: "The billed amount agrees with the order.",
      source: "Fictional sample",
    },
    {
      label: "Disputed invoice",
      value: "$264",
      description: "The billed amount exceeds the order by $24.",
      source: "Fictional sample",
    },
    {
      label: "Duplicate copies",
      value: "1",
      description:
        "The third submission repeats the supplier and invoice number from the first.",
      source: "Fictional sample",
    },
  ],
  methodologyTitle: "How to read the queue",
  methodologyDescription:
    "Check the route of each submission before counting the drafts ready for approval.",
  methodology: [
    {
      question: "Does the second copy count as a new bill?",
      answer:
        "Count it as a test submission. It should point to the original draft and stay out of the approval queue.",
    },
    {
      question: "What if the disputed invoice reaches approval?",
      answer:
        "Record the wrong route, correct the rule, and repeat all three submissions.",
    },
  ],
}
---

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

```sh
bunx --bun shadcn@latest add @gnostic/content-metrics-methodology
```

## Image strip

```astro
---
import Block from "@/components/blocks/content/content-image-strip.astro"
import { getImage } from "astro:assets"
import lake from "../../../src/assets/images/mountain-beyond-lake-scene.png"
import hall from "../../../src/assets/images/entrance-hall.png"
import field from "../../../src/assets/images/open-field-illustration.png"

const lakeUrl = (await getImage({ src: lake, width: 1200, format: "webp" })).src
const hallUrl = (await getImage({ src: hall, width: 1200, format: "webp" })).src
const fieldUrl = (await getImage({ src: field, width: 1200, format: "webp" }))
  .src
const content = {
  title: "Mara Reed, automation consultant",
  description:
    "In this sample gnostic AI portfolio, Mara tests a billing ticket, a returns question, and a disputed invoice. Her field notes show where each case needs a person to review it.",
  image: {
    src: lakeUrl,
    alt: "Mountain ridge beyond a lake",
  },
  skills: ["Workflow mapping", "Pilot testing"],
  experience: [
    {
      role: "Pilot reviewer",
      company: "gnostic AI sample team",
      period: "Weeks 1–2",
    },
  ],
  projects: [
    {
      src: lakeUrl,
      alt: "Mountain ridge beyond a lake",
      name: "How to test a ticket routing rule",
      label: "Test ticket routing",
      href: "/blocks/article#image-header",
    },
    {
      src: hallUrl,
      alt: "An illustrated entrance hall",
      name: "How to review an AI-drafted reply",
      label: "Review a draft reply",
      href: "/blocks/article#centered-header",
    },
    {
      src: fieldUrl,
      alt: "Illustration of an open field",
      name: "When an invoice total needs a second look",
      label: "Check an invoice total",
      href: "/blocks/article#editorial-article",
    },
  ],
  projectsId: "editions",
}
---

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

```sh
bunx --bun shadcn@latest add @gnostic/content-image-strip
```

## Split statement

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

```astro
---
import Block from "@/components/blocks/content/content-split-statement/content-split-statement.astro"
import type { SplitStatementContent } from "@/components/blocks/content/content-split-statement/types"

const content = {
  title: "What needs repair, and where?",
  description:
    "The pilot checks two details before it sends a draft work order for review: the problem and the unit number.",
  value: "2",
} satisfies SplitStatementContent
---

<Block {content} />
```

```sh
bunx --bun shadcn@latest add @gnostic/content-split-statement
```

<AutoTypeTable
    path="../../packages/ui/src/components/blocks/content/content-split-statement/types.ts"
    name="SplitStatementProps"
/>

## Story and statistics

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

```astro
---
import Block from "@/components/blocks/content/content-story-stats/content-story-stats.astro"
import type { StoryStatsContent } from "@/components/blocks/content/content-story-stats/types"
import { getImage } from "astro:assets"
import lake from "../../../src/assets/images/mountain-beyond-lake-scene.png"
import hall from "../../../src/assets/images/entrance-hall.png"
import field from "../../../src/assets/images/open-field-illustration.png"

const lakeUrl = (await getImage({ src: lake, width: 1200, format: "webp" })).src
const hallUrl = (await getImage({ src: hall, width: 1200, format: "webp" })).src
const fieldUrl = (await getImage({ src: field, width: 1200, format: "webp" }))
  .src
const content = {
  label: "gnostic AI · Sample invoice pilot",
  title: "Follow an invoice through three checks",
  description:
    "Run the original bill first. Then change the total on a new bill and send a second copy of the original.",
  milestones: [
    {
      label: "First submission",
      image: {
        src: lakeUrl,
        alt: "Mountain ridge beyond a lake",
      },
      title: "Match the order",
      description:
        "The $240 invoice matches the purchase order. Send its draft to the usual approval queue.",
    },
    {
      label: "Second submission",
      image: {
        src: hallUrl,
        alt: "An illustrated entrance hall",
      },
      title: "Hold the disputed total",
      description:
        "A new invoice number shows a $264 total. Give the reviewer both documents and the $24 difference.",
    },
    {
      label: "Third submission",
      image: {
        src: fieldUrl,
        alt: "Illustration of an open field",
      },
      title: "Find the original draft",
      description:
        "The copy repeats the first invoice number from the same supplier. Link it to the first draft for review.",
    },
  ],
} satisfies StoryStatsContent
---

<Block {content} />
```

```sh
bunx --bun shadcn@latest add @gnostic/content-story-stats
```

<AutoTypeTable
    path="../../packages/ui/src/components/blocks/content/content-story-stats/types.ts"
    name="StoryStatsProps"
/>

## Editorial about

Use this section for the about part of a studio site.

```astro
---
import Section from "@/components/blocks/content/content-wordmark-stats/content-wordmark-stats.astro"

const section = {
  label: "Sample invoice intake",
  title: "One order, three ways to test intake",
  description:
    "The gnostic AI sample uses a matching invoice, a disputed total, and a duplicate to test the queue before a team connects it to live bills.",
  stats: [
    {
      value: "$240",
      label: "Purchase order total",
    },
    {
      value: "3",
      label: "Test submissions",
    },
  ],
  wordmark: "gnostic AI",
}
---

<Section {...section} />
```

```sh
bunx --bun shadcn@latest add @gnostic/content-wordmark-stats
```

<AutoTypeTable
    path="../../packages/ui/src/components/blocks/content/content-wordmark-stats/types.ts"
    name="ContentWordmarkStatsProps"
/>

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

## Editorial project milestones

Each row pairs an organization and a project with a short title. This example uses the title for the check each team makes. The [pilot field notes](/ui/blocks/article) describe the three test cases.

```astro
---
import Section from "@/components/blocks/awards/awards-credit-list/awards-credit-list.astro"

const section = {
  label: "gnostic AI · Sample project credits",
  title: "Who checks",
  accent: "each pilot?",
  awards: [
    {
      organization: "Support operations",
      title: "Verify that a mixed billing and setup ticket reaches a reviewer",
      project: "Ticket routing",
    },
    {
      organization: "Customer support",
      title:
        "Check which items need their original packaging before sending a reply",
      project: "Reply review",
    },
    {
      organization: "Accounts payable",
      title: "Check the extra $24 against the purchase order",
      project: "Invoice intake",
    },
  ],
}
---

<Section {...section} />
```

```sh
bunx --bun shadcn@latest add @gnostic/awards-credit-list
```

<AutoTypeTable
    path="../../packages/ui/src/components/blocks/awards/awards-credit-list/types.ts"
    name="AwardsCreditListProps"
/>

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

## Image strip benefits

```astro
---
import Block from "@/components/blocks/content/content-image-strip-benefits/content-image-strip-benefits.astro"
import { getImage } from "astro:assets"
import lake from "../../../src/assets/images/mountain-beyond-lake-scene.png"
import hall from "../../../src/assets/images/entrance-hall.png"
import field from "../../../src/assets/images/open-field-illustration.png"

const lakeUrl = (await getImage({ src: lake, width: 1200, format: "webp" })).src
const hallUrl = (await getImage({ src: hall, width: 1200, format: "webp" })).src
const fieldUrl = (await getImage({ src: field, width: 1200, format: "webp" }))
  .src
const content = {
  brand: "gnostic AI",
  title: "Test the intake rule with two requests",
  description:
    "Report the same leak twice. Include the unit number in the first request and leave it out of the second.",
  benefits: [
    {
      title: "Unit given: send the draft for review",
      icon: "layers",
    },
    {
      title: "Unit missing: ask the tenant",
      icon: "book-open",
    },
  ],
  images: [
    {
      src: lakeUrl,
      alt: "Mountain ridge beyond a lake",
    },
    {
      src: hallUrl,
      alt: "An illustrated entrance hall",
    },
    {
      src: fieldUrl,
      alt: "Illustration of an open field",
    },
  ],
  trustTitle: "Where should each request go?",
}
---

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

```sh
bunx --bun shadcn@latest add @gnostic/content-image-strip-benefits
```

## Benefits stats

```astro
---
import Block from "@/components/blocks/content/content-benefits-stats/content-benefits-stats.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 content = {
  title: "Try invoice intake with three sample bills",
  description:
    "Use the gnostic AI test queue to see which draft can go to approval and which two need a closer look.",
  benefits: ["Check a price difference", "Catch a second copy"],
  action: {
    label: "Open the invoice test guide",
    href: "/blocks/article#editorial-article",
  },
  image: {
    src: lakeUrl,
    alt: "Mountain ridge beyond a lake",
  },
  stats: [
    {
      value: "3",
      label: "Sample invoices",
    },
    {
      value: "1",
      label: "Purchase order",
    },
  ],
}
---

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

```sh
bunx --bun shadcn@latest add @gnostic/content-benefits-stats
```

## Video demonstration

A local video with a poster, playback controls, and a caption.

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

<Block
  eyebrow="Animation study"
  title="Over the rooftops"
  description="Watch a short landscape animation."
  src={video}
  poster={{ src: poster, alt: "A wizard overlooking a town" }}
  caption="A study of light and motion."
/>
```

```sh
bunx --bun shadcn@latest add @gnostic/content-video-demo
```

## Split image and story

An imported image beside plain text and an optional action.

```astro
---
import Block from "@/components/blocks/content/content-split-story.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 content = {
  eyebrow: "Work order intake",
  title: "A leaking tap, but which unit?",
  image: {
    src: lakeUrl,
    alt: "Mountain ridge beyond a lake",
  },
  action: {
    label: "See the pilot steps",
    href: "/blocks/services#process",
  },
  paragraphs: [
    "A tenant reports a leaking kitchen tap. The message gives the building address but leaves out the unit number.",
    "The intake rule saves the tenant’s message with the draft. A coordinator asks for the unit number before sending the work order for review.",
  ],
}
---

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

```sh
bunx --bun shadcn@latest add @gnostic/content-split-story
```

## Choose a content layout

Choose a content layout that fits the balance between your text and media. A short explanation can sit beside one image; a longer story may need several sections with separate headings.

## Pass content from Astro

Pass the chosen variant’s title, description, optional features, buttons, and image data. Keep the text structured rather than placing an entire page in one description string. Use slots where the block exposes them for richer markup.

## Responsive layout and images

Review the order when columns stack on small screens. Import local images for props typed as ImageMetadata and choose a crop suited to the displayed ratio. Check that text remains readable when the image is missing or delayed.

## Compose the next section

Use [Hero](/ui/blocks/hero) for the opening statement, [Features](/ui/blocks/features) for a set of benefits, and [CTA](/ui/blocks/cta) for the next action.

## Named slots

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

### `content-image-strip-benefits`

| Prop | Type | Default | Description |
| - | - | - | - |
| `brand?` | `Astro content` | `Text from data.brand` | Sets the brand above the heading. |

### `content-benefits-stats`

| Prop | Type | Default | Description |
| - | - | - | - |
| `image?` | `Astro content` | `Astro Image from data.image` | Replaces the image beside the benefits. |

### `content-case-carousel`

| Prop | Type | Default | Description |
| - | - | - | - |
| `mark?` | `Astro content` | - | Places the same mark before each case label. |

### `image-compare-slider-section`

| Prop | Type | Default | Description |
| - | - | - | - |
| `slider?` | `Astro content` | `ImageCompare with beforeImage, afterImage, and startingPosition` | Replaces the entire comparison control. |

### `split-image-left`

| Prop | Type | Default | Description |
| - | - | - | - |
| `image?` | `Astro content` | `Image from the image prop` | Replaces the image next to the text. |
