{"id":20218256,"url":"https://github.com/cannercms/grid-breakpoint","last_synced_at":"2025-10-12T10:42:07.095Z","repository":{"id":57254036,"uuid":"72521635","full_name":"CannerCMS/grid-breakpoint","owner":"CannerCMS","description":"Automatically add breakpoints to your grids","archived":false,"fork":false,"pushed_at":"2018-08-29T09:15:30.000Z","size":875,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-20T02:23:49.659Z","etag":null,"topics":["flexbox","grid","grid-breakpoint"],"latest_commit_sha":null,"homepage":"http://canner.github.io/grid-breakpoint","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/CannerCMS.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":"2016-11-01T09:23:21.000Z","updated_at":"2022-09-25T15:35:21.000Z","dependencies_parsed_at":"2022-08-31T09:01:53.473Z","dependency_job_id":null,"html_url":"https://github.com/CannerCMS/grid-breakpoint","commit_stats":null,"previous_names":["canner/grid-breakpoint"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/CannerCMS/grid-breakpoint","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CannerCMS%2Fgrid-breakpoint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CannerCMS%2Fgrid-breakpoint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CannerCMS%2Fgrid-breakpoint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CannerCMS%2Fgrid-breakpoint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CannerCMS","download_url":"https://codeload.github.com/CannerCMS/grid-breakpoint/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CannerCMS%2Fgrid-breakpoint/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279011057,"owners_count":26084865,"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-12T02:00:06.719Z","response_time":53,"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":["flexbox","grid","grid-breakpoint"],"created_at":"2024-11-14T06:37:45.854Z","updated_at":"2025-10-12T10:42:07.079Z","avatar_url":"https://github.com/CannerCMS.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# grid-breakpoint [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url]\n\u003e Automatically add breakpoints to your grid (This project is build on top of `flexboxgrid`, which is a 12 column grid system).\n\n## Installation\n\n```sh\n$ npm install --save grid-breakpoint\n```\n\n## Problem in writing grids\n\nGrid is great! But one big commonly problem in writing grids is when you have a big list of columns, you can't just push all the columns into a row.  If the containers have different height, your items will end up displaying unexpected.\n\nSo let's turn\n\n```\n\u003cRow\u003e\n  \u003cCol span={6}/\u003e\n  \u003cCol span={6}/\u003e\n  \u003cCol span={6}/\u003e\n  \u003cCol span={6}/\u003e\n  \u003cCol span={6}/\u003e\n  \u003cCol span={6}/\u003e\n  \u003cCol span={6}/\u003e\n  {....}\n\u003c/Row\u003e\n```\n\nto automatically\n\n```\n\u003cRow\u003e\n  \u003cCol span={6}/\u003e\n  \u003cCol span={6}/\u003e\n\u003c/Row\u003e\n\u003cRow\u003e\n  \u003cCol span={6}/\u003e\n  \u003cCol span={6}/\u003e\n\u003c/Row\u003e\n\u003cRow\u003e\n  \u003cCol span={6}/\u003e\n  \u003cCol span={6}/\u003e\n\u003c/Row\u003e\n\u003cRow\u003e\n  \u003cCol span={6}/\u003e\n  \u003cCol span={6}/\u003e\n\u003c/Row\u003e\n\u003cRow\u003e\n  \u003cCol span={6}/\u003e\n  \u003cCol span={6}/\u003e\n\u003c/Row\u003e\n```\n\n`grid-breakpoint` automatically calculate how many columns should in a row and wrapped `\u003cRow/\u003e` for `\u003cCol/\u003e`!\n\n## Usage\n\nAnd add to your component as below.\n\n**NOTICE: You need to import `react-flexbox-grid`'s css in order to let it work correctly**\n\n```js\nimport React, {Component} from 'react';\nimport GridBreakPoint from 'grid-breakpoint';\n\nimport 'react-flexbox-grid/dist/react-flexbox-grid.css';\n\nclass GridExample extends Component {\n  render() {\n    const list = range(20).map((col, i) =\u003e {\n      return \u003cdiv key={i}\u003e{col}\u003c/div\u003e;\n    });\n\n    // in this example, when the screen width is large(lg)\n    // it'll wrap \u003cCol/\u003e as structure below\n    // \u003cRow\u003e ---\u003e automaticlly wrapped\n    //   \u003cCol/\u003e\n    //   \u003cCol/\u003e\n    //   \u003cCol/\u003e\n    // \u003c/Row\u003e\n\n    // in md screen\n    // \u003cRow\u003e ---\u003e automaticlly wrapped\n    //   \u003cCol/\u003e\n    //   \u003cCol/\u003e\n    // \u003c/Row\u003e\n\n    // in xs screen (xs + xsOffset = 6)\n    // \u003cRow\u003e ---\u003e automaticlly wrapped\n    //   \u003cCol/\u003e\n    //   \u003cCol/\u003e\n    // \u003c/Row\u003e\n\n    return (\n      \u003cGridBreakpoint\n        lg={4}\n        md={6}\n        xs={3}\n        xsOffset={3}\n        detectContainerWidth={true} // whether detect container width or not, if not will detect window width.\n        rowClassName=\"row-test\"\n        colClassName=\"col-test\"\u003e\n        {list}\n      \u003c/GridBreakpoint\u003e\n    );\n  }\n}\n\n```\n\n## Start example server\n\n```\nnpm start\n```\n\n## License\n\nMIT © [Canner](https://github.com/canner)\n\n\n[npm-image]: https://badge.fury.io/js/grid-breakpoint.svg\n[npm-url]: https://npmjs.org/package/grid-breakpoint\n[travis-image]: https://travis-ci.org/Canner/grid-breakpoint.svg?branch=master\n[travis-url]: https://travis-ci.org/Canner/grid-breakpoint\n[daviddm-image]: https://david-dm.org/Canner/grid-breakpoint.svg?theme=shields.io\n[daviddm-url]: https://david-dm.org/Canner/grid-breakpoint\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcannercms%2Fgrid-breakpoint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcannercms%2Fgrid-breakpoint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcannercms%2Fgrid-breakpoint/lists"}