npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@surstromming/breadcrumb

v0.1.0

Published

Trail of links back up the hierarchy.

Readme

@surstromming/breadcrumb

The trail back up the hierarchy. Data-driven: pass the path, get the trail.

Dependency graph

graph LR
  breadcrumb["@surstromming/breadcrumb"]
  design["@surstromming/design"]
  icon["@surstromming/icon"]
  breadcrumb --> design
  breadcrumb --> icon

Usage

<template>
  <Breadcrumb :items="items" />
</template>

<script setup lang="ts">
import { Breadcrumb, type BreadcrumbItem } from '@surstromming/breadcrumb'

const items: BreadcrumbItem[] = [
  { label: 'Home', to: '/' },
  { label: 'Components', href: '/components' },
  { label: 'Breadcrumb' }, // no target → the current page
]
</script>

Props

| Prop | Type | Default | Notes | | ---------- | ------------------ | ------------ | -------------------------------------------------- | | items | BreadcrumbItem[] | — (required) | { label, href?, to? } | | maxItems | number | 0 (off) | Collapse the middle to an ellipsis past this length |

With maxItems, the root and the tail stay; the middle folds into a single ellipsis (maxItems - 1 trailing items remain visible). The two ends are what tell you where you are and where you came from.

export interface BreadcrumbItem {
  label: string
  href?: string           // plain link
  to?: RouteLocationRaw   // vue-router link
}

An item with no href/to is the current page — it renders as text with aria-current="page" instead of a link. That's the rule the whole component runs on; there's no isCurrent flag to keep in sync with reality.

Anatomy

nav[aria-label=Breadcrumb]
  └─ ol.list
       └─ li.item        // link or current + chevron separator

Tokens

Links in muted-foregroundforeground on hover; the current page is foreground/500. Separator is a lucide chevron at 0.875rem.

Accessibility

<nav aria-label="Breadcrumb"> wrapping an ordered list — the structure is the semantics. Separators are <svg> icons inside the list item, and Icon marks them aria-hidden unless labelled, so they aren't read aloud.

Notes

The collapsed ellipsis is static — the hidden items aren't reachable from it. A dropdown that reveals them needs a menu component and is a later addition; for now, if the middle matters, don't set maxItems.