---
title: "Grid"
description: "Grid layout container. Wraps the Polaris <s-grid> web component."
canonical_url: "https://shopify.yan.ad/components/layout/grid"
---
# Grid

> Grid layout container. Wraps the Polaris <s-grid> web component.

## Live preview

<polaris-preview example="grid">



</polaris-preview>

## Props

Includes all [Box](https://shopify.yan.ad/components/layout/box) props plus:

<table>
<thead>
  <tr>
    <th>
      Prop
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        gridTemplateColumns
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      —
    </td>
    
    <td>
      Grid template columns
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        gridTemplateRows
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      —
    </td>
    
    <td>
      Grid template rows
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        justifyItems
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      —
    </td>
    
    <td>
      Justify items
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        alignItems
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      —
    </td>
    
    <td>
      Align items
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        placeItems
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      —
    </td>
    
    <td>
      Place items shorthand
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        justifyContent
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      —
    </td>
    
    <td>
      Justify content
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        alignContent
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      —
    </td>
    
    <td>
      Align content
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        placeContent
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      —
    </td>
    
    <td>
      Place content shorthand
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        gap
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      —
    </td>
    
    <td>
      Gap between items
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        rowGap
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      —
    </td>
    
    <td>
      Row gap
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        columnGap
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      —
    </td>
    
    <td>
      Column gap
    </td>
  </tr>
</tbody>
</table>

## Slots

<table>
<thead>
  <tr>
    <th>
      Slot
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        default
      </code>
    </td>
    
    <td>
      Grid children
    </td>
  </tr>
</tbody>
</table>

## Polaris Element

Renders as `<s-grid>`. See [Polaris Grid docs](https://shopify.dev/docs/api/app-home/web-components/layout/grid).


## Sitemap

See the full [sitemap](https://shopify.yan.ad/sitemap.md) for all pages.
