Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bolttech/atoms-breadcrumbs

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bolttech/atoms-breadcrumbs

A React component to display a list of previous visited links.

  • 0.2.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

Breadcrumbs Component

A React component to display a list of previous visited links.

Installation

Use the package manager npm or yarn to install the component.

npm install @bolttech/atoms-breadcrumbs

or

yarn add @bolttech/atoms-breadcrumbs

Props

The Breadcrumbs component accepts the following properties:

PropTypeDescription
idstringThe id of the breadcrumb container.
dataTestIdstring or elementThe data-testid of the breadcrumbs container.
itemBreadcrumbItemThe list of items of the breadcrumbs.

Behaviours

The breadcrumb component has the following behaviours:

  • When 5 or less items, it displays all links with an > between them
  • When 6 or more items, it shows the First item, then a ... followed by the last 3 items
  • The last item should always be the selected item

Usage

import React from 'react';
import { Breadcrumbs } from '@bolttech/atoms-breadcrumbs';
import { bolttechTheme, BolttechThemeProvider } from '@bolttech/frontend-foundations';

const ExampleComponent = () => {
  const items = [
    { label: 'Home', href: '/' },
    { label: 'About', href: '/about' },
    { label: 'Contact', href: '/contact' },
  ];

  return (
    <BolttechThemeProvider theme={bolttechTheme}>
      <Breadcrumbs id="breadcrumbs" dataTestId="breadcrumbs" items={items} />
    </BolttechThemeProvider>
  );
};

export default ExampleComponent;

FAQs

Package last updated on 04 Sep 2024

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc