1. Docs
  2. Breadcrumbs

Breadcrumbs

Breadcrumbs display a hierarchy of links to the current page or resource in an application.

  1. Home
  2. Docs
  3. Breadcrumbs
npx @sly-cli/sly add jolly-ui breadcrumbs

Note: Only the default style can be installed via CLI at the moment

Client Side Routing

The <BreadcrumbItem> component works with frameworks and client side routers like Next.js, Remix and React Router. As with other React Aria components that support links, this works via the RouterProvider component at the root of your app. See the client side routing guide to learn how to set this up.

Usage

Basic

  1. Home
  2. Docs
  3. Breadcrumbs

Dynamic Items

Breadcrumbs follows the Collection Components API, accepting both static and dynamic collections. Dynamic collections, as shown below, can be used when the options come from an external data source such as an API call, or update over time.

As seen below, an iterable list of options is passed to the Breadcrumbs using the items prop. A function provided as children of the <Breadcrumbs> is called to render each item. When a breadcrumb is pressed, the onAction event is triggered and the breadcrumbs array is updated

  1. Home
  2. Trendy
  3. March 2022 Assets