{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "avatar-group", "type": "registry:ui", "title": "Avatar Group", "description": "An animated avatar group that displays overlapping user images and smoothly shifts each avatar forward on hover to highlight it.", "dependencies": [ "motion" ], "registryDependencies": [ "https://animate-ui.com/r/tooltip" ], "files": [ { "path": "registry/components/avatar-group/index.tsx", "content": "'use client';\n\nimport * as React from 'react';\nimport { motion, type Transition } from 'motion/react';\n\nimport { cn } from '@/lib/utils';\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n type TooltipProps,\n type TooltipContentProps,\n} from '@/components/animate-ui/components/tooltip';\n\ntype AvatarProps = TooltipProps & {\n children: React.ReactNode;\n zIndex: number;\n transition: Transition;\n translate: string | number;\n};\n\nfunction AvatarContainer({\n children,\n zIndex,\n transition,\n translate,\n ...props\n}: AvatarProps) {\n return (\n \n \n \n \n {children}\n \n \n \n \n );\n}\n\ntype AvatarGroupTooltipProps = TooltipContentProps;\n\nfunction AvatarGroupTooltip(props: AvatarGroupTooltipProps) {\n return ;\n}\n\ntype AvatarGroupProps = Omit, 'translate'> & {\n children: React.ReactElement[];\n transition?: Transition;\n invertOverlap?: boolean;\n translate?: string | number;\n tooltipProps?: Omit;\n};\n\nfunction AvatarGroup({\n ref,\n children,\n className,\n transition = { type: 'spring', stiffness: 300, damping: 17 },\n invertOverlap = false,\n translate = '-30%',\n tooltipProps = { side: 'top', sideOffset: 24 },\n ...props\n}: AvatarGroupProps) {\n return (\n \n \n {children?.map((child, index) => (\n \n {child}\n \n ))}\n \n \n );\n}\n\nexport {\n AvatarGroup,\n AvatarGroupTooltip,\n type AvatarGroupProps,\n type AvatarGroupTooltipProps,\n};\n", "type": "registry:ui", "target": "components/animate-ui/components/avatar-group.tsx" } ] }