---
title: InlineStack
description: InlineStack is used to lay out a horizontal row of elements.
source_url:
  html: https://shopify.dev/docs/api/checkout-extensions/post-purchase/components/inlinestack
  md: https://shopify.dev/docs/api/checkout-extensions/post-purchase/components/inlinestack.md
---

# InlineStack

InlineStack is used to lay out a horizontal row of elements

***

### Example

![inlinestack](https://cdn.shopify.com/shopifycloud/shopify-dev/production/assets/assets/images/api/checkout-extensions/post-purchase/components/inlinestack-Cix2gVDG.png)

##### JS

```ts
import {extend, InlineStack, View} from '@shopify/post-purchase-ui-extensions';

extend('Checkout::PostPurchase::Render', (root) => {
  const inlineStack = root.createComponent(
    InlineStack,
    {
      spacing: 'base',
    },
    [
      root.createComponent(View, {border: 'base', padding: 'base'}, 'View'),
      root.createComponent(View, {border: 'base', padding: 'base'}, 'View'),
      root.createComponent(View, {border: 'base', padding: 'base'}, 'View'),
    ],
  );

  root.appendChild(inlineStack);
});
```

##### React

```tsx
import {render, InlineStack, View} from '@shopify/post-purchase-ui-extensions-react';

render('Checkout::PostPurchase::Render', () => <App />);

function App() {
  return (
    <InlineStack spacing="base">
      <View border="base" padding="base">
        View
      </View>
      <View border="base" padding="base">
        View
      </View>
      <View border="base" padding="base">
        View
      </View>
    </InlineStack>
  );
}
```

***

## Props

optional = ?

| Name | Type | Description |
| - | - | - |
| alignment? | `"leading" \| "center" \| "trailing"` | Position children along the cross axis |
| spacing? | `"xtight" \| "tight" \| "loose" \| "xloose"` | Adjust spacing between children |

***