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

@molecule/app-avatar-stack-react

v1.0.1

Published

React stacked avatars and user-chip component

Readme

@molecule/app-avatar-stack-react

Auto-generated, AI-first package reference for the molecule.dev ecosystem. It is written to be read by coding agents as much as by people, and is generated from this package's source — edit src/index.ts JSDoc, not this file.

React avatar-stack and user-chip components.

Exports:

  • <AvatarStack> — horizontal stack of up to max avatars with a trailing "+N" overflow chip.
  • <UserChip> — avatar + name + optional subtitle row for dropdowns, mention pickers, and row-level user references.

Both render on top of <Avatar> from @molecule/app-ui-react, so avatar fallbacks (text initials, color hash) come from there.

Quick Start

import { AvatarStack, UserChip } from '@molecule/app-avatar-stack-react'

// Overlapping avatar row for assignees
<AvatarStack
  people={[
    { name: 'Alice Kim', src: '/avatars/alice.jpg' },
    { name: 'Bob Lee' },
    { name: 'Carol Díaz', src: '/avatars/carol.jpg' },
  ]}
  max={3}
  size="sm"
/>

// Single user row in a dropdown
<UserChip name="Alice Kim" src="/avatars/alice.jpg" subtitle="Admin" />

Type

feature

Installation

npm install @molecule/app-avatar-stack-react @molecule/app-react @molecule/app-ui @molecule/app-ui-react react
npm install -D @types/react

API

Interfaces

AvatarStackPerson

Represents a single person entry rendered inside an AvatarStack.

interface AvatarStackPerson {
  /** Display name (also used to generate the text fallback). */
  name: string
  /** Optional avatar image URL. */
  src?: string
  /** Optional alt text — defaults to `name`. */
  alt?: string
}

AvatarStackProps

Props for {@link AvatarStack}.

interface AvatarStackProps {
  /** People to render. */
  people: AvatarStackPerson[]
  /** Maximum visible avatars. Remaining are summarised in an "overflow" chip. */
  max?: number
  /** Avatar size preset. */
  size?: 'xs' | 'sm' | 'md' | 'lg'
  /** Extra classes on the outer stack. */
  className?: string
}

UserChipProps

Props for {@link UserChip}.

interface UserChipProps {
  /** Display name. */
  name: string
  /** Optional avatar image URL. */
  src?: string
  /** Optional secondary line (role / email / handle). */
  subtitle?: ReactNode
  /** Optional trailing content (action button, status dot, etc.). */
  trailing?: ReactNode
  /** Avatar size preset. */
  size?: 'xs' | 'sm' | 'md' | 'lg'
  /** Extra classes on the outer row. */
  className?: string
}

Functions

AvatarStack(props)

Horizontal stack of overlapping avatars (assignees, attendees, etc.).

Renders up to max avatars; any remaining are summarised as +N in a trailing chip.

function AvatarStack({ people, max = 4, size = 'sm', className }: AvatarStackProps): JSX.Element
  • props — Component props (see {@link AvatarStackProps}).

UserChip(props)

Avatar + name + optional subtitle row — useful in dropdowns, mention pickers, assignment popovers, and row-level user references.

function UserChip({
  name,
  src,
  subtitle,
  trailing,
  size = 'sm',
  className,
}: UserChipProps): JSX.Element
  • props — Component props (see {@link UserChipProps}).

Injection Notes

Requirements

Peer dependencies:

  • @molecule/app-react ^1.0.1
  • @molecule/app-ui ^1.0.1
  • @molecule/app-ui-react ^1.0.1
  • react ^18.0.0 || ^19.0.0

Runtime Dependencies

  • @molecule/app-react
  • @molecule/app-ui
  • @molecule/app-ui-react
  • react

The overflow chip announces "+N more" — this is the only user-visible text (currently English-only). Avatar fallbacks (initials, color hash) come from <Avatar> in @molecule/app-ui-react. The overlap is an inline negative left margin (marginLeft: '-0.5rem'), not a ClassMap class: the abstract spacing scale is non-negative, so a negative margin is one of the sanctioned inline-style cases.