---
title: "Announcement"
description: "A small rounded link above a hero headline that points to news, such as a launch post. A light can run around its border for a big launch."
url: https://gelatinui.com/components/announcement
markdown_url: https://gelatinui.com/components/announcement.md
access: free
install: "npx shadcn@latest add @gelatin-ui/announcement"
registry_item: https://gelatinui.com/r/announcement.json
version: "2026-11-09"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Announcement

> A small rounded link above a hero headline that points to news, such as a launch post. A light can run around its border for a big launch.

Page: https://gelatinui.com/components/announcement

## When to use it

Best for: A small link above a hero headline that points to one piece of news.

- Put it above the headline of a landing page or a docs home.
- Use `beam` or `shine` for a big launch, and `outline` for a quiet one.
- Pass a router link through `render`, or a `<div />` for a pill with no link.

## When not to use it

- For a bar across the top of every page, use the [Announcement Bar](https://gelatinui.com/components/announcement-bar.md).
- For a short status word on an item, use a [Badge](https://gelatinui.com/components/badge.md).

## Notes for agents

- The root is one `<a>`. Compose `AnnouncementTag`, `AnnouncementTitle`, `AnnouncementSeparator`, and `AnnouncementArrow` in it.
- `loopDuration` sets the seconds of one loop of the `beam` or the `shine`.
- The light loops stop off screen and in a hidden tab.
- A long title cuts with an ellipsis. The tag and the arrow keep their size.

## Anatomy

```text
Announcement
├─ AnnouncementTag (0..n)
├─ AnnouncementTitle (0..n)
├─ AnnouncementSeparator (0..n)
└─ AnnouncementArrow (0..n)
```

## API reference

### Announcement

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `size` | `"default" \| "lg" \| "sm"` | "default" |  |
| `variant` | `"beam" \| "inverse" \| "outline" \| "secondary" \| "shine"` | "outline" |  |
| `loopDuration` | `number` | 4 | Seconds of one loop of the light: one lap of the `beam`, one cycle of the `shine` (the band crosses in the first 30%, then waits). |

Also takes every prop of Base UI `UseRender`: https://base-ui.com/react/components/use-render

### AnnouncementTag

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `variant` | `"dashed" \| "default" \| "destructive" \| "ghost" \| "info" \| "link" \| "media" \| "outline" \| "secondary" \| "success" \| "warning"` |  |  |

Also takes every prop of Base UI `UseRender`: https://base-ui.com/react/components/use-render

### AnnouncementTitle

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### AnnouncementSeparator

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### AnnouncementArrow

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `alt` | `string` |  |  |
| `color` | `string` |  |  |
| `weight` | `IconWeight` |  |  |
| `mirrored` | `boolean` |  |  |

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| Announcement | `announcement` | `data-stage-hover` | `--foreground` | `hit-area`, `motion-timing` |
| AnnouncementTag | `announcement-tag` |  |  |  |
| AnnouncementTitle | `announcement-title` |  |  |  |
| AnnouncementSeparator | `announcement-separator` |  |  |  |
| AnnouncementArrow | `announcement-arrow` |  |  |  |

## Usage

Import Announcement and compose its parts.

```tsx title="announcement.tsx"
import { AnnouncementArrow, AnnouncementSeparator, AnnouncementTitle, AnnouncementTag, Announcement } from "@/components/effects/announcement";

export function AnnouncementDemo() {
  return (
    <Announcement variant="beam" href="#charts">
      <AnnouncementTag>New</AnnouncementTag>
      <AnnouncementTitle>Charts 2.0 — 32 chart types on one engine</AnnouncementTitle>
      <AnnouncementSeparator />
      <AnnouncementArrow />
    </Announcement>
  );
}
```

## Compose

Rules:

- Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts.
- Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry.

## Add it

```bash
npx shadcn@latest add @gelatin-ui/announcement
```

It adds 20 registry items: 17 files, 2842 lines, and the npm packages `@base-ui/react`, `@phosphor-icons/react`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`.

## Built on

- [Badge](https://gelatinui.com/components/badge.md)

## For AI agents

- Every item, one file: https://gelatinui.com/llms.txt
- MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp

## Related

- [Announcement Bar](https://gelatinui.com/components/announcement-bar.md)
- [Badge](https://gelatinui.com/components/badge.md)
- [Button](https://gelatinui.com/components/button.md)

## Keyboard

| Keys | Action |
| --- | --- |
| Tab | Moves to the pill. |
| Enter | Opens the link. |

## Motion

| Part | Motion |
| --- | --- |
| Arrow | hover · the arrow moves 2px to the end |
| Beam and shine | none · one loop of `loopDuration` seconds (4 by default), not a motion token |
