nhsuk-frontend
Advanced tools
Changelog
9.1.0 - 4 November 2024
:new: New features
:wrench: Fixes
.nhsuk-header__search-no-nav
class is no longer needed when header contains a search field but no navigation (PR 1046)Changelog
8.3.0 - 24 July 2024
:new: New features
nhsuk-page-width
a default so that services can override it (PR 971):wrench: Maintenance
:wrench: Fixes
errorSummary
bottom margin (PR 973)nhsuk-u-top-and-bottom
utility class (PR 979)Changelog
8.2.0 - 12 June 2024
:recycle: Changes
:wrench: Fixes
html
argument (Issue 950)aria-hidden
to responsive labels in responsive tables, to avoid screen readers repeating them (PR 942)opacity: 1
to header search placeholder, to increase colour contrast on Firefox (PR 939)Changelog
8.1.1 - 14 March 2024
:wrench: Fixes
40px
, to prevent vertical overflowChangelog
8.1.0 - 11 January 2024
:wrench: Fixes
:new: New features
initAll
method in nhsuk.js
, and pass document by default, but allowing smaller DOM scopes to be passed. This allows new nhsuk-frontend JS components to be initialised after page load, such as in new pieces of DOM added by JavaScript.
Changelog
8.0.0 - 28 September 2023
:boom: Breaking changes
As well as changes to the styles, this added an example of a footer with it's links in columns, and removed the redundant example of "Header transactional". This also fixes the issue (Issue 805).
In the header variants, the menu toggle button has been replaced with a dropdown menu, that becomes visible when the screen width is below 768px (tablet width). The search toggle has been removed, and instead the search input automatically adjusts according to the screen width.
Instead of having this:
// menu toggle
<button class="nhsuk-header__menu-toggle" id="toggle-menu" aria-controls="header-navigation" aria-expanded="false">Menu</button
// close menu button
<button class="nhsuk-header__navigation-close" id="close-menu">
<svg class="nhsuk-icon nhsuk-icon__close" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true" focusable="false" width="27" height="27">
</svg>
<span class="nhsuk-u-visually-hidden">Close menu</span>
</button>
You will now only need this:
<button class="nhsuk-header__navigation-link nhsuk-header__menu-toggle nhsuk-header__menu-toggle--visible" aria-expanded="false">
<span class="nhsuk-u-visually-hidden">Browse</span>
More
<svg class="nhsuk-icon nhsuk-icon__chevron-down" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M15.5 12a1 1 0 0 1-.29.71l-5 5a1 1 0 0 1-1.42-1.42l4.3-4.29-4.3-4.29a1 1 0 0 1 1.42-1.42l5 5a1 1 0 0 1 .29.71z"></path></svg>
</button>
<ul class="nhsuk-header__drop-down nhsuk-header__drop-down--hidden">
// navigation items in the drop down menu
</ul>
:wrench: Fixes
:new: New features
We added 4 new text input examples that allow users to add suffixes and prefixed to the input form. This was done by adding "suffix" and "prefix" as macro options.
input({
"label": {
"text": "What is the cost per item, in pounds?"
},
"prefix": "£",
"suffix": "per item",
"errorMessage": {
"text": "Enter a cost per item, in pounds"
}
})