{"id":31742867,"url":"https://github.com/feeden/lazy-load-img-component","last_synced_at":"2025-10-09T11:19:24.186Z","repository":{"id":143885284,"uuid":"292454515","full_name":"feEden/lazy-load-img-component","owner":"feEden","description":"An simple image lazy loading component based on react hooks and IntersectionObserver;","archived":false,"fork":false,"pushed_at":"2020-09-07T09:37:15.000Z","size":585,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-04T21:43:27.905Z","etag":null,"topics":["intersection-observer","lazy-load-img","lazyload-images","react","react-hooks","typescript"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/feEden.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-03T03:18:59.000Z","updated_at":"2020-09-10T05:58:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"8511bc08-56a5-48bc-abca-76d135bde6da","html_url":"https://github.com/feEden/lazy-load-img-component","commit_stats":null,"previous_names":["songsng/lazy-load-img-component"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/feEden/lazy-load-img-component","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feEden%2Flazy-load-img-component","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feEden%2Flazy-load-img-component/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feEden%2Flazy-load-img-component/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feEden%2Flazy-load-img-component/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/feEden","download_url":"https://codeload.github.com/feEden/lazy-load-img-component/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feEden%2Flazy-load-img-component/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001290,"owners_count":26083058,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["intersection-observer","lazy-load-img","lazyload-images","react","react-hooks","typescript"],"created_at":"2025-10-09T11:19:18.964Z","updated_at":"2025-10-09T11:19:24.177Z","avatar_url":"https://github.com/feEden.png","language":"JavaScript","readme":"# lazy-load-img-component\n\nAn simple image lazy load component based on react hooks and IntersectionObserver;\n\n## Install\n\n```\nnpm install lazy-load-img-component\n```\n\n## Supports Props\n\n```\n// loading图片 可选\nloadingImg?: string;\n// 图片加载失败展示图片\nerrorImg?: string;\n// 图片链接\nsrc: string;\n// 承载图片容器样式\nstyle?: CSSProperties;\n// img 标签上的所有属性 排除src\nimgOptions?: Omit\u003cImgHTMLAttributes\u003cHTMLImageElement\u003e, 'src'\u003e;\n// IntersectionObserver支持的属性\noptions?: IntersectionObserver;\n```\n\n## Basic Usage\n\n```\n\u003cLazyLoadImg\n    src='https://img.alicdn.com/bao/uploaded/i1/2207626746794/O1CN01gMwL08203hU9QmV93_!!0-item_pic.jpg'\n    style={{ width: '80px', height: '80px' }}\n    imgOptions={{\n        alt: '图片',\n    }}\n/\u003e,\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeeden%2Flazy-load-img-component","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffeeden%2Flazy-load-img-component","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeeden%2Flazy-load-img-component/lists"}