---
title: Products Blocks for Astro
description: "Astro product collections with images, descriptions, and price displays."
seo:
    title: "Astro Products blocks: examples and source"
sidebar:
    label: "Products"
related:
    - /blocks
    - /components
    - /docs/astro-business-websites
---

## Image grid

Show product images and short descriptions in a grid.

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

<Products1Block
  badge="Index Supply"
  title="Tools for an organized desk"
  products={[
    {
      image: {
        src: placeholderImage,
        alt: "Product image placeholder",
      },
      title: "Weekly planning folio",
      description:
        "A refillable cover with space for the week, loose notes, and a short task list.",
      price: { value: 38, currency: "USD", unit: "item" },
    },
    {
      image: {
        src: placeholderImage,
        alt: "Product image placeholder",
      },
      title: "Pocket dot journal",
      description:
        "A small dot grid journal for observations and ideas when you are away from your desk.",
      price: { value: 14, currency: "USD", unit: "item" },
    },
    {
      image: {
        src: placeholderImage,
        alt: "Product image placeholder",
      },
      title: "Paper page markers",
      description:
        "Reusable paper markers help you return to a note without folding the page.",
      price: { value: 6, currency: "USD", unit: "item" },
    },
    {
      image: {
        src: placeholderImage,
        alt: "Product image placeholder",
      },
      title: "Canvas file sleeve",
      description:
        "A simple sleeve keeps loose sheets together between your desk and the next meeting.",
      price: { value: 22, currency: "USD", unit: "item" },
    },
  ]}
/>
```

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

## List

Use a compact list when the product details need less media.

```astro
---
import Products2Block from "@/components/blocks/products/products-2.astro"
---

<Products2Block
  badge="Index Supply"
  title="Choose the supplies for your next project"
  products={[
    {
      title: "Weekly planning folio",
      description:
        "A refillable cover with space for the week, loose notes, and a short task list.",
      price: { value: 38, currency: "USD", unit: "item" },
    },
    {
      title: "Pocket dot journal",
      description:
        "A small dot grid journal for observations and ideas when you are away from your desk.",
      price: { value: 14, currency: "USD", unit: "item" },
    },
    {
      title: "Paper page markers",
      description:
        "Reusable paper markers help you return to a note without folding the page.",
      price: { value: 6, currency: "USD", unit: "item" },
    },
    {
      title: "Canvas file sleeve",
      description:
        "A simple sleeve keeps loose sheets together between your desk and the next meeting.",
      price: { value: 22, currency: "USD", unit: "item" },
    },
  ]}
/>
```

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

## Price cards

Make the price easy to compare across product cards.

```astro
---
import Products3Block from "@/components/blocks/products/products-3.astro"
---

<Products3Block
  badge="Index Supply"
  title="Small essentials for everyday notes"
  products={[
    {
      title: "Weekly planning folio",
      description:
        "A refillable cover with space for the week, loose notes, and a short task list.",
      price: { value: 38, currency: "USD" },
    },
    {
      title: "Pocket dot journal",
      description:
        "A small dot grid journal for observations and ideas when you are away from your desk.",
      price: { value: 14, currency: "USD" },
    },
    {
      title: "Paper page markers",
      description:
        "Reusable paper markers help you return to a note without folding the page.",
      price: { value: 6, currency: "USD" },
    },
  ]}
/>
```

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

## Action row

Add a collection action beside the product row.

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

<Products4Block
  title="Build your own desk kit"
  description="Sample stationery from the fictional Index Supply catalog. Prices and product details are supplied through block props."
  buttons={[
    {
      label: "Browse the catalog",
      href: "https://example.com/index-supply/catalog",
      variant: "default",
    },
    {
      label: "Read product details",
      href: "https://example.com/index-supply/catalog",
      variant: "outline",
    },
  ]}
  products={[
    {
      image: {
        src: placeholderImage,
        alt: "Product image placeholder",
      },
      title: "Weekly planning folio",
      description:
        "A refillable cover with space for the week, loose notes, and a short task list.",
      price: { value: 38, currency: "USD", unit: "item" },
    },
    {
      image: {
        src: placeholderImage,
        alt: "Product image placeholder",
      },
      title: "Pocket dot journal",
      description:
        "A small dot grid journal for observations and ideas when you are away from your desk.",
      price: { value: 14, currency: "USD", unit: "item" },
    },
    {
      image: {
        src: placeholderImage,
        alt: "Product image placeholder",
      },
      title: "Paper page markers",
      description:
        "Reusable paper markers help you return to a note without folding the page.",
      price: { value: 6, currency: "USD", unit: "item" },
    },
  ]}
/>
```

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

## Hover grid

Use image-led cards with the block hover treatment.

```astro
---
import Products5Block from "@/components/blocks/products/products-5.astro"
import placeholderImage from "@/assets/placeholder.webp"
---

<Products5Block
  badge="Index Supply"
  title="Find your next daily notebook"
  buttons={[
    {
      label: "Browse the catalog",
      href: "https://example.com/index-supply/catalog",
      variant: "default",
    },
  ]}
  products={[
    {
      image: {
        src: placeholderImage,
        alt: "Product image placeholder",
      },
      title: "Weekly planning folio",
      description:
        "A refillable cover with space for the week, loose notes, and a short task list.",
      price: { value: 38, currency: "USD", unit: "item" },
    },
    {
      image: {
        src: placeholderImage,
        alt: "Product image placeholder",
      },
      title: "Pocket dot journal",
      description:
        "A small dot grid journal for observations and ideas when you are away from your desk.",
      price: { value: 14, currency: "USD", unit: "item" },
    },
    {
      image: {
        src: placeholderImage,
        alt: "Product image placeholder",
      },
      title: "Paper page markers",
      description:
        "Reusable paper markers help you return to a note without folding the page.",
      price: { value: 6, currency: "USD", unit: "item" },
    },
    {
      image: {
        src: placeholderImage,
        alt: "Product image placeholder",
      },
      title: "Canvas file sleeve",
      description:
        "A simple sleeve keeps loose sheets together between your desk and the next meeting.",
      price: { value: 22, currency: "USD", unit: "item" },
    },
  ]}
/>
```

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

## Choose a products layout

Choose a products grid when readers need to scan several items before opening a detail view. Keep each item’s information consistent so comparison is possible.

## Pass content from Astro

Pass the products array accepted by the chosen block. Format price and unit data consistently. Filtering, stock checks, and pagination are separate application concerns.

## Responsive layout and images

Check grid wrapping with long product titles and varied images. Use thumbnail sources and a consistent crop policy. Where the variant exposes links, make each destination name clear without relying only on its image.

## Compose the next section

Use [Product](/blocks/product) for item detail and [Pagination](/components/pagination) for collections split across routes.
