WlBreadcrumbs

Breadcrumbs: path to the current page. The last item has no link.
Components / Navigation v0.1.0

Appearance

Full example
<div class="wl-stack" data-space="md">
  <WlBreadcrumbs
    :items="items"
    :max-items="3"
    separator="›"
    
  >
    <template #item="{ item }"><span>{{ item.label }}</span></template>
  </WlBreadcrumbs>
</div>

Full and short paths

Parent page links, icon, current page without navigation and a single-level path.

Parent items are links. The last item receives aria-current="page" and does not navigate.

Full example
<script setup lang="ts">
import { WlBreadcrumbs, WlCheckbox } from "legato-ui";
import { ref } from "vue";
const short = ref(false);
</script>

<template>
  <div class="wl-stack" data-space="lg">
    <WlCheckbox v-model="short">{{ "Short path" }}</WlCheckbox>
    <WlBreadcrumbs
      :items="short
        ? [{ label: 'Legato UI', href: '?', icon: 'home' }, { label: 'Materials' }]
        : [
          { label: 'Legato UI', href: '?', icon: 'home' },
          { label: 'Documentation', href: '?view=docs' },
          { label: 'Materials' }
        ]"
      :pt="{ root: { 'aria-label': 'Path to materials' } }"
    />
    <WlBreadcrumbs
      :items="[{ label: 'Current page without parents' }]"
      :pt="{ root: { 'aria-label': 'Single-level path' } }"
    />
    <p class="wl-text-small wl-text-muted">{{ "Parent items are links. The last item receives aria-current=\"page\" and does not navigate." }}</p>
  </div>
</template>