# Breadcrumb Breadcrumbs are a secondary navigation aid showing a user\'s location in a website\'s hierarchy, appearing as a trail of links (e.g., Home > Category > Subcategory > Current Page) to help users understand where they are and easily backtrack to previous levels. **Category:** Components **Storybook:** https://doc.ux4g.gov.in/web/?path=/story/ux4g-components-breadcrumb--introduction ## Variants documented in Storybook - StandardBreadcrumbs: https://doc.ux4g.gov.in/web/?path=/story/ux4g-components-breadcrumb--standardbreadcrumbs - DropdownBreadcrumbs: https://doc.ux4g.gov.in/web/?path=/story/ux4g-components-breadcrumb--dropdownbreadcrumbs ## Framework setup ### HTML / CDN ```html ``` ### React ```bash npm install ux4g-web-components ``` ```jsx import 'ux4g-web-components/styles.css'; import 'ux4g-web-components/design-system'; ``` ### Angular Update `angular.json`: ```json { "styles": [ "node_modules/ux4g-web-components/styles/ux4g.css", "src/styles.css" ], "scripts": [ "node_modules/ux4g-web-components/dist/runtime/design-system.js" ] } ``` ## Code examples The snippets below are extracted from the Storybook canvas for Breadcrumb. Each example shows the rendered HTML, the equivalent React JSX, and the Angular template markup. ### 1. Dropdown Breadcrumbs — Chevron Breadcrumb with dropdown HTML: ```html ``` React: ```jsx import React from 'react'; const BreadcrumbExample1Demo = () => ( <> {/* Variant: Dropdown Breadcrumb - Chevron Divider */} > ); export default BreadcrumbExample1Demo; ``` Angular: ```html ``` ### 2. Dropdown Breadcrumbs — Forward slash Breadcrumb with dropdown HTML: ```html ``` React: ```jsx import React from 'react'; const BreadcrumbExample2Demo = () => ( <> {/* Variant: Dropdown Breadcrumb - Slash Divider */} > ); export default BreadcrumbExample2Demo; ``` Angular: ```html ``` ### 3. Introduction — Introduction HTML: ```html
Breadcrumbs are a secondary navigation aid showing a user's location in a website's hierarchy, appearing as a trail of links (e.g., Home > Category > Subcategory > Current Page) to help users understand where they are and easily backtrack to previous levels.
Utility classes for breadcrumb dividers and structure.
|
Chevron Divider (›)
ux4g-breadcrumb-divider
|
|
Slash Divider (/)
ux4g-breadcrumb-icon
|
|
Dropdown Container
ux4g-breadcrumb-dropdown
|
|
Dropdown Toggle
ux4g-breadcrumb-toggle
|
|
Dropdown Menu (UL)
ux4g-breadcrumb-menu
|
|
Menu Link (A)
ux4g-breadcrumb-menuitem
|
Breadcrumbs are a secondary navigation aid showing a user's location in a website's hierarchy, appearing as a trail of links (e.g., Home > Category > Subcategory > Current Page) to help users understand where they are and easily backtrack to previous levels.
Utility classes for breadcrumb dividers and structure.
|
Chevron Divider (›)
ux4g-breadcrumb-divider
|
|
Slash Divider (/)
ux4g-breadcrumb-icon
|
|
Dropdown Container
ux4g-breadcrumb-dropdown
|
|
Dropdown Toggle
ux4g-breadcrumb-toggle
|
|
Dropdown Menu (UL)
ux4g-breadcrumb-menu
|
|
Menu Link (A)
ux4g-breadcrumb-menuitem
|
Breadcrumbs are a secondary navigation aid showing a user's location in a website's hierarchy, appearing as a trail of links (e.g., Home > Category > Subcategory > Current Page) to help users understand where they are and easily backtrack to previous levels.
Utility classes for breadcrumb dividers and structure.
|
Chevron Divider (›)
ux4g-breadcrumb-divider
|
|
Slash Divider (/)
ux4g-breadcrumb-icon
|
|
Dropdown Container
ux4g-breadcrumb-dropdown
|
|
Dropdown Toggle
ux4g-breadcrumb-toggle
|
|
Dropdown Menu (UL)
ux4g-breadcrumb-menu
|
|
Menu Link (A)
ux4g-breadcrumb-menuitem
|