Breadcrumb

Breadcrumb component is a navigation element that allows the user to keep track of their location within the website or application.

Design system docs Examples Default breadcrumb
<dap-ds-breadcrumb aria-label="Page navigation">
<dap-ds-breadcrumb-item href="https://services.gov.hu/design-system/komponensek">
  Design System
</dap-ds-breadcrumb-item>
<dap-ds-breadcrumb-item href="https://services.gov.hu/design-system/komponensek/breadcrumb">
  Breadcrumb
</dap-ds-breadcrumb-item>
<dap-ds-breadcrumb-item>
  Current page
</dap-ds-breadcrumb-item>
</dap-ds-breadcrumb>
Custom separator

You can customize the separator between breadcrumb items by setting any element to the separator slot. You even can set it on items.

<dap-ds-stack>
<dap-ds-breadcrumb aria-label="Navigation">
  <dap-ds-breadcrumb-item href="https://services.gov.hu/design-system/komponensek">
    Design System
  </dap-ds-breadcrumb-item>
  <dap-ds-breadcrumb-item href="https://services.gov.hu/design-system/komponensek/breadcrumb">
    Breadcrumb
  </dap-ds-breadcrumb-item>
  <dap-ds-breadcrumb-item>
    Current page
  </dap-ds-breadcrumb-item>

  <svg
    slot="separator"
    width="32"
    xmlns="http://www.w3.org/2000/svg"
    viewBox="0 0 24 24"
    fill="currentColor">
    <path d="M2 11H4V13H2V11ZM6 11H18V13H6V11ZM20 11H22V13H20V11Z"></path>
  </svg>
</dap-ds-breadcrumb>

<dap-ds-breadcrumb aria-label="Navigation">
  <dap-ds-breadcrumb-item>First page nohref </dap-ds-breadcrumb-item>
  <dap-ds-breadcrumb-item href="one">Second page</dap-ds-breadcrumb-item>
  <dap-ds-breadcrumb-item href="two"
    >Third page
    <svg
      slot="separator"
      width="32"
      xmlns="http://www.w3.org/2000/svg"
      viewBox="0 0 24 24"
      fill="currentColor">
      <path
        d="M2 11H4V13H2V11ZM6 11H18V13H6V11ZM20 11H22V13H20V11Z"></path>
    </svg>
  </dap-ds-breadcrumb-item>
  <dap-ds-breadcrumb-item>Current Page</dap-ds-breadcrumb-item>
</dap-ds-breadcrumb>
</dap-ds-stack>
Mobile breadcrumb

By setting the mobile attribute, the breadcrumb will be displayed in a mobile-friendly way. On mobile devices, only the root and the current page are displayed.

<dap-ds-breadcrumb mobile aria-label="Navigation">
<dap-ds-breadcrumb-item href="https://services.gov.hu/design-system/komponensek">
  Design System
</dap-ds-breadcrumb-item>
<dap-ds-breadcrumb-item>
  Components
</dap-ds-breadcrumb-item>
  <dap-ds-breadcrumb-item>
  Inner page
</dap-ds-breadcrumb-item>
<dap-ds-breadcrumb-item>
  Current page
</dap-ds-breadcrumb-item>
</dap-ds-breadcrumb>
Inverted style

By setting the inverted attribute, the breadcrumb will be displayed in an inverted style.

<div style={{ backgroundColor: 'var(--dds-background-brand-base-inverted)' }}>
<dap-ds-breadcrumb inverted aria-label="Navigation label">
  <dap-ds-breadcrumb-item href="/design-system/komponensek">
    Design System
  </dap-ds-breadcrumb-item>
  <dap-ds-breadcrumb-item href="https://services.gov.hu/design-system/komponensek/breadcrumb">
    Breadcrumb
  </dap-ds-breadcrumb-item>
  <dap-ds-breadcrumb-item>
    Current page
  </dap-ds-breadcrumb-item>
