{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "p-select-20",
  "description": "Rich select with avatars and usernames",
  "registryDependencies": [
    "@coss/avatar",
    "@coss/select"
  ],
  "files": [
    {
      "path": "registry/default/particles/p-select-20.tsx",
      "content": "\"use client\";\n\nimport {\n  Avatar,\n  AvatarFallback,\n  AvatarImage,\n} from \"@/registry/default/ui/avatar\";\nimport {\n  Select,\n  SelectItem,\n  SelectPopup,\n  SelectTrigger,\n  SelectValue,\n} from \"@/registry/default/ui/select\";\n\nconst users = [\n  {\n    avatar:\n      \"https://images.unsplash.com/photo-1543610892-0b1f7e6d8ac1?w=72&h=72&dpr=2&q=80\",\n    initials: \"JH\",\n    label: \"Jenny Hamilton\",\n    username: \"@jennycodes\",\n    value: \"jenny\",\n  },\n  {\n    avatar:\n      \"https://images.unsplash.com/photo-1628157588553-5eeea00af15c?w=72&h=72&dpr=2&q=80\",\n    initials: \"PS\",\n    label: \"Paul Smith\",\n    username: \"@paulsmith\",\n    value: \"paul\",\n  },\n  {\n    avatar:\n      \"https://images.unsplash.com/photo-1655874819398-c6dfbec68ac7?w=72&h=72&dpr=2&q=80\",\n    initials: \"LW\",\n    label: \"Luna Wyen\",\n    username: \"@wyen.luna\",\n    value: \"luna\",\n  },\n];\n\nexport default function Particle() {\n  return (\n    <Select\n      aria-label=\"Select user\"\n      defaultValue={users[0]}\n      itemToStringValue={(item) => item.value}\n    >\n      <SelectTrigger className=\"h-auto py-1.5\">\n        <SelectValue>\n          {(item) => (\n            <span className=\"flex items-center gap-2\">\n              <Avatar className=\"size-8\">\n                <AvatarImage alt={item.label} src={item.avatar} />\n                <AvatarFallback>{item.initials}</AvatarFallback>\n              </Avatar>\n              <span className=\"flex flex-col text-left\">\n                <span className=\"truncate font-medium\">{item.label}</span>\n                <span className=\"truncate text-muted-foreground text-xs\">\n                  {item.username}\n                </span>\n              </span>\n            </span>\n          )}\n        </SelectValue>\n      </SelectTrigger>\n      <SelectPopup>\n        {users.map((item) => (\n          <SelectItem className=\"py-1.5\" key={item.value} value={item}>\n            <span className=\"flex items-center gap-2\">\n              <Avatar className=\"size-8\">\n                <AvatarImage alt={item.label} src={item.avatar} />\n                <AvatarFallback>{item.initials}</AvatarFallback>\n              </Avatar>\n              <span className=\"flex flex-col\">\n                <span className=\"truncate font-medium\">{item.label}</span>\n                <span className=\"truncate text-muted-foreground text-xs\">\n                  {item.username}\n                </span>\n              </span>\n            </span>\n          </SelectItem>\n        ))}\n      </SelectPopup>\n    </Select>\n  );\n}\n",
      "type": "registry:block"
    }
  ],
  "meta": {
    "className": "**:data-[slot=preview]:w-full **:data-[slot=preview]:max-w-64"
  },
  "categories": [
    "select",
    "avatar"
  ],
  "type": "registry:block"
}