Socket
Book a DemoInstallSign in
Socket

@vaadin-component-factory/vcf-breadcrumb

Package Overview
Dependencies
Maintainers
11
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vaadin-component-factory/vcf-breadcrumb

Web Component providing an easy way to display breadcrumb.

2.2.0
latest
Source
npmnpm
Version published
Weekly downloads
36
2.86%
Maintainers
11
Weekly downloads
 
Created
Source

<vcf-breadcrumb>

npm version

This is the LitElement based version of <vcf-breadcrumbs> Web Component.

Installation

Install vcf-breadcrumb:

npm i @vaadin-component-factory/vcf-breadcrumb --save

Usage

Once installed, import it in your application:

import '@vaadin-component-factory/vcf-breadcrumb';

Add <vcf-breadcrumbs> element to the page. Inside added element add few <vcf-breadcrumb> child elements, with href attribute. In case you want some <vcf-breadcrumb> elements collapse when there's not enough space, add attribute collapse to those elements. When user clicks on a <vcf-breadcrumb> element, it will navigate to the URL from href attribute of the element.

<vcf-breadcrumbs>
  <vcf-breadcrumb href="#">Home</vcf-breadcrumb>
  <vcf-breadcrumb href="#">Directory</vcf-breadcrumb>
  <vcf-breadcrumb href="#" collapse>Components</vcf-breadcrumb>
  <vcf-breadcrumb href="#" collapse>VCF Components</vcf-breadcrumb>
  <vcf-breadcrumb>Breadcrumb</vcf-breadcrumb>
</vcf-breadcrumbs>

breadcrumbs-01 breadcrumbs-02 breadcrumbs-03

Updates since version 2.0.0

  • Lit based component with theming support.
  • The first item in the breadcrumb is always shown in full.
  • The items can be collapsed when space runs out. This is configurable by using the attribute collapse. When availabe space is not enough to display the full label, then the label is shown with ellipsis.
  • If space is even more limited, and some breadcrumbs have the collapse attribute:
    • Consecutive collapsed items are grouped into ranges.
    • Each range is hidden when necessary and replaced with an ellipsis element.
  • shift attribute from previous version was removed. Responsive behavior is now given by the collapse attribute implementation.

Customize separators

By default, there are few css variables that help you update the separator's style:

CSS VariableDefinitionDefault value
--vcf-breadcrumb-separator-font-familyFont family of the separator iconlumo-icons
--vcf-breadcrumb-separator-symbolSeparator iconvar(--lumo-icons-angle-right)
--vcf-breadcrumb-separator-colorColor of the separator iconvar(--lumo-contrast-40pct)
--vcf-breadcrumb-separator-sizeSize of the separator iconvar(--lumo-font-size-s)
--vcf-breadcrumb-separator-marginMargin of the separator icon0
--vcf-breadcrumb-separator-paddingPadding of the separator icon0 var(--lumo-space-xs)

Updates since version 2.2.0

Added support for Mobile Mode. It can be triggered in two ways:

  • Based on a fixed breakpoint (same as other Vaadin components): (max-width: 450px), (max-height: 450px) or
  • Programmatically, using the flag forceMobileMode, which allows to enable mobile layout manually

When in Mobile Mode, Breadcrumbs are styled for mobile navigation showing only back path.

  • Shows the last breadcrumb unless it's the current one
  • Shows the breadcrumb directly before the current one

By default, mobile mode shows a back icon that can be customized using the CSS variable: --vcf-breadcrumb-mobile-back-symbol

Running demo

  • Fork the vcf-breadcrumb repository and clone it locally.

  • Make sure you have npm installed.

  • When in the vcf-breadcrumb directory, run npm install to install dependencies.

  • Run npm start to open the demo.

Contributing

To contribute to the component, please read the guideline first.

License

Distributed under Apache Licence 2.0.

Sponsored development

Major pieces of development of this add-on has been sponsored by multiple customers of Vaadin. Read more about Expert on Demand at: Support and Pricing.

Keywords

Vaadin

FAQs

Package last updated on 23 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.