{"id":13632657,"url":"https://github.com/jamiebuilds/react-gridlist","last_synced_at":"2025-04-04T20:11:54.614Z","repository":{"id":38684616,"uuid":"251233081","full_name":"jamiebuilds/react-gridlist","owner":"jamiebuilds","description":"A virtual-scrolling GridList component based on CSS Grids","archived":false,"fork":false,"pushed_at":"2021-05-14T21:54:13.000Z","size":1211,"stargazers_count":426,"open_issues_count":0,"forks_count":8,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-28T19:09:07.185Z","etag":null,"topics":["css","grid","grid-layout","list","listview","react","scrolling","virtual","windowing"],"latest_commit_sha":null,"homepage":"https://jamiebuilds.github.io/react-gridlist","language":"TypeScript","has_issues":false,"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/jamiebuilds.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}},"created_at":"2020-03-30T07:32:08.000Z","updated_at":"2025-03-27T19:44:28.000Z","dependencies_parsed_at":"2022-08-28T22:53:10.031Z","dependency_job_id":null,"html_url":"https://github.com/jamiebuilds/react-gridlist","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamiebuilds%2Freact-gridlist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamiebuilds%2Freact-gridlist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamiebuilds%2Freact-gridlist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamiebuilds%2Freact-gridlist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jamiebuilds","download_url":"https://codeload.github.com/jamiebuilds/react-gridlist/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247242679,"owners_count":20907134,"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","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":["css","grid","grid-layout","list","listview","react","scrolling","virtual","windowing"],"created_at":"2024-08-01T22:03:10.147Z","updated_at":"2025-04-04T20:11:54.585Z","avatar_url":"https://github.com/jamiebuilds.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# React GridList\n\n\u003e A virtual-scrolling GridList component based on CSS Grids.\n\n- Render anything (not just images) of a known width/height inside.\n- Variable height items in the same row.\n- Highly performant virtual scrolling (aka windowing) for buttery smoothness.\n- Customizable \u0026 Responsive.\n- [Very small bundle size](https://bundlephobia.com/result?p=react-gridlist)\n\n## Install\n\n```sh\nnpm install --save react-gridlist\n```\n\n## Example\n\n```js\nimport React from \"react\"\nimport GridList from \"react-gridlist\"\n\nfunction getGridGap(elementWidth: number, windowHeight: number) {\n  if (elementWidth \u003e 720 \u0026\u0026 windowHeight \u003e 480) {\n    return 10\n  } else {\n    return 5\n  }\n}\n\nfunction getColumnCount(elementWidth: number, gridGap: number) {\n  return Math.floor((elementWidth + gridGap) / (300 + gridGap))\n}\n\nfunction getWindowMargin(windowHeight: number) {\n  return Math.round(windowHeight * 1.5)\n}\n\nfunction getItemData(image: Image, columnWidth: number) {\n  let imageRatio = image.height / image.width\n  let adjustedHeight = Math.round(columnWidth * imageRatio)\n\n  return {\n    key: image.url,\n    height: adjustedHeight,\n  }\n}\n\nfunction Example(props) {\n  return (\n    \u003cGridList\n      items={props.images}\n      getGridGap={getGridGap}\n      getColumnCount={getColumnCount}\n      getWindowMargin={getWindowMargin}\n      getItemData={getItemData}\n      renderItem={(image) =\u003e {\n        return (\n          \u003cimg\n            src={image.url}\n            width={image.width}\n            height={image.height}\n            className={styles.image}\n          /\u003e\n        )\n      }}\n    /\u003e\n  )\n}\n```\n\n## Fixed Column Width\n\nYou can also pass a `fixedColumnWidth` to lock the columns to a specific pixel\nwidth.\n\n```js\n\u003cGridList\n  // ...\n  fixedColumnWidth={300}\n/\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamiebuilds%2Freact-gridlist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamiebuilds%2Freact-gridlist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamiebuilds%2Freact-gridlist/lists"}