I'm playing a little bit with Material-UI. Are there any options for creating a grid layout (like in Bootstrap)?
If not, what is the way to add this functionality?
There is a GridList component but I guess it has some different purpose.
I'm playing a little bit with Material-UI. Are there any options for creating a grid layout (like in Bootstrap)?
If not, what is the way to add this functionality?
There is a GridList component but I guess it has some different purpose.
I hope this is not too late to give a response.
I was also looking for a simple, robust, flexible and highly customizable bootstrap like react grid system to use in my projects.
The best I know of is
react-pure-grid
https://www.npmjs.com/package/react-pure-gridreact-pure-grid
gives you the power to customize every aspect of your grid system, while at the same time it has built in defaults which probably suits any projectUsage
-
This is old question but google bring me to here. After a little search I found a good package: https://www.npmjs.com/package/react-grid-system
I think this is the best, easy to use and lightweight.
I looked around for an answer to this and the best way I found was to use Flex and inline styling on different components.
For example, to make two paper components divide my full screen in 2 vertical components (in ration of 1:4), the following code works fine.
Now, with some more calculations, you can easily divide your components on a page.
Further Reading on flex
The way I do is go to http://getbootstrap.com/customize/ and only check "grid system" to download. There are
bootstrap-theme.css
andbootstrap.css
in downloaded files, and I only need the latter.In this way, I can use the grid system of Bootstrap, with everything else from Material UI.
Material UI have implemented their own Flexbox layout.
It appears they initially wanted to keep themselves as purely a 'components' library. But one of the core developers decided it was too important not to have their own. It has now been merged into the core code and was released with v1.0.0.
You can install it via:
It is now in the official documentation with code examples.
From the description of material design specs:
If you are looking for a much lightweight Grid component library, I'm using React-Flexbox-Grid, the implementation of
flexboxgrid.css
in React.On top of that, React-Flexbox-Grid played nicely with both material-ui, and react-toolbox (the alternative material design implementation).