{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "An image in a round frame (recipe: size xs to xl, 24 to 64 px). Avatars are always round.",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "// Code generated by packages/kit-compose/src/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n// Source: packages/compose-gen/specs/parts/avatar.json\n\npackage blocks\n\nimport (\n\t\"github.com/ui8kit/codegen/generated/templ/compose\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/image\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/text\"\n\tuiutils \"github.com/ui8kit/codegen/generated/templ/orgutils\"\n)\n\n// AvatarProps are the props of Avatar; the values are the JSON shapes of the TypeScript props.\ntype AvatarProps struct {\n\tSrc any `json:\"src\"`\n\tAlt any `json:\"alt\"`\n\tSize any `json:\"size\"`\n\tClass string `json:\"className\"`\n}\n\n// An image in a round frame (recipe: size xs to xl, 24 to 64 px). Avatars are always round.\ntempl Avatar(p AvatarProps) {\n\t{{ vSrc := p.Src }}\n\t{{ vAlt := uiutils.Def(p.Alt, \"\") }}\n\t{{ vSize := uiutils.Def(p.Size, \"default\") }}\n\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: uiutils.S(uiutils.Cnv(recipeAvatar.Of(map[string]any{\"size\": vSize}), p.Class)), Attrs: uiutils.Attrs(\"data-slot\", \"avatar\")}}) {\n\t\t@compose.Image(compose.ImageProps{Fit: \"cover\", Size: \"auto\", ImageProps: image.ImageProps{Src: uiutils.URL(vSrc, true), Alt: uiutils.S(vAlt), Class: \"size-full object-cover\", Loading: \"eager\", Decoding: \"auto\", Attrs: uiutils.Attrs(\"draggable\", \"false\")}})\n\t}\n}\n",
      "path": "blocks/avatar.templ",
      "target": "blocks/avatar.templ"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "templ",
      "component"
    ]
  },
  "name": "avatar",
  "registryDependencies": [
    "image",
    "inline",
    "kit-image",
    "kit-text",
    "presets",
    "utils"
  ],
  "runtime": "templ",
  "title": "Avatar",
  "type": "registry:component"
}
