Skip to main content
Signature

Import

To ensure optimal bundle sizes, see Optimize build size.
Vue

See this widget in action

Preview this widget and its behavior.

About this widget

The ais-breadcrumb widget is a secondary navigation scheme that lets users see where the current page is in relation to the facet’s hierarchy. It reduces the number of actions a user needs to take to get to a higher-level page and improves the discoverability of the app or website’s sections and pages. It’s commonly used for websites with lots of data, organized into categories with subcategories.

Requirements

Breadcrumbs objects must have this structure:
JSON
It’s also possible to provide more than one path for each level:
JSON
To create a hierarchical menu:
  1. Decide on an appropriate facet hierarchy
  2. Determine your attributes for faceting from the dashboard or with an API client
  3. Display the UI with the hierarchical menu widget.
For more information, see Facet display. By default, the separator is > (with spaces), but you can use a different one by using the separator option. If there is also a ais-hierarchical-manu on the page, it must follow the same configuration.

Examples

Vue

Props

string[]
required
An array of attributes to generate the breadcrumb.
To prevent creating infinite loops, avoid passing arrays, objects, or functions directly in the template. These values aren’t referentially equal on each render, which causes the widget to re-register every time. Instead, define them in your component’s data option and reference them in the template.
Vue
string
The path to use if the first level is not the root level.Make sure to also include the root path in your UI state, for example, by setting initial-ui-state.
Vue
string
default:" > "
The level separator used in the .
Vue
function
A function that receives the list of items before they are displayed. It should return a new array with the same structure. Use this to transform, filter, or reorder the items.The function also has access to the full results data, including all standard response parameters and parameters from the helper, such as disjunctiveFacetsRefinements.
Vue
object
The CSS classes you can override:
  • ais-Breadcrumb. The root element of the widget.
  • ais-Breadcrumb--noRefinement. The root element of the widget with no refinement.
  • ais-Breadcrumb-list. The list of all breadcrumb items.
  • ais-Breadcrumb-item. The breadcrumb navigation item.
  • ais-Breadcrumb-item--selected. The selected breadcrumb item.
  • ais-Breadcrumb-separator. The separator of each breadcrumb item.
  • ais-Breadcrumb-link. The clickable breadcrumb element.
Vue

Customize the UI

The slot to override the complete DOM output of the widget.Note that when you implement this slot, none of the other slots will change the output, as the default slot surrounds them.Scope
  • items: object[]
  • refine: (value: string) => void
  • createURL: (value: string) => string
Where each item is an object containing:
  • label. The label of the category or subcategory.
  • value. The value of breadcrumb item.
Vue
The slot to override the root label.
Vue
The slot to override the separator.
Vue

HTML output

HTML
If SEO is important for your search page, ensure that your custom HTML is optimized for search engines:
  • Use <a> tags with href attributes to allow search engine bots to follow links.
  • Use semantic HTML and include structured data when relevant.
For more guidance, see the SEO checklist.
Last modified on July 22, 2026