
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.
blocks/banner/minimal-banner-04/index.tsx
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>
)
}