Breadcrumb

A navigational aid to keep track and maintain awareness of current location within a website.

Published Last updated: 5.7.0 Change log Github NPM
Twig Usage
{% set item_home %}
  {% include '@bolt-elements-text-link/text-link.twig' with {
    content: 'Home',
    attributes: {
      href: '#!'
    }
  } only %}
{% endset %}
{% set item_landing %}
  {% include '@bolt-elements-text-link/text-link.twig' with {
    content: 'Landing Page',
    attributes: {
      href: '#!'
    }
  } only %}
{% endset %}
{% set item_sub %}
  {% include '@bolt-elements-text-link/text-link.twig' with {
    content: 'Sub Page',
    attributes: {
      href: '#!'
    }
  } only %}
{% endset %}
{% set item_current %}
  {% include '@bolt-elements-text-link/text-link.twig' with {
    content: 'Current Page',
    attributes: {
      href: '#!',
      'aria-current': 'page',
    }
  } only %}
{% endset %}
{% include '@bolt-components-breadcrumb/breadcrumb.twig' with {
  items: [
    item_home,
    item_landing,
    item_sub,
    item_current,
  ]
} only %}
Schema
Note: when assigning component props as HTML attributes on a web component, make sure to use kebab-case.
Prop Name Description Type Default Value Option(s)
attributes

A Drupal-style attributes object with extra attributes to append to this component.

object
items

Breadcrumb pieces.

array
  • [items]:
    • Type:string, object, array

      Renderable content (i.e. a string, render array, or included pattern) for a single breadcrumb

contentItems
(deprecated)

Use items instead.

Install Install
npm install @bolt/components-breadcrumb
Dependencies @bolt/core-v3.x