Breadcrumbs
Breadcrumbs
Code
Markup
<div class="govuk-breadcrumbs">
<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>
</div>
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
<div class="govuk-breadcrumbs">
<ol class="govuk-breadcrumbs__list">
<li class="govuk-breadcrumbs__list-item">
<a class="govuk-breadcrumbs__link" href="/section">Section</a>
</li>
</ol>
</div>
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
<div class="govuk-breadcrumbs">
<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>
</div>
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
<div class="govuk-breadcrumbs">
<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>
</div>
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
<div class="govuk-breadcrumbs">
<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>
</div>
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
<div class="govuk-breadcrumbs govuk-breadcrumbs--collapse-on-mobile">
<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>
</div>
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
<div class="govuk-breadcrumbs govuk-breadcrumbs--inverse">
<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>
</div>
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"
}
]
}) }}