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

@kit-ng-ui/tabs

v0.2.0

Published

Kit UI Tabs — line / card tab strip with positions, sizes, lazy panels, editable-card add/remove, templatable labels, and roving-tabindex keyboard nav.

Readme

@kit-ng-ui/tabs

Tab strip + panel renderer. Supports line / card / editable-card types, top / bottom / left / right positions, three sizes, and lazy or keep-alive panels.

Install

pnpm add @kit-ng-ui/tabs
@use '@kit-ng-ui/tabs/styles' as tabs;

Usage

Data-driven

items: KitTabItem[] = [
  { key: 'overview', label: 'Overview', content: 'Plain string panel.' },
  { key: 'details', label: 'Details', content: detailsTpl },
];
<kit-tabs [items]="items" [(active)]="active"></kit-tabs>

Declarative panes (full templates)

<kit-tabs [(active)]="active" type="card">
  <kit-tab-pane key="profile" label="Profile">
    <kit-form>…</kit-form>
  </kit-tab-pane>
  <kit-tab-pane key="security" label="Security" [closable]="true"> … </kit-tab-pane>
</kit-tabs>

Editable cards

<kit-tabs
  type="editable-card"
  [items]="items"
  [(active)]="active"
  (add)="onAdd()"
  (remove)="onRemove($event)"
></kit-tabs>

Custom label (badge in the header) + test hooks

A tab header is the plain label by default. Nest an <ng-template kitTabLabel> (import KitTabLabelDirective) to render arbitrary markup — an icon, a live <kit-badge> count — inside the header. label stays the accessible name and the fallback. testid stamps a data-testid on the tab button for E2E hooks.

<kit-tabs [(active)]="direction" (change)="onSelectDirection($any($event))">
  <kit-tab-pane key="incoming" label="Đã nhận" testid="fr-tab-incoming">
    <ng-template kitTabLabel>
      Đã nhận @if (incomingPendingCount() > 0) {
      <kit-badge [count]="incomingPendingCount()" />
      }
    </ng-template>
    <!-- panel body… -->
  </kit-tab-pane>
  <kit-tab-pane key="outgoing" label="Đã gửi" testid="fr-tab-outgoing">
    <!-- panel body… -->
  </kit-tab-pane>
</kit-tabs>

Keyboard is the WAI-ARIA Tabs pattern with roving tabindex (Arrow / Home / End). activation="automatic" (default) selects as focus moves; activation="manual" only moves focus and the user activates with Enter / Space / click. Move focus programmatically with the public focus() method (e.g. from a viewChild):

private readonly tabs = viewChild.required(KitTabsComponent);
// …
this.tabs().focus();       // focus the active tab
this.tabs().focus(1);      // focus the tab at index 1

API

<kit-tabs>

| Input | Type | Default | Description | | ------------ | ---------------------------------------- | ------------- | ------------------------------------------------------- | | items | ReadonlyArray<KitTabItem> | [] | Tab list (ignored if panes are projected). | | active | string \| null (two-way) | first tab | Active tab key. | | type | 'line' \| 'card' \| 'editable-card' | 'line' | Visual style. | | position | 'top' \| 'bottom' \| 'left' \| 'right' | 'top' | Bar position. | | size | 'sm' \| 'md' \| 'lg' | 'md' | Tab density. | | keepAlive | boolean | false | Render hidden panels instead of unmounting. | | centered | boolean | false | Center the tab bar. | | activation | 'automatic' \| 'manual' | 'automatic' | Selection follows focus, or requires Enter/Space/click. |

| Output | Payload | Description | | -------- | -------- | -------------------------------------- | | change | string | Fires when active tab changes. | | add | void | Fires on + click in editable-card. | | remove | string | Fires when a closable tab is closed. |

| Method | Description | | --------------- | ----------------------------------------------------------------- | | focus(index?) | Move focus to the active tab, or to the tab at index (clamped). |

<kit-tab-pane>

| Input | Type | Default | Description | | ---------- | ---------------- | ------- | ----------------------------------------------------------- | | key | string | — | Required. Unique tab key. | | label | string | — | Required. Tab strip label / accessible name / fallback. | | disabled | boolean | false | Disable selection. | | closable | boolean | false | Show the close × in editable mode. | | testid | string \| null | null | data-testid stamped on the tab button. |

Project an <ng-template kitTabLabel> inside a pane (or set KitTabItem.labelTemplate) to replace the header text with arbitrary markup. KitTabItem also accepts a testid.

[kitTabLabel]

Structural directive marking an <ng-template> as a tab's header content. Import KitTabLabelDirective alongside KitTabPaneComponent.