Breadcrumbs
Breadcrumbs
Code
Markup
<nav class="govuk-breadcrumbs" aria-label="Breadcrumb">
<ol class="govuk-breadcrumbs__list">
<li class="govuk-breadcrumbs__list-item">
<a class="govuk-breadcrumbs__link" href="/section">Section</a>
</li>
<li class="govuk-breadcrumbs__list-item">
<a class="govuk-breadcrumbs__link" href="/section/sub-section">Sub-section</a>
</li>
</ol>
</nav>
Macro
{% from "govuk/components/breadcrumbs/macro.njk" import govukBreadcrumbs %}
{{ govukBreadcrumbs({
items: [
{
text: "Section",
href: "/section"
},
{
text: "Sub-section",
href: "/section/sub-section"
}
]
}) }}
Breadcrumbs with one level
Code
Markup
<nav class="govuk-breadcrumbs" aria-label="Breadcrumb">
<ol class="govuk-breadcrumbs__list">
<li class="govuk-breadcrumbs__list-item">
<a class="govuk-breadcrumbs__link" href="/section">Section</a>
</li>
</ol>
</nav>
Macro
{% from "govuk/components/breadcrumbs/macro.njk" import govukBreadcrumbs %}
{{ govukBreadcrumbs({
items: [
{
text: "Section",
href: "/section"
}
]
}) }}
Breadcrumbs with multiple levels
Open this example in a new tab: breadcrumbs with multiple levels
Code
Markup
<nav class="govuk-breadcrumbs" aria-label="Breadcrumb">
<ol class="govuk-breadcrumbs__list">
<li class="govuk-breadcrumbs__list-item">
<a class="govuk-breadcrumbs__link" href="/">Home</a>
</li>
<li class="govuk-breadcrumbs__list-item">
<a class="govuk-breadcrumbs__link" href="/section">Section</a>
</li>
<li class="govuk-breadcrumbs__list-item">
<a class="govuk-breadcrumbs__link" href="/section/sub-section">Sub-section</a>
</li>
<li class="govuk-breadcrumbs__list-item">
<a class="govuk-breadcrumbs__link" href="/section/sub-section/sub-sub-section">Sub Sub-section</a>
</li>
</ol>
</nav>
Macro
{% from "govuk/components/breadcrumbs/macro.njk" import govukBreadcrumbs %}
{{ govukBreadcrumbs({
items: [
{
text: "Home",
href: "/"
},
{
text: "Section",
href: "/section"
},
{
text: "Sub-section",
href: "/section/sub-section"
},
{
text: "Sub Sub-section",
href: "/section/sub-section/sub-sub-section"
}
]
}) }}
Breadcrumbs without the home section
Open this example in a new tab: breadcrumbs without the home section
Code
Markup
<nav class="govuk-breadcrumbs" aria-label="Breadcrumb">
<ol class="govuk-breadcrumbs__list">
<li class="govuk-breadcrumbs__list-item">
<a class="govuk-breadcrumbs__link" href="/service-manual">Service Manual</a>
</li>
<li class="govuk-breadcrumbs__list-item">
<a class="govuk-breadcrumbs__link" href="/service-manual/agile-delivery">Agile Delivery</a>
</li>
</ol>
</nav>
Macro
{% from "govuk/components/breadcrumbs/macro.njk" import govukBreadcrumbs %}
{{ govukBreadcrumbs({
items: [
{
text: "Service Manual",
href: "/service-manual"
},
{
text: "Agile Delivery",
href: "/service-manual/agile-delivery"
}
]
}) }}
Breadcrumbs with last breadcrumb as current page
Open this example in a new tab: breadcrumbs with last breadcrumb as current page
Code
Markup
<nav class="govuk-breadcrumbs" aria-label="Breadcrumb">
<ol class="govuk-breadcrumbs__list">
<li class="govuk-breadcrumbs__list-item">
<a class="govuk-breadcrumbs__link" href="/">Home</a>
</li>
<li class="govuk-breadcrumbs__list-item">
<a class="govuk-breadcrumbs__link" href="/browse/abroad">Passports, travel and living abroad</a>
</li>
<li class="govuk-breadcrumbs__list-item" aria-current="page">Travel abroad</li>
</ol>
</nav>
Macro
{% from "govuk/components/breadcrumbs/macro.njk" import govukBreadcrumbs %}
{{ govukBreadcrumbs({
items: [
{
text: "Home",
href: "/"
},
{
text: "Passports, travel and living abroad",
href: "/browse/abroad"
},
{
text: "Travel abroad"
}
]
}) }}
Breadcrumbs with collapse on mobile
Open this example in a new tab: breadcrumbs with collapse on mobile
Code
Markup
<nav class="govuk-breadcrumbs govuk-breadcrumbs--collapse-on-mobile" aria-label="Breadcrumb">
<ol class="govuk-breadcrumbs__list">
<li class="govuk-breadcrumbs__list-item">
<a class="govuk-breadcrumbs__link" href="/">Home</a>
</li>
<li class="govuk-breadcrumbs__list-item">
<a class="govuk-breadcrumbs__link" href="/education">Education, training and skills</a>
</li>
<li class="govuk-breadcrumbs__list-item">
<a class="govuk-breadcrumbs__link" href="/education/special-educational-needs-and-disability-send-and-high-needs">Special educational needs and disability (SEND) and high needs</a>
</li>
</ol>
</nav>
Macro
{% from "govuk/components/breadcrumbs/macro.njk" import govukBreadcrumbs %}
{{ govukBreadcrumbs({
collapseOnMobile: true,
items: [
{
text: "Home",
href: "/"
},
{
text: "Education, training and skills",
href: "/education"
},
{
text: "Special educational needs and disability (SEND) and high needs",
href: "/education/special-educational-needs-and-disability-send-and-high-needs"
}
]
}) }}
Breadcrumbs inverse
Open this example in a new tab: breadcrumbs inverse
Breadcrumbs that appear on dark backgrounds
Code
Markup
<nav class="govuk-breadcrumbs govuk-breadcrumbs--inverse" aria-label="Breadcrumb">
<ol class="govuk-breadcrumbs__list">
<li class="govuk-breadcrumbs__list-item">
<a class="govuk-breadcrumbs__link" href="/">Home</a>
</li>
<li class="govuk-breadcrumbs__list-item">
<a class="govuk-breadcrumbs__link" href="/browse/abroad">Passports, travel and living abroad</a>
</li>
<li class="govuk-breadcrumbs__list-item" aria-current="page">Travel abroad</li>
</ol>
</nav>
Macro
{% from "govuk/components/breadcrumbs/macro.njk" import govukBreadcrumbs %}
{{ govukBreadcrumbs({
classes: "govuk-breadcrumbs--inverse",
items: [
{
text: "Home",
href: "/"
},
{
text: "Passports, travel and living abroad",
href: "/browse/abroad"
},
{
text: "Travel abroad"
}
]
}) }}