Site-wide · with link
A message and one link to the full notice. On mobile the link sits below the message.
Official government website An official website of the Federal Government of Nigeria
How you knowA full-width bar at the very top of the page. The site-wide banner carries a short, time-bound announcement for the whole site. The official banner tells people the site belongs to the Federal Government.
Updated
Online services unavailable Saturday 8 November, 10pm to 2am.
Banner
HTML
<section class="nds-banner nds-banner--site-wide" aria-label="Site announcement"> <div class="nds-banner__inner"> <div class="nds-banner__layout"> <div class="nds-banner__content"> <p class="nds-banner__message"> Online services unavailable Saturday 8 November, 10pm to 2am. </p> <div class="nds-banner__link-row"> <a class="nds-link nds-link--md nds-banner__link" href="/notice"> Read the notice </a> </div> </div> <button type="button" class="nds-banner__dismiss" aria-label="Dismiss announcement"> <svg class="nds-banner__dismiss-icon" width="24" height="24" focusable="false" aria-hidden="true"> <use href="#nds-icon-close"> </use> </svg> </button> </div> </div></section> WordPress
<!-- wp:nds/banner {} --><section class="nds-banner nds-banner--site-wide" aria-label="Site announcement"> <div class="nds-banner__inner"> <div class="nds-banner__layout"> <div class="nds-banner__content"> <p class="nds-banner__message"> Online services unavailable Saturday 8 November, 10pm to 2am. </p> <div class="nds-banner__link-row"> <a class="nds-link nds-link--md nds-banner__link" href="/notice"> Read the notice </a> </div> </div> <button type="button" class="nds-banner__dismiss" aria-label="Dismiss announcement"> <svg class="nds-banner__dismiss-icon" width="24" height="24" focusable="false" aria-hidden="true"> <use href="#nds-icon-close"> </use> </svg> </button> </div> </div></section><!-- /wp:nds/banner --> Usage
import { Banner } from "@nigerian-design-standards/react";<Banner type="site-wide" message="Online services unavailable Saturday 8 November, 10pm to 2am." linkText="Read the notice" linkHref="/notice"/> Usage
use NDS\Components\Banner;echo Banner::render([ 'type' => 'site-wide', 'message' => 'Online services unavailable Saturday 8 November, 10pm to 2am.', 'linkText' => 'Read the notice', 'linkHref' => '/notice',]); Use a banner for a time-bound message that affects the whole site: it affects more than one page or service, has a start and an end, and fits in two lines on a phone. Every banner costs screen height, so keep it short and remove it when it expires.
Site-wide or official.
Online services unavailable Saturday 8 November, 10pm to 2am.
A message and one link to the full notice. On mobile the link sits below the message.
Offices closed Monday 1 December for the public holiday.
Turn the link off when the message says everything.
Official government website An official website of the Federal Government of Nigeria
How you knowOn every page, above the masthead. It can’t be dismissed.
Offices closed Monday 1 December.
One line, about 45 characters. Short messages give the most height back.
The properties of the nds-banner component. The same in HTML, WordPress and React.
| Property | Type | Possible values | Description |
|---|---|---|---|
| message | string |
| Required. What and when, 90 characters at most on mobile. |
| type | string |
| Site-wide is an announcement; official marks a government site. |
| linkText | string |
| Optional. Names the destination. Pass linkHref with it. |
| showContact | boolean |
| Official banner only. Adds phone and email on desktop. |
In code, the site-wide banner is a <section aria-label="Site announcement"> before the header. The
dismiss button is always there. A dismissed banner stays hidden for the visit and returns when the
message changes. Don’t use role="alert".
| Part | Token | Contrast on the page |
|---|---|---|
| Container | Naija Green · spacing/075 + spacing/200 (desktop) · spacing/150 + 16/8 (mobile) · content max grid/container-max 1200 | Border is decorative |
| Message | Body/small-emphasized · text/white | 5.8:1 |
| Link | nds-link, white and underlined | 5.8:1 |
| Dismiss (32px target) | icon/Close Small, 24px · text/white | 5.8:1 |
| Focus ring | border/focus on green, to be fixed | 1.3:1 |
| Official banner | surface/container · Label/small (mobile) · Label/medium (desktop) · spacing/500 inline on desktop · text/primary | 15.0:1 · link 4.7:1 |
Online services unavailable Saturday 8 November, 10pm to 2am.
Keep it to one line where you can, with one link named by its destination.
Exciting news! We are delighted to announce that a brand new online service is now live. Visit today to learn more about everything it offers.
Don’t write long or promotional messages, or add a button. Link to a page instead.
Where a banner sits and how much room it takes.
How to write banner messages.
Online services unavailable Saturday 8 November, 10pm to 2am.
Start with what changes for people, not with “We are pleased to announce”.
The detail belongs on the page it links to.
| Write | Don’t write | Why |
|---|---|---|
| Online services unavailable Saturday 8 November, 10pm to 2am. | Scheduled maintenance | Says what and when. |
| Read the notice | Click here | Names the destination. |
| Offices closed Monday 1 December | Public holiday notice | Says what it means for people. |
| Apply for a passport online from 1 January | Exciting news! New service launched | Plain words, no hype. |
| Fees change on 1 March | FEES ARE CHANGING | Sentence case. |
The site-wide banner is a labelled region at the top of the page. It never takes focus on load, and it scrolls away with the page so it does not cover content. Keyboard users reach the link and dismiss control after the skip link; screen readers hear the region name and dismiss label.
| Key | What it does |
|---|---|
| Tab | Moves to the link, then the dismiss button, after the skip link. |
| Shift + Tab | Moves back. |
| Enter or Space | Follows the link or activates dismiss. |
Copy the code for HTML, WordPress or React from the Code tab in Live example. The options are listed under Specifications.
Use Banner from 01 Library – Foundations. Pick site-wide or official, set the message and link text, and don’t detach it.
Is this page useful?