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

v0.1.0

Published

Kit UI Avatar component — image / text / icon avatars with grouping and sizes.

Readme

@kit-ng-ui/avatar

Image / text / icon avatars and a stacked group, for Kit UI. Mirrors ant-design's Avatar and Avatar.Group.

Install

pnpm add @kit-ng-ui/avatar @kit-ng-ui/core @kit-ng-ui/icons

Styles

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

Use

import { Component } from '@angular/core';
import { KitAvatarComponent, KitAvatarGroupComponent } from '@kit-ng-ui/avatar';

@Component({
  standalone: true,
  imports: [KitAvatarComponent, KitAvatarGroupComponent],
  template: `
    <kit-avatar>U</kit-avatar>
    <kit-avatar src="/u/me.png" alt="me" />
    <kit-avatar icon="github" shape="square" />
    <kit-avatar size="lg">Long Name</kit-avatar>

    <kit-avatar-group [maxCount]="3" size="large">
      <kit-avatar src="/1.png" />
      <kit-avatar src="/2.png" />
      <kit-avatar>K</kit-avatar>
      <kit-avatar>R</kit-avatar>
    </kit-avatar-group>
  `,
})
export class Demo {}

API

<kit-avatar>

| Input | Type | Default | Description | | ------------ | --------------------------------------------------------------- | ----------- | ------------------------------------------------------------------------ | | src | string \| null | null | Image URL. Falls back to text/icon on error. | | srcSet | string \| null | null | Native srcset for the underlying <img>. | | alt | string \| null | null | Native alt for accessibility. | | icon | string \| null | null | Icon name from the registry. Shown when src is absent or failed. | | shape | 'circle' \| 'square' | 'circle' | Corner radius. | | size | 'sm' \| 'md' \| 'lg' \| number \| string | 'md' | Preset, pixel number, or any CSS length. | | loading | 'eager' \| 'lazy' | 'eager' | Native loading attribute for the <img>. | | gap | number | 4 | Horizontal padding (px) when auto-fitting projected text. |

| Output | Payload | Description | | ------------ | --------- | ----------------------------------------------------------------- | | imageError | Event | Fires when the image fails to load. The component falls back automatically. |

Projected content (<ng-content>) renders as text only when no src and no icon are set. Text is auto-scaled to fit when the avatar size is a known pixel value; if size is a CSS string like "3rem" the text is NOT scaled (the component cannot measure container width statically).

<kit-avatar-group>

Stacks projected <kit-avatar> children with overlap.

| Input | Type | Default | Description | | ---------- | --------------------------------------------------- | ------- | ---------------------------------------------------------- | | maxCount | number \| null | null | Maximum number of avatars to render. Extras collapse into a "+N" chip. | | size | KitAvatarSize \| null | null | Reserved for future propagation; v0.1 does not push to children — see TODO below. | | shape | 'circle' \| 'square' \| null | null | Reserved for future propagation; v0.1 does not push to children — see TODO below. |

Behavior notes

  • Image error is non-recoverable per render — once the image errors, the component locks to the fallback path. Swapping [src] to a different URL resets the error state.
  • The group hides overflowing children via display: none set on each host element. This preserves their identity for change-detection without re-projecting.
  • v0.1 does NOT propagate [size] / [shape] from group to children. Set them on each <kit-avatar> directly. Cascade behavior will be added when the @kit-ng-ui/config-provider lands.

TODO (parity)

  • maxPopoverPlacement — overlay-based popover listing the overflowing avatars. Pending the @kit-ng-ui/popover overlay primitive.
  • Propagation of size / shape from group to children (waiting on a host-context contract via @kit-ng-ui/config-provider).
  • Per-overflow-chip color overrides — deferred until a real use case lands; for now, restyle the chip via CSS targeting .kit-avatar--overflow.