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

uni-tab-group

v1.0.1

Published

<uni-tab-group /> is a tab component designed to instantly apply uniopen's design elements to any child element assigned with [slot=tab], enabling rapid integration across multiple pages.

Readme

uni-tab-group

Published on webcomponents.org DeepScan grade

<uni-tab-group /> is a tab component designed to instantly apply uniopen's design elements to any child element assigned with [slot=tab], enabling rapid integration across multiple pages.

<uni-tab-group />

Basic Usage

<uni-tab-group /> is a web component. All we need to do is put the required script into your HTML document. Then follow <uni-tab-group />'s html structure and everything will be all set.

  • Required Script

    <script
      type="module"
      src="https://unpkg.com/uni-tab-group/mjs/wc-uni-tab-group.js">        
    </script>
  • Structure

    Put <uni-tab-group /> into HTML document. It will have different functions and looks with attribute mutation.

    <uni-tab-group>
      <a href="#tab1" slot="tab" data-active>tab 1</a>
      <a href="#tab2" slot="tab">tab 2</a>
      <a href="#tab3" slot="tab">tab 3</a>
      <a href="#tab4" slot="tab">tab 4</a>
      <a href="#tab5" slot="tab">tab 5</a>
    </uni-tab-group>

JavaScript Instantiation

<uni-tab-group /> could also use JavaScript to create DOM element. Here comes some examples.

<script type="module">
import { UniTabGroup } from 'https://unpkg.com/uni-tab-group/mjs/wc-uni-tab-group.js';

const tabsTemplate = document.querySelector('.my-tabs-template');

// use DOM api
const nodeA = document.createElement('uni-tab-group');
nodeA.appendChild(tabsTemplate.content.cloneNode(true));
document.body.appendChild(nodeA);

// new instance with Class
const nodeB = new UniTabGroup();
nodeB.appendChild(tabsTemplate.content.cloneNode(true));
document.body.appendChild(nodeB);
</script>

Style Customization

Developers could apply styles to decorate <uni-tab-group />'s looking.

<style>
uni-tab-group {
  --uni-tab-group-text-color-normal: var(--ct_text_main_general);
  --uni-tab-group-text-color-hover: var(--ct_text_moderate_subtlest);
  --uni-tab-group-text-color-active: var(--ct_text_inverse_general);

  --uni-tab-group-background-color-normal: transparent;
  --uni-tab-group-background-color-hover: transparent;
  --uni-tab-group-background-color-active: var(--ct_tab-segmented_unit_selected);

  --uni-tab-group-mask-size: 12px;
}
</style>

Additionally, a specific tab can be highlighted simply by applying the data-active attribute.

<uni-tab-group>
  <a href="#tab1" slot="tab" data-active>tab 1</a>
  <a href="#tab2" slot="tab">tab 2</a>
  <a href="#tab3" slot="tab">tab 3</a>
</uni-tab-group>

Attribute

<uni-tab-group /> component exposes a curated set of attributes, enabling developers to dynamically adjust the user interface. This provides the flexibility to tailor the component’s appearance to seamlessly adapt to any given context.

  • size

    The size attribute configures the overall dimensions of <uni-tab-group />. The component currently supports three standard options: large, medium, and small, defaulting to medium.

    <uni-tab-group
      size="medium"
    >
      <a href="#tab1" slot="tab" data-active>tab 1</a>
      <a href="#tab2" slot="tab">tab 2</a>
      <a href="#tab3" slot="tab">tab 3</a>
      <a href="#tab4" slot="tab">tab 4</a>
      <a href="#tab5" slot="tab">tab 5</a>
    </uni-tab-group>

Property

| Property Name | Type | Description | | ----------- | ----------- | ----------- | | size | String | Getter / Setter size. size configures the overall dimensions of <uni-tab-group />. The component currently supports three standard options: large, medium, and small, defaulting to medium. |

Method

| Mathod Signature | Description | | ----------- | ----------- | | refresh() | Force a UI refresh on <uni-tab-group />. |

Reference