Prodular UI

Banner

Pro

A full-width announcement or system message with an icon, one line of text, an action link and an optional dismiss button.

npx prodular-ui add banner

Part of Prodular UI Pro. Preview and read the docs freely, install with a license. See pricing

App bar

Edge to edge above the app header, centered, dismissible and controlled.

Ledgerline 4.0 is here

Revenue recognition, now automatic.

The bar sits above the app header and spans the full width.

Variants

layout="inset" places the banner inside page content with a radius.

Scheduled maintenance

Billing exports pause on Oct 26 from 02:00 to 03:00 UTC.

Details

Usage-based pricing is live

Meter API calls, seats or storage on any plan.

Atlas drafted 12 dunning emails

Review them before they go out on Monday.

Anatomy

<Banner variant="info">  <BannerIcon><InfoIcon /></BannerIcon>  <BannerContent>    <BannerTitle>Scheduled maintenance</BannerTitle>    <BannerDescription>Exports pause on Oct 26.</BannerDescription>  </BannerContent>  <BannerAction render={<a href="/status" />}>Details</BannerAction>  <BannerClose /></Banner>

Guidance

Use it when

  • Messages about the whole account or app: maintenance windows, billing problems, outages, launches.
  • brand for product announcements, ai for things a model did that people should review.
  • warning and destructive for problems that block work until someone acts.

Avoid

  • Feedback on a single action. Use a toast.
  • Problems with one form or record. Use an Alert next to it.
  • Stacking several banners. Show the most urgent one.

Rules for AI agents

Published in llms-full.txt, the registry and the MCP server, so coding agents follow them when they build with this component.

  • Keep it to one line: BannerTitle plus a short BannerDescription. Put the details behind BannerAction.
  • Label BannerAction with a verb: Update payment method, View logs. Pass render={<a href=... />} for navigation.
  • Add BannerClose only for messages that are safe to ignore. Do not make destructive banners dismissible while the problem lasts.
  • Control open with onOpenChange and persist the dismissal so it does not come back on reload.
  • Use layout="bar" at the very top of the app shell and layout="inset" inside page content.
  • Use variant="ai" only when a model produced the thing the banner talks about.

API

Banner

PropTypeDefaultDescription
variant"neutral" | "info" | "warning" | "destructive" | "brand" | "ai""neutral"Color and role. warning and destructive set role="alert".
layout"bar" | "inset""bar"bar spans the full width with a bottom border. inset is rounded with a full border.
align"start" | "center""start"center centers the content on wide screens; the close button moves to the edge.
open / defaultOpen / onOpenChangeboolean / boolean / (open) => voidVisibility. BannerClose calls onOpenChange(false).

BannerAction

PropTypeDefaultDescription
renderReactElementRenders the action as a link or router Link.

Installation

The Prodular UI CLI adds the source to components/ui with everything it depends on. In a project that already uses shadcn/ui, the shadcn CLI installs it from the Prodular registry too. See Installation for the first setup.

npx prodular-ui add banner# or, with the registry in components.jsonnpx shadcn@latest add @prodular/banner