Search code examples
reactjsflexboxmaterial-ui

Material UI Grid List item Spacing


I am new to Material UI, but I would like to increase the spacing between the image tiles in the Grid List, I have followed the example in the Material UI documentation, and have searched Stack Overflow for similar examples, but haven't found the answer. Any help or direction to resources would be appreciated.


Solution

  • Use the padding prop on the Grid List component:

    <GridList
      padding={20}
    />
    

    Read more on this in the documentation. Also, check out the code for the examples by clicking on the top right <> icon.

    Update: The new prop is called spacing now.