{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"connector-list","type":"registry:ui","title":"Connector List","description":"A wallet picker list with icons, pending state, and a no-wallet-detected fallback.","docs":"```tsx\nimport { ConnectorList } from \"@/components/ui/connector-list\"\n\n<ConnectorList connectors={wallets} onSelect={connect} />\n```","dependencies":["lucide-react"],"devDependencies":[],"registryDependencies":[],"files":[{"path":"registry/onchain-ui/connector-list.tsx","type":"registry:ui","target":"components/ui/connector-list.tsx","content":"\"use client\";\n\nimport { LoaderCircleIcon, WalletIcon } from \"lucide-react\";\nimport { cn } from \"@/lib/utils\";\nimport type { ReactNode } from \"react\";\n\nexport interface ConnectorOption {\n  /** Stable connector id, passed back to `onSelect` */\n  id: string;\n  /** Wallet name, e.g. \"MetaMask\" */\n  name: string;\n  /** Wallet icon. EIP-6963 wallets announce a data URI */\n  icon?: string | null | undefined;\n  /** Secondary line, e.g. \"Installed\" or \"Scan with your phone\" */\n  description?: ReactNode | undefined;\n  /** Render but do not allow selection */\n  disabled?: boolean | undefined;\n}\n\nexport interface ConnectorListProps {\n  /** Wallets the user can pick from */\n  connectors: Array<ConnectorOption>;\n  /** Called with the id of the wallet the user picked */\n  onSelect: (connectorId: string) => void;\n  /** Connector currently being connected. Blocks further selection */\n  pendingId?: string | null | undefined;\n  /** Disable every row */\n  disabled?: boolean | undefined;\n  /** Shown when `connectors` is empty */\n  emptyMessage?: ReactNode | undefined;\n  /** Applied to the list wrapper */\n  className?: string | undefined;\n  /** Applied to each row */\n  itemClassName?: string | undefined;\n}\n\nfunction ConnectorIcon({ connector }: { connector: ConnectorOption }) {\n  if (connector.icon) {\n    return (\n      <img\n        src={connector.icon}\n        alt=\"\"\n        className=\"size-5 shrink-0 rounded\"\n        aria-hidden=\"true\"\n      />\n    );\n  }\n  return <WalletIcon className=\"size-5 shrink-0 text-muted-foreground\" />;\n}\n\nexport function ConnectorList({\n  connectors,\n  onSelect,\n  pendingId,\n  disabled = false,\n  emptyMessage = \"No compatible wallet connection is available on this device.\",\n  className,\n  itemClassName,\n}: ConnectorListProps) {\n  if (connectors.length === 0) {\n    return (\n      <p\n        className={cn(\n          \"px-2 py-6 text-center text-xs text-balance text-muted-foreground\",\n          className\n        )}\n      >\n        {emptyMessage}\n      </p>\n    );\n  }\n\n  const isPending = pendingId != null;\n\n  return (\n    <div className={cn(\"grid gap-0.5\", className)}>\n      {connectors.map((connector) => (\n        <button\n          key={connector.id}\n          type=\"button\"\n          disabled={disabled || connector.disabled || isPending}\n          onClick={() => onSelect(connector.id)}\n          className={cn(\n            \"flex w-full items-center gap-2.5 rounded-lg px-2 py-2 text-left text-sm\",\n            \"transition-colors duration-150 outline-none\",\n            \"hover:bg-accent focus-visible:ring-2 focus-visible:ring-ring\",\n            \"disabled:pointer-events-none disabled:opacity-50\",\n            itemClassName\n          )}\n        >\n          <ConnectorIcon connector={connector} />\n\n          <span className=\"min-w-0 flex-1\">\n            <span className=\"block truncate font-medium\">{connector.name}</span>\n            {connector.description && (\n              <span className=\"block truncate text-xs text-muted-foreground\">\n                {connector.description}\n              </span>\n            )}\n          </span>\n\n          {pendingId === connector.id && (\n            <LoaderCircleIcon\n              className=\"size-4 shrink-0 animate-spin text-muted-foreground\"\n              aria-hidden=\"true\"\n            />\n          )}\n        </button>\n      ))}\n    </div>\n  );\n}\n"}]}