Banner

Billing Warning Banner

Destructive-tinted alert bar with a faint red ground, red text and a bottom border, carrying a billing warning, an update link and dismiss. The tint deepens in dark mode.

Free, MIT licenseOpen in Browse
import {
  Banner,
  BannerContent,
  BannerDismiss,
  BannerLink,
} from "@/components/banner/banner"

// The copy: change text here, not in the markup.
const COPY = {
  news: "Your card on file expires this month.",
  // Replaces news below the sm breakpoint, so the banner holds one line.
  newsShort: "Your card expires this month.",
  newsLink: "Update billing",
} as const

export default function MinimalBanner04() {
  return (
    <Banner className="border-b border-destructive/20 bg-destructive/10 text-destructive dark:bg-destructive/20">
      <BannerContent>
        <p>
          <span className="sm:hidden">{COPY.newsShort}</span>
          <span className="max-sm:hidden">{COPY.news}</span>
        </p>
        <BannerLink href="#">{COPY.newsLink}</BannerLink>
      </BannerContent>
      <BannerDismiss />
    </Banner>
  )
}

Installation

pnpm dlx shadcn add @01orbital/minimal-banner-04
npx shadcn add @01orbital/minimal-banner-04
yarn shadcn add @01orbital/minimal-banner-04
bunx --bun shadcn add @01orbital/minimal-banner-04

Free under the MIT license. Add the @01orbital registry to components.json once (install guide), then run the command.

It lands at components/blocks/banner/minimal-banner-04/index.tsx, as source you own and edit.

Usage

import MinimalBanner04 from "@/components/blocks/banner/minimal-banner-04"

export default function Example() {
  return <MinimalBanner04 />
}

Dependencies

Registry pieces it installs with it:

  • banner