{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"avatar-group","type":"registry:ui","title":"Avatar Group","description":"Overlapping avatars with a +N count once there are more than fit.","dependencies":[],"files":[{"path":"components/ui/avatar-group.tsx","type":"registry:ui","content":"import * as React from \"react\";\nimport { cn } from \"@/lib/utils\";\n\nfunction AvatarGroup({ max, className, children, ...props }: React.ComponentProps<\"div\"> & { max?: number }) {\n  const items = React.Children.toArray(children);\n  const shown = max !== undefined && items.length > max ? items.slice(0, Math.max(1, max - 1)) : items;\n  const rest = items.length - shown.length;\n\n  return (\n    <div\n      data-slot=\"avatar-group\"\n      className={cn(\"flex -space-x-2 *:size-8 *:ring-2 *:ring-background\", className)}\n      {...props}\n    >\n      {shown}\n      {rest > 0 && <AvatarGroupCount>+{rest}</AvatarGroupCount>}\n    </div>\n  );\n}\n\nfunction AvatarGroupCount({ className, ...props }: React.ComponentProps<\"span\">) {\n  return (\n    <span\n      data-slot=\"avatar-group-count\"\n      className={cn(\n        \"bg-muted text-muted-foreground relative flex shrink-0 items-center justify-center rounded-full text-xs font-medium tabular-nums\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nexport { AvatarGroup, AvatarGroupCount };\n"}]}