</dap-ds-breadcrumb>
</div>
Importing
import { DapDSBreadcrumb } from 'dap-design-system/dist/dds'
Importing React
import { DapDSBreadcrumbReact } from 'dap-design-system/dist/react'
Attributes
PropertyTypeDefaultDescription
invertedbooleanfalseInverted color style
variantstring'normal'
mobilebooleanfalseMobile version of the breadcrumb
ariaLabelledBystring, undefinedThe aria-labelledby of the breadcrumb
Slots
NameDescription
(default)The content of the breadcrumb.
separatorThe separator between breadcrumb items. Default is '/'.
Events

No custom events available.

CSS Parts
Part NameDescription
baseThe main breadcrumb container.
separatorThe separator of the breadcrumb.
CSS Custom Properties
Property NameDescription
--dds-breadcrumb-widthThe width of the breadcrumb container. Default is 100%.
--dds-breadcrumb-overflow-xThe horizontal overflow behavior of the breadcrumb. Default is auto.
--dds-breadcrumb-transitionThe transition property for the breadcrumb. Default is 'all 0.2s ease-in-out'.
--dds-breadcrumb-list-displayThe display property of the breadcrumb list. Default is flex.
--dds-breadcrumb-list-flex-wrapThe flex-wrap property of the breadcrumb list. Default is nowrap.
--dds-breadcrumb-list-align-itemsThe align-items property of the breadcrumb list. Default is center.
--dds-breadcrumb-list-min-widthThe minimum width of the breadcrumb list. Default is max-content.
Components Breadcrumb item <dap-ds-breadcrumb-item/> Attributes
PropertyTypeDefaultDescription
hrefstring, undefinedThe URL of the breadcrumb item.
target'_blank', '_self' , '_parent' , '_top'The target of the breadcrumb item.
relstring'noreferrer noopener'The rel of the breadcrumb item link.
disabledbooleanfalseWhether the breadcrumb item is disabled.
invertedbooleanfalseWhether the breadcrumb item has inverted style.
variant'normal', 'inverted''normal'The variant of the breadcrumb item.
Slots
NameDescription
(default)The content of the breadcrumb item.
separatorThe separator between breadcrumb items. Default is an arrow-right-s-line icon.
Events

No custom events available.

CSS Parts
Part NameDescription
baseThe main breadcrumb item container. The li element.
linkThe link of the breadcrumb item. The dds-link component.
link-baseThe base part of the link part. The dds-link components base part.
item-nolinkThe item of the breadcrumb item without a link. The span element.
separatorThe separator of the breadcrumb item.
CSS Custom Properties
Property NameDescription
--dds-breadcrumb-item-displayThe display property of the breadcrumb item. Default is inline-flex.
--dds-breadcrumb-item-flex-wrapThe flex-wrap property of the breadcrumb item. Default is nowrap.
--dds-breadcrumb-item-align-itemsThe align-items property of the breadcrumb item. Default is center.
--dds-breadcrumb-item-colorThe text color of the breadcrumb item. Default is the design system's text-neutral-base.
--dds-breadcrumb-item-transitionThe transition property for the breadcrumb item. Default is 'all 0.2s ease-in-out'.
--dds-breadcrumb-item-paddingThe padding of the breadcrumb item. Default is the design system's spacing-200.
--dds-breadcrumb-item-font-sizeThe font size of the breadcrumb item. Default is the design system's font-sm.
--dds-breadcrumb-item-font-weightThe font weight of the breadcrumb item. Default is the design system's font-weight-medium.
--dds-breadcrumb-item-font-weight-boldThe bold font weight of the breadcrumb item. Default is the design system's font-weight-bold.
--dds-breadcrumb-item-separator-colorThe color of the separator. Default is the design system's text-neutral-disabled.
--dds-breadcrumb-item-link-colorThe color of the link. Default is the design system's link-neutral-enabled.
--dds-breadcrumb-item-inverted-colorThe text color when inverted. Default is the design system's text-neutral-inverted.
--dds-breadcrumb-item-inverted-link-colorThe link color when inverted. Default is the design system's text-neutral-inverted.