Notification banner
These examples are used for automated tests and may not follow service manual best practice.
Notification banner default
Code
Markup
<div class="nhsuk-notification-banner" data-module="nhsuk-notification-banner" role="region" aria-labelledby="nhsuk-notification-banner-title">
<div class="nhsuk-notification-banner__header">
<h2 class="nhsuk-notification-banner__title" id="nhsuk-notification-banner-title">
Important
</h2>
</div>
<div class="nhsuk-notification-banner__content">
<p class="nhsuk-notification-banner__heading">
The patient record was updated.
</p>
</div>
</div>
Macro
Notification banner paragraph as html heading
Open this example in a new tab: Notification banner paragraph as html heading
Code
Markup
<div class="nhsuk-notification-banner" data-module="nhsuk-notification-banner" role="region" aria-labelledby="nhsuk-notification-banner-title">
<div class="nhsuk-notification-banner__header">
<h2 class="nhsuk-notification-banner__title" id="nhsuk-notification-banner-title">
Important
</h2>
</div>
<div class="nhsuk-notification-banner__content">
<p class="nhsuk-notification-banner__heading">You have 9 days to send a response.</p>
</div>
</div>
Macro
Notification banner success with custom html
Open this example in a new tab: Notification banner success with custom html
Code
Markup
<div class="nhsuk-notification-banner nhsuk-notification-banner--success" data-module="nhsuk-notification-banner" role="alert" aria-labelledby="nhsuk-notification-banner-title">
<div class="nhsuk-notification-banner__header">
<h2 class="nhsuk-notification-banner__title" id="nhsuk-notification-banner-title">
Success
</h2>
</div>
<div class="nhsuk-notification-banner__content">
<h3 class="nhsuk-notification-banner__heading">
4 files uploaded
</h3>
<ul class="nhsuk-u-margin-0 nhsuk-list">
<li><a href="link-1" class="nhsuk-notification-banner__link">government-strategy.pdf</a></li>
<li><a href="link-2" class="nhsuk-notification-banner__link">government-strategy-v1.pdf</a></li>
</ul>
</div>
</div>
Macro
Notification banner with a list
Open this example in a new tab: Notification banner with a list
Code
Markup
<div class="nhsuk-notification-banner" data-module="nhsuk-notification-banner" role="region" aria-labelledby="nhsuk-notification-banner-title">
<div class="nhsuk-notification-banner__header">
<h2 class="nhsuk-notification-banner__title" id="nhsuk-notification-banner-title">
Important
</h2>
</div>
<div class="nhsuk-notification-banner__content">
<h3 class="nhsuk-notification-banner__heading">4 files uploaded</h3>
<ul class="nhsuk-list nhsuk-list--bullet nhsuk-u-margin-bottom-0">
<li><a href="#" class="nhsuk-notification-banner__link">government-strategy.pdf</a></li>
<li><a href="#" class="nhsuk-notification-banner__link">government-strategy-v2.pdf</a></li>
<li><a href="#" class="nhsuk-notification-banner__link">government-strategy-v3-FINAL.pdf</a></li>
<li><a href="#" class="nhsuk-notification-banner__link">government-strategy-v4-FINAL-v2.pdf</a></li>
</ul>
</div>
</div>
Macro
Notification banner with long heading
Open this example in a new tab: Notification banner with long heading
Code
Markup
<div class="nhsuk-notification-banner" data-module="nhsuk-notification-banner" role="region" aria-labelledby="nhsuk-notification-banner-title">
<div class="nhsuk-notification-banner__header">
<h2 class="nhsuk-notification-banner__title" id="nhsuk-notification-banner-title">
Important
</h2>
</div>
<div class="nhsuk-notification-banner__content">
<p class="nhsuk-notification-banner__heading">
The patient record was withdrawn on 7 March 2014, before being sent in, sent back, queried, lost, found, subjected to public inquiry, lost again, and finally buried in soft peat for three months and recycled as firelighters.
</p>
</div>
</div>
Macro
Notification banner with lots of content
Open this example in a new tab: Notification banner with lots of content
Code
Markup
<div class="nhsuk-notification-banner" data-module="nhsuk-notification-banner" role="region" aria-labelledby="nhsuk-notification-banner-title">
<div class="nhsuk-notification-banner__header">
<h2 class="nhsuk-notification-banner__title" id="nhsuk-notification-banner-title">
Important
</h2>
</div>
<div class="nhsuk-notification-banner__content">
<h3 class="nhsuk-notification-banner__heading">
Check if you need to apply the reverse charge to this application
</h3>
<p class="nhsuk-body">
You will have to apply the <a href="#" class="nhsuk-notification-banner__link">reverse charge</a> if the applicant supplies any of these services:
</p>
<ul class="nhsuk-list nhsuk-list--bullet">
<li>constructing, altering, repairing, extending, demolishing or dismantling buildings or structures (whether permanent or not), including offshore installation services</li>
<li>constructing, altering, repairing, extending, demolishing of any works forming, or planned to form, part of the land, including (in particular) walls, roadworks, power lines, electronic communications equipment, aircraft runways, railways, inland waterways, docks and harbours</li>
</ul>
</div>
</div>
Macro
Notification banner with success variant
Open this example in a new tab: Notification banner with success variant
Code
Markup
<div class="nhsuk-notification-banner nhsuk-notification-banner--success" data-module="nhsuk-notification-banner" role="alert" aria-labelledby="nhsuk-notification-banner-title">
<div class="nhsuk-notification-banner__header">
<h2 class="nhsuk-notification-banner__title" id="nhsuk-notification-banner-title">
Success
</h2>
</div>
<div class="nhsuk-notification-banner__content">
<p class="nhsuk-notification-banner__heading">
Email sent to example@email.com
</p>
</div>
</div>
Macro
Notification banner with text as html
Open this example in a new tab: Notification banner with text as html
Code
Markup
<div class="nhsuk-notification-banner" data-module="nhsuk-notification-banner" role="region" aria-labelledby="nhsuk-notification-banner-title">
<div class="nhsuk-notification-banner__header">
<h2 class="nhsuk-notification-banner__title" id="nhsuk-notification-banner-title">
Important
</h2>
</div>
<div class="nhsuk-notification-banner__content">
<h3 class="nhsuk-notification-banner__heading">
The patient record was updated
</h3>
<p class="nhsuk-body">
Contact <a class="nhsuk-notification-banner__link" href="#">example@nhs.uk</a> if you think there's a problem.
</p>
</div>
</div>