Web Design » Figma » How do you make a responsive grid in Figma?

How do you make a responsive grid in Figma?

Last updated on November 24, 2022 @ 8:33 pm

Responsive grids in Figma.

Making a responsive grid in Figma is as easy as adding a few lines of code. First, create a new file and name it grid.html

Inside of grid.html, add the following markup:

1. < div class="grid" >
2. < div class="row" >
3. < div class="col-md-12 col-sm-12" >

Next, inside of the grid.html file, add the following lines of code:

< style > .grid { display: grid; }

row { grid-template-columns: repeat(12); } .col-md-12, .col-sm-12 { padding: 12px; }.

PRO TIP: When creating a responsive grid in Figma, be sure to take into account the different screen sizes and devices that your design will be viewed on. Your grid should be flexible and adaptable to accommodate these different viewing conditions. Additionally, be sure to test your design on various devices and screen sizes to ensure that it looks and functions as intended.

Lastly, inside of the src/index.html file, add the following lines of code:

1
2
3
4

5
6
7
8

9
10
11
12

.

The code in grid.html creates a 12 column responsive grid. The row and col-md-12 and col-sm-12 classes are used to define the width and height of each column, respectively. The grid-template-columns property is used to define the repeating layout of the grid.

The padding property is used to define the padding between each column and the row. Finally, the src/index.html file is included to load the necessary dependencies.

Morgan Bash

Morgan Bash

Technology enthusiast and Co-Founder of Women Coders SF.