---
title: "Stack"
description: "Stack layout for vertical or horizontal arrangement. Wraps the Polaris <s-stack> web component."
canonical_url: "https://shopify.yan.ad/components/layout/stack"
---
# Stack

> Stack layout for vertical or horizontal arrangement. Wraps the Polaris <s-stack> web component.

## Live preview

<polaris-preview example="stack">



</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>
        direction
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      —
    </td>
    
    <td>
      Stack direction
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        justifyContent
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      —
    </td>
    
    <td>
      Justify content
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        alignItems
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      —
    </td>
    
    <td>
      Align items
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        alignContent
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      —
    </td>
    
    <td>
      Align content
    </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>
      Stack children
    </td>
  </tr>
</tbody>
</table>

## Polaris Element

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


## Sitemap

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