{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "avatar",
  "type": "registry:ui",
  "title": "Avatar",
  "description": "An avatar component",
  "dependencies": [
    "solid-js",
    "@kobalte/core"
  ],
  "files": [
    {
      "path": "src/registry/ui/avatar.tsx",
      "content": "import type { ValidComponent } from \"solid-js\"\nimport { splitProps } from \"solid-js\"\n\nimport * as ImagePrimitive from \"@kobalte/core/image\"\nimport type { PolymorphicProps } from \"@kobalte/core/polymorphic\"\n\nimport { cn } from \"~/lib/utils\"\n\ntype AvatarRootProps<T extends ValidComponent = \"span\"> = ImagePrimitive.ImageRootProps<T> & {\n  class?: string | undefined\n}\n\nconst Avatar = <T extends ValidComponent = \"span\">(\n  props: PolymorphicProps<T, AvatarRootProps<T>>\n) => {\n  const [local, others] = splitProps(props as AvatarRootProps, [\"class\"])\n  return (\n    <ImagePrimitive.Root\n      class={cn(\"relative flex size-10 shrink-0 overflow-hidden rounded-full\", local.class)}\n      {...others}\n    />\n  )\n}\n\ntype AvatarImageProps<T extends ValidComponent = \"img\"> = ImagePrimitive.ImageImgProps<T> & {\n  class?: string | undefined\n}\n\nconst AvatarImage = <T extends ValidComponent = \"img\">(\n  props: PolymorphicProps<T, AvatarImageProps<T>>\n) => {\n  const [local, others] = splitProps(props as AvatarImageProps, [\"class\"])\n  return <ImagePrimitive.Img class={cn(\"aspect-square size-full\", local.class)} {...others} />\n}\n\ntype AvatarFallbackProps<T extends ValidComponent = \"span\"> =\n  ImagePrimitive.ImageFallbackProps<T> & { class?: string | undefined }\n\nconst AvatarFallback = <T extends ValidComponent = \"span\">(\n  props: PolymorphicProps<T, AvatarFallbackProps<T>>\n) => {\n  const [local, others] = splitProps(props as AvatarFallbackProps, [\"class\"])\n  return (\n    <ImagePrimitive.Fallback\n      class={cn(\"flex size-full items-center justify-center bg-muted\", local.class)}\n      {...others}\n    />\n  )\n}\n\nexport { Avatar, AvatarImage, AvatarFallback }\n",
      "type": "registry:ui"
    }
  ]
}