1. Government Frontend Component Guide
  2. Breadcrumbs
  3. Last breadcrumb is current page

Breadcrumbs example

Last breadcrumb is current page

How it looks

<script type="application/ld+json">
  {"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"name":"Home","@id":"https://www.gov.uk/"}},{"@type":"ListItem","position":2,"item":{"name":"Passports, travel and living abroad","@id":"https://www.gov.uk/browse/abroad"}}]}
</script>

<div class="gem-c-breadcrumbs govuk-breadcrumbs " data-module="track-click">
  <ol class="govuk-breadcrumbs__list">
      <li class="govuk-breadcrumbs__list-item" aria-current="false">
          <a data-track-category="homeLinkClicked" data-track-action="homeBreadcrumb" data-track-label="" data-track-options="{}" class="govuk-breadcrumbs__link" aria-current="false" href="/">Home</a>
      </li>
      <li class="govuk-breadcrumbs__list-item" aria-current="false">
          <a data-track-category="breadcrumbClicked" data-track-action="2" data-track-label="/browse/abroad" data-track-options="{&quot;dimension28&quot;:&quot;3&quot;,&quot;dimension29&quot;:&quot;Passports, travel and living abroad&quot;}" class="govuk-breadcrumbs__link" aria-current="false" href="/browse/abroad">Passports, travel and living abroad</a>
      </li>
      <li class="govuk-breadcrumbs__list-item" aria-current="false">
          Travel abroad
      </li>
  </ol>
</div>

How to call this example

<%= render "govuk_publishing_components/components/breadcrumbs", {
  breadcrumbs: [
    {
      title: "Home",
      url: "/"
    },
    {
      title: "Passports, travel and living abroad",
      url: "/browse/abroad"
    },
    {
      title: "Travel abroad"
    }
  ]
} %>