About this set
Three banners that speak to everyone on a site, each shown at the top or corner of a small coffee shop page. The announcement bar is a violet gradient strip above the header with a New tag, one sentence, a link and a close button; it centres its text on wide screens and left-aligns it on phones. The maintenance banner has a black and amber striped top edge, a wrench icon, the date and time window in bold, what will be unavailable and an Add to calendar link. The cookie notice is a card fixed to the bottom corner with a short explanation, a Cookie settings link and two buttons of equal size and weight, Reject non-essential and Accept all, because hiding the reject option behind a smaller button is a dark pattern regulators now act on. Each banner is a labelled region, not an alert, since none of them is urgent. A short script removes a banner and moves focus to the next focusable element after it; a comment shows where to store the choice so the banner stays closed on the next visit. The Bootstrap version builds the bars from .alert and the notice from .card, closed by the Alert plugin.
What’s included
- Announcement bar, maintenance banner and cookie notice
- Cookie choices with equal visual weight
- Banners are labelled regions, not alerts
- Focus moves to the next element after a banner is closed
- Bootstrap Alert plugin closes both .alert bars and the .card notice
Accessibility
Each banner is a region with an accessible name, such as Announcement or Scheduled maintenance, and each close button is named, such as Dismiss announcement. Links in the text are underlined, every control has a visible focus outline in the banner's own text colour, and focus moves to the next element on the page after a banner is closed. The fade on close and hover transitions are removed under prefers-reduced-motion.
Customise it
Change the gradient on .bn-announce, the stripe colours and background on .bn-maint, and the button colours on .bn-btn. The cookie notice is position:fixed with left and bottom offsets of 16px; change them to move it. In Bootstrap the same values sit on .bn-announce, .bn-maint and the --bs-card-* and --bs-btn-* variables; in Tailwind edit the utilities.






