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

ak-breadcrumbs

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ak-breadcrumbs

A React component that allows users to know their location

  • 3.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
Maintainers
1
Weekly downloads
 
Created
Source

AtlasKit component registry Commitizen friendly semantic-release Report an issue Ask in our forum

Breadcrumbs

Breadcrumbs help users visualize their current location in relation to the rest of the website or application by showing the hierarchy of pages.

Try it out

Interact with a live demo of the ak-breadcrumbs component with code examples.

Installation

npm install ak-breadcrumbs

Using the component

React

This is a standard React component.

import AkBreadcrumbs, { AkBreadcrumbsItem } from 'ak-breadcrumbs';

ReactDOM.render(
  <AkBreadcrumbs>
    <AkBreadcrumbsItem href="/home" text="Home" />
    <AkBreadcrumbsItem href="/home/item" text="Item" />
  </AkBreadcrumbs>,
  container
);

Classes

Breadcrumbs
BreadcrumbsItem

Breadcrumbs

Kind: global class

new Breadcrumbs()

Breadcrumbs React component.

The Breadcrumbs component will render a list of slash-separated breadcrumb items, and will automatically truncate the list if there are more than 8 items.

JS Example

import Breadcrumbs from 'ak-breadcrumbs';
ReactDOM.render(<Breadcrumbs />);

breadcrumbs.isExpanded : boolean

Whether the breadcrumbs should be expanded when there are 9 or more items.

If this is true, the breadcrumbs will not collapse and show an ellipsis item.

Kind: instance property of Breadcrumbs
Default: false

breadcrumbs.maxItems : number

The maximum number of items to display before automatically collapsing the list of breadcrumbs.

Kind: instance property of Breadcrumbs
Default: 8

breadcrumbs.onExpand : function

Callback that is called when the ellipsis expander item is selected.

Kind: instance property of Breadcrumbs
Required:

breadcrumbs.children : node | Array.<node>

The items to display.

If there are more than the number of items specified by maxItems, the list will automatically be truncated to display only the first and last items. Clicking the ellipsis separator item will display all the items.

Kind: instance property of Breadcrumbs

BreadcrumbsItem

Kind: global class

new BreadcrumbsItem()

BreadcrumbsItem React component.

JS Example

import { AkBreadcrumbsItem } from 'ak-breadcrumbs';
ReactDOM.render(<AkBreadcrumbsItem href="/item">Item</AkBreadcrumbsItem);

breadcrumbsItem.href : string

The target URL.

Kind: instance property of BreadcrumbsItem

breadcrumbsItem.text : string

The text content of the item.

Kind: instance property of BreadcrumbsItem

BreadcrumbsItem.iconBefore : element

The icon to display before the item content. Icons specified in this way will always be displayed, even when the content is truncated.

Kind: static property of BreadcrumbsItem

BreadcrumbsItem.iconAfter : element

The icon to display after the item content. Icons specified in this way will always be displayed, even when the content is truncated.

Kind: static property of BreadcrumbsItem

Support and feedback

We're here to help!

Let us know what you think of our components and docs, your feedback is really important for us.

Community support

Ask a question in our forum.

Check if someone has already asked the same question before.

Create a support ticket

Are you in trouble? Let us know!

Keywords

FAQs

Package last updated on 03 Jan 2017

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