Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@react-aria/breadcrumbs
Advanced tools
@react-aria/breadcrumbs is a React library that provides accessible breadcrumb navigation components. It is part of the React Aria collection, which focuses on providing accessible UI components that adhere to WAI-ARIA standards.
Basic Breadcrumbs
This feature allows you to create a basic breadcrumb navigation component. Each `Item` represents a breadcrumb link.
import { Breadcrumbs, Item } from '@react-aria/breadcrumbs';
function BreadcrumbExample() {
return (
<Breadcrumbs>
<Item key="home">Home</Item>
<Item key="about">About</Item>
<Item key="contact">Contact</Item>
</Breadcrumbs>
);
}
Custom Separator
This feature allows you to customize the separator between breadcrumb items. In this example, the separator is set to '>'.
import { Breadcrumbs, Item } from '@react-aria/breadcrumbs';
function CustomSeparatorExample() {
return (
<Breadcrumbs separator=">">
<Item key="home">Home</Item>
<Item key="about">About</Item>
<Item key="contact">Contact</Item>
</Breadcrumbs>
);
}
Breadcrumbs with Icons
This feature allows you to include icons in your breadcrumb items. Each `Item` can contain both an icon and text.
import { Breadcrumbs, Item } from '@react-aria/breadcrumbs';
import { HomeIcon, InfoIcon, ContactIcon } from './icons';
function BreadcrumbsWithIcons() {
return (
<Breadcrumbs>
<Item key="home"><HomeIcon /> Home</Item>
<Item key="about"><InfoIcon /> About</Item>
<Item key="contact"><ContactIcon /> Contact</Item>
</Breadcrumbs>
);
}
react-breadcrumbs-dynamic is a flexible and customizable breadcrumb component for React. It allows for dynamic generation of breadcrumbs based on the current route. Compared to @react-aria/breadcrumbs, it offers more flexibility in terms of dynamic breadcrumb generation but may require additional effort to ensure accessibility.
react-router-breadcrumbs-hoc is a higher-order component for generating breadcrumbs based on React Router routes. It is specifically designed to work with React Router, making it a good choice for applications that use React Router for navigation. However, it may not provide the same level of accessibility out-of-the-box as @react-aria/breadcrumbs.
react-breadcrumbs is a simple and lightweight breadcrumb component for React. It is easy to use and integrates well with React Router. While it is straightforward to implement, it may lack some of the advanced accessibility features provided by @react-aria/breadcrumbs.
This package is part of react-spectrum. See the repo for more details.
FAQs
Spectrum UI components in React
The npm package @react-aria/breadcrumbs receives a total of 623,612 weekly downloads. As such, @react-aria/breadcrumbs popularity was classified as popular.
We found that @react-aria/breadcrumbs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
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.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.