Theme
Install with your agentnpx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-banner.json --yes

Banner

Pro

A full-width accent pill that announces one thing, such as an app to install or a feature to switch on, with one action at its end, for React and Tailwind CSS. Part of Goop Pro.

When to use

  • A full-width accent pill that announces one thing, such as an app to install or a feature to switch on, with one action at its end.
  • Also called: announcement bar.

Installation

Paste the prompt below into your coding agent. It reads Goop's install steps, installs the part and its tokens once, then reuses this same Banner on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing. As a Pro part, its command comes from Goop's server once you sign in, with a one-time link that lasts ten minutes.

Terminal
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-banner.json --yes
PROMPT
Add the Goop Banner to this project. The install steps are at https://goop.so/docs/install.md

Usage

TSX
import { useState } from 'react';
import { Banner, BannerAction, BannerDescription, BannerIcon, BannerTitle } from '@/components/ui/goop/banner';

function DesktopAppBanner({ onDownload }: { onDownload: () => void }) {
  const [open, setOpen] = useState(true);
  return (
    <div className="flex flex-col items-start gap-3">
      <Banner variant="warning" open={open} onDismiss={() => setOpen(false)}>
        <BannerIcon />
        <BannerTitle>Two visits have no crew</BannerTitle>
        <BannerDescription>Assign one before Monday.</BannerDescription>
      </Banner>
      <Banner variant="announcement" asChild>
        <a href="/changelog">
          <BannerIcon icon="grip" />
          <BannerTitle>New: plan visits on a map</BannerTitle>
        </a>
      </Banner>
      <Banner>
        <BannerIcon icon="tabler-outline:device-laptop" />
        <BannerTitle>Get the desktop app to record your site visits</BannerTitle>
        <BannerAction onClick={onDownload}>Download</BannerAction>
      </Banner>
    </div>
  );
}
  • Fits: overview, settings: header.
  • One banner at a time, at the top of the page or the settings section it concerns, above its first heading. A message about one section or record is an alert in the page; the result of something the person just did is a Toast.
  • height, width, padding, gap, corner, border, background, text, motion: add no class for these.

API reference

Options
OptionTypeWhat it does
variant?'primary' | 'default' | 'info' | 'success' | 'warning' | 'destructive' | 'announcement' = 'primary'primary (the default): the full-width blue pill with its one action; default, info, success, warning or destructive: the same pill, quiet, in the kind's status tint, its icon the kind's own. Or: announcement: the small pill that is itself the one control (a button, or your link with asChild).
asChild?boolean = falseDraw the announcement on its one child element (a link) instead of a button; its parts go inside it.
open?booleanWhether the banner is shown (shown when left out); false takes it off the page at once, true brings it back.
onDismiss?() => voidCalled when the close is pressed; given, the full-width pill draws the close.
dismissLabel?string = 'Dismiss'The close's spoken name, before the title's words: "Dismiss" unless given.
Parts
PartWhat it is
BannerIconThe pack icon at the start, 18 px (12 px in the announcement), in the pill's ink (on a status kind the kind's role); decorative, the words say what it is about; icon?: IconName — A pack icon name, of the theme's main pack or its second (tabler-outline:<name>)
BannerTitleThe announcement's words
BannerDescriptionThe message, after the title
BannerActionThe one action at the pill's end, 12 px before the close; takes asChild; also takes type?: 'button' | 'submit' | 'reset'; onClick?: (event: MouseEvent) => void; disabled?: boolean
  • data-slot values (to select a part by): banner, banner-action, banner-close, banner-content, banner-description, banner-icon, banner-title, banner-words

Keyboard

KeyWhat it does
Enter SpaceOn the action: run it

Accessibility

  • The native element answers the keyboard.
  • hover, active: the browser's own (:hover, :active): write nothing

Its states are drawn from attributes and props, so assistive technology and your agent read the same thing:

StateDrawn by
focus-visiblethe attribute data-focus-visible
disabledthe prop disabled

Motion

  • The part sets its own motion: add no transition or animation of your own.

Notes for AI

Give your coding agent this page as text instead of screenshots: the parts, the options, the states and the keys. An agent that reads the real part builds the real part, not a lookalike.

goop.so/themes/meadow/components/banner.md · the page as Markdown
Theme
Install with your agentnpx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-banner.json --yes

Where would you like to start?

Free · now

The Goop plugin

A design system for your AI coding agent, so screen ten matches screen one.

/plugin marketplace add goop-so/skillsthen /plugin install goop@goopCodex, Cursor, ChatGPT, the Claude app and more: Connect Goop
FreePro

The components

Every part live, with its props, its keys and what an agent sees. Whole page and app templates, working with sample data.