# Banner: release notice

> A compact release announcement with an optional link to the details.

- Kind: block · Category: Banner · Interactivity: native
- Install: `npx shadcn@latest add @haze/banner-release-notice`
- File: `src/components/haze/blocks/banner-release-notice.astro`
- npm dependencies: @lucide/astro
- Registry dependencies: @haze/utils
- Docs page: https://hazeui.com/blocks/banner-release-notice

## Use when
- Calling attention to a product update within a page
- The notice needs a title, brief explanation and optional destination

## Avoid when
- The content is a complete call to action with several choices; use cta-banner

## Alternatives
- [cta-banner](https://hazeui.com/blocks/cta-banner.md)
- [changelog-release-list](https://hazeui.com/blocks/changelog-release-list.md)

## Props

| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| id | `string` | "banner-release-notice" | no | Unique notice ID prefix. |
| label | `string` | "What's new" | no | Short label above the notice title. |
| title | `string` | demo heading | no | Notice heading. |
| description | `string` | demo copy | no | Short supporting explanation. |
| href | `string` |  | no | Optional destination for details; no link is rendered without it. |
| linkLabel | `string` | "See what's changed" | no | Text for the details link. |
| headingLevel | `1 \| 2 \| 3` | 2 | no | Heading level for the page context. |
| class | `string` |  | no | Additional section classes. |

## Accessibility
- The notice is labelled by its heading and makes no claim to be a live alert.
- The link is omitted entirely when no destination is supplied.
- Key Tab, Enter: Follow the release link when a destination is provided.

## Agent prompts

### Install and use

Install the Haze UI block "Banner: release notice" with `npx shadcn@latest add @haze/banner-release-notice`. If components.json has no "@haze" registry yet, add "registries": { "@haze": "https://hazeui.com/r/{name}.json" }. If src/styles/haze.css does not exist yet, run `npx shadcn@latest add @haze/theme` once and import it from the global stylesheet after Tailwind. The CLI stops at an overwrite question when a Haze file already exists and differs, even with --yes, and then installs nothing after it: read its output. If the user has not edited their Haze files, re-run with --overwrite to take the registry versions; if they have, ask them before overwriting. Then import BannerReleaseNotice from "@/components/haze/blocks/banner-release-notice.astro" (or the relative path) and render it where it fits the page. Keep Haze token classes (bg-background, text-muted-foreground, border-border...) and never hardcode colors. Docs: https://hazeui.com/blocks/banner-release-notice.md

### Customize with real content

Adapt the Haze banner-release-notice block for our product. Replace the demo values of these props with our real content: id, label, title, description, href, linkLabel, headingLevel, class. Keep the layout, the heading level rules and these accessibility details: The notice is labelled by its heading and makes no claim to be a live alert. The link is omitted entirely when no destination is supplied. Do not add raw color classes; use the Haze tokens.

### Choose the right block

Before using banner-release-notice, check it fits: use it when calling attention to a product update within a page; the notice needs a title, brief explanation and optional destination. Avoid it when the content is a complete call to action with several choices; use cta-banner. Alternatives: @haze/cta-banner, @haze/changelog-release-list.

## Example requests that should lead here
- Add a compact product release announcement with a link to the changelog

## Source

```astro
---
import { ArrowRight, Sparkles } from "@lucide/astro";
import { cn } from "../../../lib/haze/utils";

interface Props {
  id?: string;
  label?: string;
  title?: string;
  description?: string;
  href?: string;
  linkLabel?: string;
  headingLevel?: 1 | 2 | 3;
  class?: string;
}

const {
  id = "banner-release-notice",
  label = "What's new",
  title = "A more focused workspace is here",
  description = "Explore the latest improvements to your shared projects.",
  href,
  linkLabel = "See what's changed",
  headingLevel = 2,
  class: className,
} = Astro.props;
const Heading = ({ 1: "h1", 2: "h2", 3: "h3" } as const)[headingLevel];
---

<section aria-labelledby={`${id}-title`} class={cn("bg-background px-6 py-8", className)}>
  <div class="mx-auto flex max-w-6xl flex-col gap-4 rounded-xl border border-border bg-card p-5 sm:flex-row sm:items-center sm:gap-5 sm:px-6">
    <span class="flex size-10 shrink-0 items-center justify-center rounded-lg bg-foreground/5 text-foreground inset-ring inset-ring-frame"><Sparkles aria-hidden="true" class="size-5" /></span>
    <div class="min-w-0 flex-1">
      <p class="text-[0.6875rem]/4 font-medium tracking-wider text-muted-foreground uppercase">{label}</p>
      <Heading id={`${id}-title`} class="mt-1 text-sm/5 font-semibold text-foreground">{title}</Heading>
      <p class="mt-1 text-sm/6 text-muted-foreground">{description}</p>
    </div>
    {href && <a href={href} class="inline-flex min-h-10 shrink-0 items-center gap-2 self-start rounded-md text-sm/5 font-medium text-foreground transition-colors duration-150 ease-snappy hover:text-foreground/80 focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ring sm:self-center">{linkLabel}<ArrowRight aria-hidden="true" class="size-4" /></a>}
  </div>
</section>
```
