Socket
Socket
Sign inDemoInstall

@ds-kit/breadcrumbs

Package Overview
Dependencies
103
Maintainers
3
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @ds-kit/breadcrumbs

Breadcrumbs component


Version published
Maintainers
3
Install size
47.3 kB
Created

Readme

Source

title: "Breadcrumbs" slug: "/packages/breadcrumbs" category: "control" componentNames:

  • "Breadcrumbs"

Breadcrumbs

Breadcrumbs can be used to show users where they are within the datastory page hierarchy.

import Breadcrumbs from "@ds-kit/breadcrumbs"

Basic Example

The most basic breadcrumbs component returns a nav with aria-label="Breadcrumbs" and an ordered list of navigation items. For each item the component renders a link. The last item has an aria-current="page" attribute.

<Breadcrumbs
  links={[
    { key: 1, href: "/", label: "Home" },
    { key: 2, href: "/patterns", label: "Patterns" },
    { key: 3, href: "/patterns/blog-post", label: "Blog post pattern" },
  ]}
/>

To use the breadcrumbs component with a framework like next.js or gatsby, you can use the link prop to hook up a custom link component.

<Breadcrumbs
  links={[
    { href: "/", label: "Home" },
    { href: "/patterns", label: "Patterns" },
    { href: "/patterns/blog-post", label: "Blog post pattern" },
  ]}
  link={({ label, href }) =>
    <a href={href}>{label}</a>
  }
/>

FAQs

Last updated on 22 Aug 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc