Skip to content

Accessibility: Full

Translations: Not Needed

Breadcrumb

Navigation component that helps users keep track of their location within a website or application.

Basic Usage

Vue
html
<template>
  <HLBreadcrumb :breadcrumbs="breadcrumbs" id="example-breadcrumb-basic"> </HLBreadcrumb>
</template>
<script setup>
  import { HLBreadcrumb } from '@platform-ui/highrise'

  const breadcrumbs = [
    {
      label: 'Home',
      href: 'https://google.com',
    },
    {
      label: 'Electronics',
      href: 'https://google.com',
    },
    {
      label: 'Mobiles',
      href: 'https://google.com',
    },
  ]
</script>

Without Home Icon

Vue
html
<template>
  <HLBreadcrumb :breadcrumbs="breadcrumbs" id="example-breadcrumb-basic" :home="false"> </HLBreadcrumb>
</template>
<script setup>
  import { HLBreadcrumb } from '@platform-ui/highrise'

  const breadcrumbs = [
    {
      label: 'Home',
      href: 'https://google.com',
    },
  ]
</script>

Custom Separator

Vue
html
<template>
  <HLBreadcrumb :breadcrumbs="breadcrumbs" id="example-breadcrumb-basic" separator=">"> </HLBreadcrumb>
</template>
<script setup>
  import { HLBreadcrumb } from '@platform-ui/highrise'

  const breadcrumbs = [
    {
      label: 'Home',
      href: 'https://google.com',
    },
  ]
</script>

With Overflow

Overflow will comes into play when the breadcrumb items are more than or equal to 4.

html
<template>
  <HLBreadcrumb :breadcrumbs="longBreadcrumbs" id="example-breadcrumb-overflow"> </HLBreadcrumb>
</template>
<script setup>
  import { HLBreadcrumb } from '@platform-ui/highrise'
</script>
ts
const longBreadcrumbs = [
  {
    label: 'Breadcrumb1',
    href: 'https://google.com',
  },
  {
    label: 'Breadcrumb2',
    href: 'https://google.com',
  },
  {
    label: 'Breadcrumb3',
    href: 'https://google.com',
  },
  {
    label: 'Breadcrumb4',
    href: 'https://google.com',
  },
  {
    label: 'Breadcrumb5',
    href: 'https://google.com',
  },
  {
    label: 'Breadcrumb6',
    href: 'https://google.com',
  },
  {
    label: 'Breadcrumb7',
  },
]

Imports

ts
import { HLBreadcrumb } from '@platform-ui/highrise'

Props

HLBreadcrumb Props

NameTypeDefaultDescription
id *string | undefinedundefinedUnique identifier for the breadcrumb
separatorstring/Custom separator between breadcrumb items
size'sm' | 'md' | 'lg'lgSize of the breadcrumb
homebooleantrueWhether to show home icon
breadcrumbsBreadcrumbItem[] | nullnullArray of breadcrumb items with label and href
ts
interface BreadcrumbItem {
  label: string
  href?: string
  clickable?: boolean
}