Banner

Muted Release Banner

Centered announcement bar on the muted ground with a release note, an arrow link and a dismiss button. A shorter line replaces the message below the md breakpoint.

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: "Orbcore 3.2 is out, with shared calendars and search that keeps up.",
  // Replaces news below the md breakpoint, so the banner holds one line.
  newsShort: "Orbcore 3.2 is out.",
  newsLink: "Read the release notes",
} as const

export default function MinimalBanner01() {
  return (
    <Banner variant="center" className="bg-muted text-foreground">
      <BannerContent>
        <p>
          <span className="md:hidden">{COPY.newsShort}</span>
          <span className="max-md:hidden">{COPY.news}</span>
        </p>
        <BannerLink href="#">{COPY.newsLink}</BannerLink>
      </BannerContent>
      <BannerDismiss />
    </Banner>
  )
}

Installation

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

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-01/index.tsx, as source you own and edit.

Usage

import MinimalBanner01 from "@/components/blocks/banner/minimal-banner-01"

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

Dependencies

Registry pieces it installs with it:

  • banner