# Announcement banners

> Two dismissible announcement banners — an inline bordered page banner and a full-bleed primary-color variant.

A shadcn/ui block from the [@quill](https://www.quilldesignsystem.com) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/quill/announcement-banner).

- Page, with a live preview: https://shadcn.exchange/r/quill/announcement-banner
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/quill/announcement-banner-light-dc9d25e2ee3fef57.png
- Registry item: https://www.quilldesignsystem.com/r/announcement-banner.json
- Categories: feedback, marketing
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://www.quilldesignsystem.com/r/announcement-banner.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- Registry items: `badge`, `button`, `https://www.quilldesignsystem.com/r/icon.json`

## Notes from the registry

Two dismissible announcement banners — an inline bordered page banner and a full-bleed primary-color variant. Do: Give every banner variant its own dismiss button with a specific aria-label (e.g. "Dismiss workshop banner"), not a generic one. Don't: Ship a banner with no way to dismiss it, or multiple banners sharing one ambiguous "Dismiss" label. Use alerts when the message is local to a page section and tied to system status, not a site-wide announcement. Use cookie-consent when the banner requires an explicit choice (accept/reject), not just a dismiss.

## Files

### `registry/blocks/announcement-banner.tsx`

```tsx
import { Badge } from '@/components/ui/badge'
import { Button } from '@/components/ui/button'
import { Icon } from '@/components/ui/icon'

/** Two dismissible announcement banners — an inline bordered page banner and a full-bleed primary-color variant. */
export function AnnouncementBanner() {
  return (
    <div className="mx-auto flex w-full max-w-[880px] flex-col gap-4">
      {/* Inline page banner */}
      <div className="flex items-center justify-between gap-4 rounded-lg bg-card px-4 py-3 ring-1 ring-foreground/10 max-sm:flex-col max-sm:items-start">
        <div className="flex items-center gap-3">
          <Badge>New</Badge>
          <p className="text-sm text-foreground">
            Issue 004 of The Brief just shipped — how we scope a design system engagement.
          </p>
        </div>
        <div className="flex shrink-0 items-center gap-1">
          <Button variant="link" size="sm">
            Read it <Icon name="arrow_forward" size={14} />
          </Button>
          <Button variant="ghost" size="icon-sm" aria-label="Dismiss announcement">
            <Icon name="close" size={16} />
          </Button>
        </div>
      </div>
      {/* Full-bleed ink banner */}
      <div className="flex items-center justify-between gap-4 rounded-lg bg-primary px-4 py-3 text-primary-foreground max-sm:flex-col max-sm:items-start">
        <p className="text-sm">
          <span className="font-medium">Workshop:</span> Design systems for product teams — Saturday,
          July 26. Twelve seats.
        </p>
        <div className="flex shrink-0 items-center gap-1">
          <Button variant="secondary" size="sm">
            Save a seat
          </Button>
          <Button
            variant="ghost"
            size="icon-sm"
            aria-label="Dismiss workshop banner"
            className="text-primary-foreground hover:bg-primary-foreground/10 hover:text-primary-foreground"
          >
            <Icon name="close" size={16} />
          </Button>
        </div>
      </div>
    </div>
  )
}
```
