Skip to content

Avatar group

Show a team or set of contributors in a small space.

IdentityPeople
npx shadcn@latest add @silicon-ui/avatar-group

Installation

With the shadcn CLI

npx shadcn@latest add @silicon-ui/avatar-group

Manually

  1. Install the dependencies

    npm install motion
  2. Copy these files into your project

    • components/silicon-ui/avatar-group/avatar-group.tsx
    • components/silicon-ui/avatar-group/avatar-group.module.css

    Shared with other components. Skip any you already have.

    • components/silicon-ui/avatar/avatar.tsx
    • components/silicon-ui/avatar/avatar.module.css
    • components/silicon-ui/lib/silicon-provider.tsx
  3. Add the foundation, once per app, for the design and motion tokens

    npx shadcn@latest add @silicon-ui/silicon-foundation

Usage

usage.tsx
import { AvatarGroup } from "@/components/silicon-ui/avatar-group/avatar-group";

API reference

PropTypeDefault
members*AvatarGroupMember[]—
maxnumber4
size"sm" | "md" | "lg""md"
labelstring"Team members"

Dependencies

npm
motion
Registry
silicon-motion-tokensavatar