---
title: Banner Blocks for Astro
description: "Astro announcement strips for short messages and a related destination."
seo:
    title: "Astro Banner blocks: examples and source"
sidebar:
    label: "Banner"
related:
    - /blocks
    - /components
    - /docs/astro-business-websites
mode: wide
---

## Inline announcement

Keep a short announcement and its destination together.

```astro
---
import BannerInlineAnnouncement from "@/components/blocks/banner/banner-inline-announcement.astro"
---

<BannerInlineAnnouncement
  title="New Blocks"
  description="Fully built blocks for Astro"
  link={{
    label: "View Blocks",
    href: "",
  }}
/>
```

```sh
bunx --bun shadcn@latest add @gnostic/banner-inline-announcement
```

## Floating actions

Give an inset announcement room for two action links.

```astro
---
import BannerFloatingActions from "@/components/blocks/banner/banner-floating-actions.astro"
---

<BannerFloatingActions
  title="Plan a support pilot with gnostic AI"
  description="Start with one request your team assigns by hand."
  actions={[
    {
      label: "View the pilot steps",
      href: "/blocks/services#process",
    },
    {
      label: "Open the sample brief",
      href: "/blocks/contact#editorial-contact",
      variant: "outline",
    },
  ]}
/>
```

```sh
bunx --bun shadcn@latest add @gnostic/banner-floating-actions
```

## Choose a banner layout

Choose a banner for a temporary service message or an announcement that belongs across several pages. Keep it short enough that it does not dominate the header.

## Pass content from Astro

Pass the title, description, and optional link accepted by the variant. Use the link for the page that explains the notice. If a variant supports dismissal, make sure important information remains available after it closes.

## Responsive layout and images

Check the message and action together on a phone. Text should wrap without hiding the close control. These layouts are text-led; an image is rarely needed. Inspect contrast on the selected banner surface in both modes.
