Tapas UI
Esc
  • IntroductionGetting startedWhat Tapas UI is and where to start.
  • InstallationGetting startedSet up shadcn/ui and add your first section.
  • CLI & AI agentsGetting startedThe shadcn CLI, the @tapas namespace, the MCP server and AI prompts.
  • TemplatesGetting startedWhole pages built from sections, installed with one command.
  • Demo sitesGetting startedThree fictional sites built only from Tapas sections.
  • ThemingCustomizationHow sections pick up your colors and radius.
  • ColorsCustomizationEvery CSS variable sections read, what it is for and where it is used.
  • Dark modeCustomizationSections follow your .dark variables.
  • MotionCustomizationPlain and motion versions, reduced motion and pause controls.
  • AccessibilityCustomizationWhat every section guarantees.
  • Waitlist formsGuidesPost signups to your own API route and store them.
  • Checkout linksGuidesPoint pricing buttons at Stripe payment links or any URL.
Menu
Browse the docs

DocsNavigation & utility

Announcement bar

A slim, optionally dismissible bar above the navbar for one announcement.

Preview

Version
Preview theme color
More themes

The link's arrow nudges twice after the page loads, then stays still. With reduced motion turned on, it renders the plain layout.

New: pricing tables and feature grids.See what's new
New: pricing tables and feature grids.See what's new

Installation

Run this in a project that already uses shadcn/ui. It adds the component and anything it needs; the motion version also adds the plain one and the motion package.

Usage

import { AnnouncementBar } from "@/components/custom/announcement-bar";

<AnnouncementBar
  message="New: pricing tables and feature grids."
  link={{ label: "See what's new", href: "/changelog" }}
  dismissible
/>
import { AnnouncementBarMotion } from "@/components/custom/announcement-bar/announcement-bar-motion";

<AnnouncementBarMotion message="New: pricing tables." link={{ label: "See what's new", href: "/changelog" }} />

Props

PropTypeDefaultDescription
message* (required)string–One short line.
link{ label; href }–Optional link after the message.
dismissiblebooleanfalseAdds a close button; dismissal lasts for the page view.
...propsReact.ComponentProps<"div">–Any other div attribute goes to the root element.
PropTypeDefaultDescription
message* (required)string–One short line.
link{ label; href }–Optional link after the message.
dismissiblebooleanfalseAdds a close button; dismissal lasts for the page view.
...propsReact.ComponentProps<"div">–Any other div attribute goes to the root element.

Accessibility

  • The close button is labelled “Dismiss announcement”.
  • The motion version follows the visitor's reduced-motion setting and never hides content before it animates.