{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "avatar",
  "title": "Avatar",
  "description": "Astro profile images and text fallbacks in a shared size system.",
  "dependencies": [
    "cn"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "packages/ui/src/components/ui/avatar/avatar-badge.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"cn\"\n\ntype Props = HTMLAttributes<\"span\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<span\n  data-slot=\"avatar-badge\"\n  class={cn(\"bg-primary text-primary-foreground ring-background absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-blend-color ring-2 select-none group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2 group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2\", className)}\n  {...props}\n>\n  <slot />\n</span>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/avatar/avatar-badge.astro"
    },
    {
      "path": "packages/ui/src/components/ui/avatar/avatar-fallback.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"cn\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n  data-slot=\"avatar-fallback\"\n  class={cn(\"absolute inset-0 flex size-full items-center justify-center rounded-full bg-muted group-data-[size=lg]/avatar:text-sm group-data-[size=sm]/avatar:text-xs\", className)}\n  {...props}\n>\n  <slot />\n</div>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/avatar/avatar-fallback.astro"
    },
    {
      "path": "packages/ui/src/components/ui/avatar/avatar-group-count.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"cn\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n  data-slot=\"avatar-group-count\"\n  class={cn(\"bg-muted text-muted-foreground ring-background relative flex size-8 shrink-0 items-center justify-center rounded-full text-sm ring-2 group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3\", className)}\n  {...props}\n>\n  <slot />\n</div>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/avatar/avatar-group-count.astro"
    },
    {
      "path": "packages/ui/src/components/ui/avatar/avatar-group.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"cn\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n  data-slot=\"avatar-group\"\n  class={cn(\n    \"*:data-[slot=avatar]:ring-background group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2\",\n    className,\n  )}\n  {...props}\n>\n  <slot />\n</div>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/avatar/avatar-group.astro"
    },
    {
      "path": "packages/ui/src/components/ui/avatar/avatar-image.astro",
      "content": "---\nimport { Image } from \"astro:assets\"\nimport type { ComponentProps } from \"astro/types\"\n\nimport { cn } from \"cn\"\n\ntype Props = Partial<ComponentProps<typeof Image>>\n\nconst {\n  class: className,\n  alt = \"\",\n  width = 44,\n  height = 44,\n  sizes = \"44px\",\n  widths = [44, 88, 176],\n  ...props\n} = Astro.props\n---\n\n{props.src && (\n  <Image\n    data-slot=\"avatar-image\"\n    class={cn(\"absolute inset-0 z-10 aspect-square size-full rounded-full object-cover\", className)}\n    alt={alt}\n    width={width}\n    height={height}\n    sizes={sizes}\n    widths={widths}\n    {...(props as any)}\n  />\n)}\n",
      "type": "registry:file",
      "target": "~/src/components/ui/avatar/avatar-image.astro"
    },
    {
      "path": "packages/ui/src/components/ui/avatar/avatar.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"cn\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n  size?: \"default\" | \"sm\" | \"lg\"\n}\n\nconst { class: className, size = \"default\", ...props } = Astro.props\n---\n\n<div\n  data-slot=\"avatar\"\n  data-size={size}\n  class={cn(\"relative isolate inline-flex size-8 shrink-0 select-none items-center justify-center overflow-hidden rounded-full bg-background align-middle font-medium text-xs data-[size=lg]:size-10 data-[size=sm]:size-6 group/avatar\", className)}\n  {...props}\n>\n  <slot />\n</div>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/avatar/avatar.astro"
    },
    {
      "path": "packages/ui/src/components/ui/avatar/index.ts",
      "content": "export { default as Avatar } from \"./avatar.astro\"\nexport { default as AvatarBadge } from \"./avatar-badge.astro\"\nexport { default as AvatarFallback } from \"./avatar-fallback.astro\"\nexport { default as AvatarGroup } from \"./avatar-group.astro\"\nexport { default as AvatarGroupCount } from \"./avatar-group-count.astro\"\nexport { default as AvatarImage } from \"./avatar-image.astro\"\n",
      "type": "registry:file",
      "target": "~/src/components/ui/avatar/index.ts"
    }
  ],
  "meta": {
    "framework": "astro",
    "source": "@gnostic/ui",
    "testedDependencies": {
      "cn": "0.5.2"
    }
  },
  "docs": "https://ui.gnosticai.com/components/avatar",
  "categories": [
    "ui"
  ],
  "type": "registry:ui"
}
