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

@record-evolution/widget-sidenav

v1.0.13

Published

Webcomponent widget-sidenav following open-wc recommendations

Readme

widget-sidenav

IronFlock widget: A Lit 3.x web component that renders a vertical side navigation menu with Material Design icons. Supports route-based highlighting and emits navigation events for integration with SPA routers.

screenshot

Installation

npm i @record-evolution/widget-sidenav

Peer Dependencies: This widget requires @material/web to be available at runtime via import map or bundled separately.

Usage

<script type="module">
    import '@record-evolution/widget-sidenav'
</script>

<widget-sidenav-1.0.12></widget-sidenav-1.0.12>

Note: The element tag includes the version number (e.g., widget-sidenav-1.0.12). This is replaced at build time via @rollup/plugin-replace.

Configuration

The widget accepts an inputData property with the following structure:

interface InputData {
    title?: string
    route?: string // Navigation route for title click
    leadingSlash?: boolean // Add leading slash to routes
    trailingSlash?: boolean // Add trailing slash to routes
    style?: {
        fontSize?: number
        fontWeight?: number
        color?: string // Font color
        backgroundColor?: string
    }
    navItems?: Array<{
        label?: string
        iconName?: string // Material icon name (e.g., "home", "settings")
        route?: string // Navigation route on click
        leadingSlash?: boolean
        trailingSlash?: boolean
    }>
}

Example Configuration

element.inputData = {
    title: 'Dashboard',
    route: '/',
    style: {
        fontSize: 16,
        fontWeight: 500
    },
    navItems: [
        { label: 'Home', iconName: 'home', route: '/' },
        { label: 'Analytics', iconName: 'analytics', route: '/analytics' },
        { label: 'Settings', iconName: 'settings', route: '/settings' }
    ]
}

Navigation Events

When a navigation item is clicked, the widget dispatches a nav-submit custom event:

element.addEventListener('nav-submit', (e) => {
    console.log(e.detail)
    // { path: "/settings" }
})

Route Matching

The widget highlights the active navigation item based on the current route:

element.route = '/settings/profile' // Highlights "Settings" nav item
  • Routes starting with / are matched from the beginning (absolute)
  • Other routes are matched from the end (relative)

Material Icons

Icons are rendered using @material/web icon component. Use icon names from Google Material Symbols:

{
    iconName: 'home'
} // Home icon
{
    iconName: 'settings'
} // Settings gear icon
{
    iconName: 'person'
} // User profile icon

Theming

The widget supports theming via CSS custom properties or the theme property:

CSS Custom Properties:

widget-sidenav-1.0.12 {
    --re-text-color: #333;
    --re-tile-background-color: #fff;
}

Theme Object:

element.theme = {
    theme_name: 'dark',
    theme_object: {
        backgroundColor: '#1a1a1a',
        title: { textStyle: { color: '#fff' } }
    }
}

Development

npm run start    # Dev server at localhost:8000/demo/
npm run build    # Production build to dist/
npm run types    # Regenerate TypeScript types from schema
npm run release  # Build, bump version, push to git with tag

License

MIT