{"id":17903598,"url":"https://github.com/jb1905/fluentui-react-grid","last_synced_at":"2025-03-23T18:31:30.371Z","repository":{"id":37041815,"uuid":"300369501","full_name":"JB1905/fluentui-react-grid","owner":"JB1905","description":"🚧 React components for Fluent UI layout styles","archived":false,"fork":false,"pushed_at":"2023-02-04T01:38:04.000Z","size":2863,"stargazers_count":3,"open_issues_count":8,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-23T21:37:25.767Z","etag":null,"topics":["col","components","fluent","grid","layout","library","microsoft","react","row","styles","ui"],"latest_commit_sha":null,"homepage":"https://jb1905.github.io/fluentui-react-grid/","language":"TypeScript","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/JB1905.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-01T17:44:02.000Z","updated_at":"2024-03-04T15:45:03.000Z","dependencies_parsed_at":"2023-02-18T13:01:20.612Z","dependency_job_id":null,"html_url":"https://github.com/JB1905/fluentui-react-grid","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JB1905%2Ffluentui-react-grid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JB1905%2Ffluentui-react-grid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JB1905%2Ffluentui-react-grid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JB1905%2Ffluentui-react-grid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JB1905","download_url":"https://codeload.github.com/JB1905/fluentui-react-grid/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245149278,"owners_count":20568865,"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":["col","components","fluent","grid","layout","library","microsoft","react","row","styles","ui"],"created_at":"2024-10-28T16:40:57.505Z","updated_at":"2025-03-23T18:31:29.950Z","avatar_url":"https://github.com/JB1905.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [fluentui-react-grid](https://github.com/JB1905/fluentui-react-grid)\n\n[![NPM version](https://img.shields.io/npm/v/fluentui-react-grid?style=flat-square)](https://www.npmjs.com/package/fluentui-react-grid)\n[![NPM downloads](https://img.shields.io/npm/dm/fluentui-react-grid?style=flat-square)](https://www.npmjs.com/package/fluentui-react-grid)\n[![NPM license](https://img.shields.io/npm/l/fluentui-react-grid?style=flat-square)](https://www.npmjs.com/package/fluentui-react-grid)\n[![Codecov](https://img.shields.io/codecov/c/github/JB1905/fluentui-react-grid?style=flat-square)](https://codecov.io/gh/JB1905/fluentui-react-grid)\n[![Travis](https://img.shields.io/travis/com/JB1905/fluentui-react-grid/main?style=flat-square)](https://app.travis-ci.com/github/JB1905/fluentui-react-grid)\n[![Bundle size](https://img.shields.io/bundlephobia/min/fluentui-react-grid?style=flat-square)](https://bundlephobia.com/result?p=fluentui-react-grid)\n\n## About\n\nReact components for Fluent UI layout styles\n\n### Demo\n\n[**Playground – play with the library in Storybook**](https://jb1905.github.io/fluentui-react-grid/)\n\n### Alternatives\n\n- [Fluent UI styles](https://developer.microsoft.com/en-us/fluentui#/styles/web/layout)\n\n## Contents\n\n- [How to Install](#how-to-install)\n- [Components](#components)\n  - [Grid](#grid)\n  - [Row](#row)\n  - [Col](#col)\n- [Example](#example)\n\n## How to Install\n\nFirst, install the library in your project by npm:\n\n```sh\n$ npm install fluentui-react-grid\n```\n\nOr Yarn:\n\n```sh\n$ yarn add fluentui-react-grid\n```\n\nYou also need to include CSS styles (in the HTML header section, e.g. in index.html):\n\n```html\n\u003clink\n  rel=\"stylesheet\"\n  href=\"https://static2.sharepointonline.com/files/fabric/office-ui-fabric-core/11.0.0/css/fabric.min.css\"\n/\u003e\n```\n\n## Getting Started\n\n**Import the default component and use it as Compound Component:**\n\n```jsx\nimport Grid from 'fluentui-react-grid';\n\n// ...\n\nconst App = () =\u003e {\n  return (\n    \u003cGrid\u003e\n      \u003cGrid.Row\u003e\n        \u003cGrid.Col\u003eCol content here...\u003c/Grid.Col\u003e\n        {/* ... */}\n      \u003c/Grid.Row\u003e\n      {/* ... */}\n    \u003c/Grid\u003e\n  );\n};\n\n// ...\n```\n\n**Or import all components:**\n\n```jsx\nimport { Grid, Row, Col } from 'fluentui-react-grid';\n\n// ...\n\nconst App = () =\u003e {\n  return (\n    \u003cGrid\u003e\n      \u003cRow\u003e\n        \u003cCol\u003eCol content here...\u003c/Col\u003e\n        {/* ... */}\n      \u003c/Row\u003e\n      {/* ... */}\n    \u003c/Grid\u003e\n  );\n};\n\n// ...\n```\n\n## Components\n\n### Grid\n\n#### Available options\n\n[HTML div element props](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes)\n\n_By default grid order is `dir=\"ltr\"` – (order from left to right). You can change it to `dir=\"rtl\"` – (right to left/reversed order) or set `dir=\"auto\"` to remove (it will break the layout)_\n\n### Row\n\n#### Available options\n\n[HTML div element props](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes)\n\n### Col\n\n#### Available options\n\n[HTML div element props](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes) and dedicated params based on Fluent UI class names\n\n[Check corresponding Fluent UI class names here](https://developer.microsoft.com/en-us/fluentui#/styles/web/layout)\n\n| Name              | Type                            |\n| ----------------- | ------------------------------- |\n| **sizeSm**        | number or string (between 1-12) |\n| **sizeMd**        | number or string (between 1-12) |\n| **sizeLg**        | number or string (between 1-12) |\n| **sizeXl**        | number or string (between 1-12) |\n| **sizeXxl**       | number or string (between 1-12) |\n| **sizeXxxl**      | number or string (between 1-12) |\n| **smPush**        | number or string (between 1-12) |\n| **mdPush**        | number or string (between 1-12) |\n| **lgPush**        | number or string (between 1-12) |\n| **xlPush**        | number or string (between 1-12) |\n| **xxlPush**       | number or string (between 1-12) |\n| **xxxlPush**      | number or string (between 1-12) |\n| **smPull**        | number or string (between 1-12) |\n| **mdPull**        | number or string (between 1-12) |\n| **lgPull**        | number or string (between 1-12) |\n| **xlPull**        | number or string (between 1-12) |\n| **xxlPull**       | number or string (between 1-12) |\n| **xxxlPull**      | number or string (between 1-12) |\n| **hiddenSm**      | boolean                         |\n| **hiddenMd**      | boolean                         |\n| **hiddenMdDown**  | boolean                         |\n| **hiddenMdUp**    | boolean                         |\n| **hiddenLg**      | boolean                         |\n| **hiddenLgDown**  | boolean                         |\n| **hiddenLgUp**    | boolean                         |\n| **hiddenXl**      | boolean                         |\n| **hiddenXlDown**  | boolean                         |\n| **hiddenXlUp**    | boolean                         |\n| **hiddenXxl**     | boolean                         |\n| **hiddenXxlDown** | boolean                         |\n| **hiddenXxlUp**   | boolean                         |\n| **hiddenXxxl**    | boolean                         |\n\n## Example\n\n### Basics\n\n```jsx\n\u003cGrid\u003e\n  \u003cGrid.Row\u003e\n    \u003cGrid.Col sizeSm={6} sizeMd={4} sizeLg={2}\u003e\n      A\n    \u003c/Grid.Col\u003e\n\n    \u003cGrid.Col sizeSm={6} sizeMd={6} sizeLg={10}\u003e\n      B\n    \u003c/Grid.Col\u003e\n  \u003c/Grid.Row\u003e\n\u003c/Grid\u003e\n```\n\n### Inheritance\n\n```jsx\n\u003cGrid\u003e\n  \u003cGrid.Row\u003e\n    \u003cGrid.Col sizeSm={12} sizeLg={4}\u003e\n      Example\n    \u003c/Grid.Col\u003e\n  \u003c/Grid.Row\u003e\n\u003c/Grid\u003e\n```\n\n### Push and pull\n\n```jsx\n\u003cGrid\u003e\n  \u003cGrid.Row\u003e\n    \u003cGrid.Col sizeSm={4} smPush={8}\u003e\n      First in code\n    \u003c/Grid.Col\u003e\n\n    \u003cGrid.Col sizeSm={8} smPull={4}\u003e\n      Second in code\n    \u003c/Grid.Col\u003e\n  \u003c/Grid.Row\u003e\n\u003c/Grid\u003e\n```\n\n### Visibility\n\n```jsx\n\u003cGrid\u003e\n  \u003cGrid.Row\u003e\n    \u003cGrid.Col sizeSm={12} hiddenXxlUp\u003e\n      Visible on smaller screens\n    \u003c/Grid.Col\u003e\n\n    \u003cGrid.Col sizeSm={12} hiddenXlDown\u003e\n      Visible on larger screens\n    \u003c/Grid.Col\u003e\n  \u003c/Grid.Row\u003e\n\u003c/Grid\u003e\n```\n\n### Without Compound Components\n\n```jsx\n\u003cGrid\u003e\n  \u003cRow\u003e\n    \u003cCol sizeSm=\"6\" sizeMd={4} sizeLg={2}\u003e\n      \u003cDemoBlock\u003eA\u003c/DemoBlock\u003e\n    \u003c/Col\u003e\n\n    \u003cCol sizeSm={6} sizeMd=\"8\" sizeLg={10}\u003e\n      \u003cDemoBlock\u003eB\u003c/DemoBlock\u003e\n    \u003c/Col\u003e\n  \u003c/Row\u003e\n\u003c/Grid\u003e\n```\n\n## License\n\nThis project is licensed under the MIT License © 2020-present Jakub Biesiada\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjb1905%2Ffluentui-react-grid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjb1905%2Ffluentui-react-grid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjb1905%2Ffluentui-react-grid/lists"}