{
  "name": "avatar",
  "type": "registry:ui",
  "framework": "react",
  "title": "Avatar",
  "description": "A circular user avatar with image support and initials fallback in five sizes.",
  "dependencies": [
    "class-variance-authority",
    "radix-ui"
  ],
  "files": [
    {
      "path": "ui/avatar.tsx",
      "content": "\"use client\"\n\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { Avatar as AvatarPrimitive } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst avatarVariants = cva(\n  \"relative flex shrink-0 items-center justify-center overflow-hidden rounded-full bg-newt-brand font-semibold text-newt-on-accent\",\n  {\n    variants: {\n      size: {\n        xs: \"h-4 w-4 text-[9px]\",\n        sm: \"h-6 w-6 text-[11px]\",\n        md: \"h-8 w-8 text-[13px]\",\n        default: \"h-10 w-10 text-base\",\n        lg: \"h-20 w-20 text-[28px]\",\n      },\n    },\n    defaultVariants: {\n      size: \"default\",\n    },\n  }\n)\n\nexport interface AvatarProps\n  extends\n    React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>,\n    VariantProps<typeof avatarVariants> {}\n\n/*\n * Radix owns the image state: `AvatarImage` renders once its source has\n * loaded, and `AvatarFallback` shows until then and when the load fails.\n * Only the look is newt/ui's.\n */\nconst Avatar = React.forwardRef<\n  React.ComponentRef<typeof AvatarPrimitive.Root>,\n  AvatarProps\n>(({ className, size, ...props }, ref) => (\n  <AvatarPrimitive.Root\n    ref={ref}\n    className={cn(avatarVariants({ size }), className)}\n    {...props}\n  />\n))\nAvatar.displayName = \"Avatar\"\n\nconst AvatarImage = React.forwardRef<\n  React.ComponentRef<typeof AvatarPrimitive.Image>,\n  React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>\n>(({ className, alt = \"\", ...props }, ref) => (\n  <AvatarPrimitive.Image\n    ref={ref}\n    alt={alt}\n    className={cn(\"h-full w-full object-cover\", className)}\n    {...props}\n  />\n))\nAvatarImage.displayName = \"AvatarImage\"\n\nconst AvatarFallback = React.forwardRef<\n  React.ComponentRef<typeof AvatarPrimitive.Fallback>,\n  React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>\n>(({ className, ...props }, ref) => (\n  <AvatarPrimitive.Fallback\n    ref={ref}\n    className={cn(\"flex h-full w-full items-center justify-center\", className)}\n    {...props}\n  />\n))\nAvatarFallback.displayName = \"AvatarFallback\"\n\nexport { Avatar, AvatarImage, AvatarFallback, avatarVariants }\n",
      "type": "registry:ui"
    }
  ]
}