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/badge

v0.1.0

Published

Kit UI Badge component — count / dot / status indicators and ribbon wrapper.

Downloads

74

Readme

@kit-ng-ui/badge

Numeric / dot / status indicator and corner ribbon for Kit UI. Mirrors ant-design's Badge and Badge.Ribbon.

Install

pnpm add @kit-ng-ui/badge @kit-ng-ui/core

Styles

// app styles.scss
@use '@kit-ng-ui/core/styles' as *;
@use '@kit-ng-ui/badge/styles' as badge;

Use

import { Component } from '@angular/core';
import { KitBadgeComponent, KitRibbonComponent } from '@kit-ng-ui/badge';

@Component({
  standalone: true,
  imports: [KitBadgeComponent, KitRibbonComponent],
  template: `
    <!-- Numeric badge over an avatar / icon -->
    <kit-badge [count]="5">
      <span class="avatar">A</span>
    </kit-badge>

    <!-- Dot only -->
    <kit-badge dot>
      <kit-icon name="bell" />
    </kit-badge>

    <!-- Standalone status -->
    <kit-badge status="processing" text="Building" />

    <!-- Corner ribbon -->
    <kit-ribbon text="Hot" color="red">
      <div class="card">...</div>
    </kit-ribbon>
  `,
})
export class Demo {}

API

<kit-badge>

| Input | Type | Default | Description | | ---------------- | ----------------------------------------------------- | ----------- | ------------------------------------------------------------------------------------------ | | count | number | 0 | Number shown in the indicator. Hidden when 0 unless [showZero]. | | showZero | boolean | false | Render the count even when it is zero. | | overflowCount | number | 99 | When count > overflowCount, the badge renders "{overflowCount}+". | | dot | boolean | false | Render a small dot instead of a count. | | status | 'default' \| 'success' \| 'processing' \| 'error' \| 'warning' \| null | null | Switches to standalone form — dot + optional text, ignores children. | | text | string \| null | null | Trailing label for the standalone status form. | | color | 'violet' \| 'blue' \| 'green' \| 'gold' \| 'red' \| string \| null | null | Preset name OR any CSS color string applied to count / dot / status-dot. | | size | 'default' \| 'small' | 'default' | Size of the count pill. | | offset | [number, number] \| null | null | [x, y] pixel offset added on top of the default top-right translate. | | title | string \| null | null | Native title attribute for the indicator. |

<kit-ribbon>

Corner banner that wraps content. Renders the banner across the top-right corner by default.

| Input | Type | Default | Description | | ----------- | ----------------------------------------------------- | ------- | -------------------------------------------------------- | | text | string (required) | — | Text rendered inside the banner. | | color | 'violet' \| 'blue' \| 'green' \| 'gold' \| 'red' \| string \| null | null | Preset name OR any CSS color string. Defaults to brand violet. | | placement | 'start' \| 'end' | 'end' | 'end' pins the banner to the right, 'start' to the left. |

Behavior notes

  • [status] is a mode switch, not a modifier. When set, the badge ignores any projected children and renders an inline dot + text. This matches ant-design's "with status text" mode — it is structurally distinct from the wrapper mode. If you set [status] and wrap a child, the child silently disappears: switch to the wrapper form (no [status]) or place the child as a sibling of the badge.
  • The wrapper-mode indicator uses position: absolute and is hidden when count === 0 && !dot && !showZero. The wrapped child still renders.
  • Custom [color] strings are applied via inline background-color. For accessibility, pick colors with adequate contrast against the badge text (default --kit-color-text-inverse).
  • The processing status dot uses a subtle pulse animation; it respects prefers-reduced-motion automatically via browser defaults — explicit handling can be added later if needed.