# Announcement

News badge link for what's new and product updates: a pill built on the secondary Badge, with a headline that truncates first and a Learn more action beside a short divider. Renders as an anchor, suited to hero announcements.

Component · Announcement · https://01orbital.dev/docs/components/announcement

## Installation

```bash
npx shadcn@latest add @01orbital/announcement
```

## Usage

```tsx
import { CaretRightIcon } from "@phosphor-icons/react/ssr"

import {
  Announcement,
  AnnouncementAction,
  AnnouncementText,
} from "@/components/announcement/announcement"

const COPY = {
  text: "Rothkore design intelligence",
  cta: "Learn more",
  art: "https://01orbital.dev/art/kit/celestograph-51208-gesso-1b.png",
}

export default function AnnouncementDemo() {
  return (
    <div className="grid w-full place-items-center gap-6 p-6">
      <Announcement href="#">
        <AnnouncementText>{COPY.text}</AnnouncementText>
        <AnnouncementAction>
          {COPY.cta}
          <CaretRightIcon aria-hidden="true" />
        </AnnouncementAction>
      </Announcement>
      {/* Over art it takes the dark theme; a pale plate is the hardest case. */}
      <div className="relative isolate grid max-w-full place-items-center overflow-hidden rounded-xl p-6">
        <img
          src={COPY.art}
          alt=""
          className="absolute inset-0 size-full object-cover"
        />
        <Announcement href="#" className="dark relative">
          <AnnouncementText>{COPY.text}</AnnouncementText>
          <AnnouncementAction>
            {COPY.cta}
            <CaretRightIcon aria-hidden="true" />
          </AnnouncementAction>
        </Announcement>
      </div>
    </div>
  )
}
```

This example installs with everything it uses:

```bash
npx shadcn@latest add @01orbital/announcement-demo
```

## Dependencies

Requires these pieces. The CLI adds each one that is missing and won't replace a file you already have unless you choose to:

- [Badge](https://01orbital.dev/docs/components/badge)
- [Separator](https://01orbital.dev/docs/components/separator)

The shadcn parts here are their Base UI versions, and this piece uses Base UI's API. A Radix version you already have won't work with it.

npm: `@base-ui/react`, `cn`

## Used in blocks

- [Hero with Black Hole Orb](https://01orbital.dev/docs/blocks/offset-hero-01)
- [Minimal Centered Hero](https://01orbital.dev/docs/blocks/minimal-hero-01)
- [Minimal Left-Aligned Hero](https://01orbital.dev/docs/blocks/minimal-hero-02)
- [Navbar Hero with Art Tiles](https://01orbital.dev/docs/blocks/centered-hero-03)
- [Split Hero with Eclipse Orb](https://01orbital.dev/docs/blocks/split-hero-01)
