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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@litforge/vertical-menu

v0.1.3

Published

A vertical navigation menu component with collapsible sections, built with Lit.

Readme

@litforge/vertical-menu

A vertical navigation menu component with collapsible sections, built with Lit.

Overview

The VerticalMenu component provides a complete vertical navigation menu with:

  • Collapsible/expandable functionality
  • Logo support
  • Nested menu items
  • Active state management
  • SPA mode support
  • Fully customizable styling

Installation

npm install @litforge/vertical-menu
# or
pnpm add @litforge/vertical-menu
# or
yarn add @litforge/vertical-menu

Note: This component depends on:

  • @litforge/menu-item
  • @litforge/logo-img

Basic Usage

<script type="module">
  import '@litforge/vertical-menu';
</script>

<vertical-menu
  items="${menuItems}"
  expanded
  show-toggle
></vertical-menu>

Properties

| Property | Type | Default | Description | |----------|------|---------|-------------| | items | VerticalMenuItem[] | undefined | Menu items array | | expanded | boolean | false | Expanded/collapsed state | | showToggle | boolean | false | Shows expand/collapse toggle | | spaMode | boolean | false | Enables SPA navigation mode | | width | string | undefined | Menu width when expanded | | collapsedWidth | string | undefined | Menu width when collapsed | | logoSrc | string | undefined | Logo image source | | logoAlt | string | undefined | Logo alt text | | logoSize | string | undefined | Logo size | | logoRounded | boolean | false | Rounded logo | | logoElevated | boolean | false | Logo with shadow | | background | string | undefined | Menu background color | | textColor | string | undefined | Text color | | accentColor | string | undefined | Accent color | | activeBackground | string | undefined | Active item background | | activeText | string | undefined | Active item text color |

Events

menu-toggle

Fired when menu is expanded/collapsed.

interface MenuToggleDetail {
  expanded: boolean;
}

menu-select

Fired when a menu item is selected.

interface MenuSelectDetail {
  item: VerticalMenuItem;
}

Examples

Basic Menu

<vertical-menu
  items="${menuItems}"
  expanded
></vertical-menu>

With Logo and Toggle

<vertical-menu
  items="${menuItems}"
  logoSrc="/logo.png"
  logoAlt="Logo"
  showToggle
  expanded
></vertical-menu>

SPA Mode

<vertical-menu
  items="${menuItems}"
  spaMode
  expanded
  @menu-select="${handleMenuSelect}"
></vertical-menu>

Styling

The component uses CSS variables for extensive theming:

vertical-menu {
  --lf-vertical-menu-width: 256px;
  --lf-vertical-menu-collapsed-width: 64px;
  --lf-vertical-menu-background: #ffffff;
  --lf-vertical-menu-text-color: #111827;
  /* ... more variables */
}

TypeScript

import { VerticalMenu } from '@litforge/vertical-menu';
import type { VerticalMenuProps, VerticalMenuItem, MenuSelectDetail } from '@litforge/vertical-menu';

License

Part of the LitForge component library.