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

pict-section-tabbar

v1.0.0

Published

Host-agnostic tab-bar UI helper: compact underline tabs with icons, submenu groups, pin zones, and menu/wrap/scroll overflow strategies -- a pure string-builder + layout pass with no framework dependency.

Readme

Pict-Section-TabBar

A compact, host-agnostic tab-bar control for Pict applications and anything else that renders HTML. It draws one small, professional tab strip -- underline-active tabs with optional FontAwesome icons, submenu groups, pin zones, and configurable overflow -- as a pure string-builder plus a tiny browser runtime, with no framework dependency.

It is intentionally not a pict-view. A tab host may be a pict view or a plain provider, so the module exports cheap, host-agnostic pieces you compose into whichever host you have.

Installation

npm i pict-section-tabbar

Quick Start

const libTabBar = require('pict-section-tabbar');

// 1. Describe the tabs. A def is a LEAF (Key/Label/Icon) or a GROUP (adds Children[]).
const tabs =
[
    { Key: 'overview', Label: 'Overview', Icon: 'fas fa-circle-info' },
    { Key: 'features', Label: 'Features', Icon: 'fas fa-star' },
    { Key: 'data', Label: 'Data', Icon: 'fas fa-database', Children:
        [
            { Key: 'records', Label: 'Records', Icon: 'fas fa-table' },
            { Key: 'charts', Label: 'Charts', Icon: 'fas fa-chart-column' },
        ] },
];

// 2. Render the whole bar as an HTML string. onClick returns the JS for a leaf/child click.
const html = libTabBar.renderTabsHTML(tabs, 'overview',
    (pTab) => `selectTab('${ pTab.Key }')`,
    { overflow: 'menu', display: 'both' });

// 3. Inject the CSS once, drop the HTML into a container, then bind the runtime.
document.head.insertAdjacentHTML('beforeend', `<style>${ libTabBar.TABBAR_CSS }</style>`);
document.getElementById('nav').innerHTML = html;
libTabBar.layout(document);

Icons are FontAwesome class strings (for example fas fa-database); the host page must load FontAwesome for them to appear. Every color in the CSS is a --theme-color-* custom property with a sensible fallback, so the bar inherits your theme tokens automatically.

Features

  • Leaf and group tabs -- a leaf navigates on click; a group renders a dropdown submenu, and when a child is active the group tab reads active and shows a "Group -> Child" breadcrumb.
  • Pin zones -- any top-level def may carry Pin: 'left' | 'center' | 'right' to park it in a zone of the bar.
  • Overflow strategies -- menu collapses overflowing tabs into a "More" dropdown, wrap flows onto more rows, scroll scrolls the row horizontally (the default).
  • Display modes -- icon plus label (default), icon only, or text only.
  • Two host paths -- a pict-view template path (TABBAR_CSS + TABBAR_TEMPLATES + buildTabs()) and a plain string path (renderTabsHTML()).
  • Tiny runtime -- layout() binds the dropdown behavior and, for the menu strategy, moves overflowing tabs into "More".

Documentation

Ecosystem

Pict-Section-TabBar is part of the Retold module suite:

License

MIT

Example Applications