---
title: "InlineLayout"

doc_type: static
doc_category: static
doc_version: v20260901
source_url:
  html: 'https://developer.shopline.com/docs/apps/checkout/checkout-ui-customizer/ui-components/structure/inline-layout'
  md: 'https://developer.shopline.com/docs/apps/checkout/checkout-ui-customizer/ui-components/structure/inline-layout.md'
---
# InlineLayout

<code data-code-gray>InlineLayout</code> is used to manage content layout across multiple columns. By default, all columns share equal width and fill the available inline space. If content exceeds the explicitly set number of columns, it does not wrap. Instead, new columns are dynamically added to occupy the remaining inline space.

## Preview

![InlineLayout.jpg](https://s2cdn.myshopline.com/slfs/op-new/177512391477988/InlineLayout.jpg)


## Code example

```tsx
render('Checkout::Dynamic::Render', (props) => {
  return (
    <View border="base">
      <View>
        <Text size="extraExtraLarge">InlineLayoutDemo</Text>
      </View>
      <InlineLayout spacing="tight" columns={[64, 'fill', 'auto']}>
        <Text>InlineLayoutDemo1</Text>
        <Text>InlineLayoutDemo1</Text>
        <Text>InlineLayoutDemo1</Text>
      </InlineLayout>

      <InlineLayout
        spacing="extraTight"
        blockAlignment="center"
        columns={['auto', 'auto', 'auto', 'auto']}
        >
        <Text>InlineLayoutDemo2</Text>
        <Text>InlineLayoutDemo2</Text>
        <Text>InlineLayoutDemo2</Text>
        <Text>InlineLayoutDemo2</Text>
      </InlineLayout>

      <InlineLayout columns={['fill', 'auto']} blockAlignment="center" spacing="tight">
        <Text>InlineLayoutDemo3</Text>
        <Text>InlineLayoutDemo3</Text>
      </InlineLayout>

      <InlineLayout columns={['auto', 'auto']} blockAlignment="center" spacing="tight">
        <Text>InlineLayoutDemo4</Text>
        <Text>InlineLayoutDemo4</Text>
      </InlineLayout>
    </View>
  );
});
```

## InlineLayoutProps
> **tip**
>
> Optional properties are marked with a `?`. Properties without a `?` are required.

### columns?
<code data-code-gray>[MaybeResponsiveConditionalStyle](#mayberesponsiveconditionalstyle)&lt;[Columns](#columns-1)&gt;</code>

<Margin p="8px" m="8px" />

The number of colums to be displayed.

----

### inlineAlignment?
<code data-code-gray>[MaybeResponsiveConditionalStyle](#mayberesponsiveconditionalstyle)&lt;[InlineAlignment](#inlinealignment-1)&gt;</code>

<Margin p="8px" m="8px" />

Alignment along the main axis, where the main axis is the [inline axis](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_box_alignment/Box_alignment_in_grid_layout#content_alignment).

----

### blockAlignment?
<code data-code-gray>[MaybeResponsiveConditionalStyle](#mayberesponsiveconditionalstyle)&lt;[BlockAlignment](#blockalignment-1)&gt;</code>

<Margin p="8px" m="8px" />

Alignment along the cross axis, where the cross axis is the [block axis](https://developer.mozilla.org/en-US/docs/Web/CSS/align-items) within the grid area.

----

### spacing?
<code data-code-gray>[MaybeResponsiveConditionalStyle](#mayberesponsiveconditionalstyle)\<[Spacing](#spacing-1) | [[Spacing](#spacing-1), [Spacing](#spacing-1)]\></code> <code data-code-white>Default: base</code>

<Margin p="8px" m="8px" />

Spacing between elements.

----

### padding?
<code data-code-gray>[MaybeResponsiveConditionalStyle](#mayberesponsiveconditionalstyle)\<[MaybeShorthandProperty](#maybeshorthandproperty)&lt;[Spacing](#spacing-1)&gt;\></code>

<Margin p="8px" m="8px" />

Inner spacing.

----

## Type descriptions
### BlockAlignment
<code data-code-gray>start</code> <code data-code-gray>center</code> <code data-code-gray>end</code> <code data-code-gray>baseline</code>
<Margin p="8px" m="8px" />
----

### InlineAlignment
<code data-code-gray>start</code> <code data-code-gray>center</code> <code data-code-gray>end</code>
<Margin p="8px" m="8px" />
----

### Spacing
<code data-code-gray>none</code> <code data-code-gray>base</code> <code data-code-gray>extraTight</code> <code data-code-gray>tight</code> <code data-code-gray>loose</code> <code data-code-gray>extraLoose</code>
<Margin p="8px" m="8px" />
----

### Columns
<code data-code-gray>[GridItemSize[]](#griditemsize)</code>
<code data-code-gray>[GridItemSize](#griditemsize)</code>
<Margin p="8px" m="8px" />
----

### GridItemSize
<code data-code-gray>auto</code>
<code data-code-gray>fill</code>
<code data-code-gray>number</code>
<code data-code-gray>$\{number\}fr</code>
<code data-code-gray>$\{number\}%</code>
<Margin p="8px" m="8px" />
<Margin p="8px" m="8px" />

+ <code data-code-gray>auto</code>: Expands based on the content and does not proactively fill the remaining space.
+ <code data-code-gray>$\{number\}fr</code>: Distributes the remaining space equally, where <code data-code-gray>number</code> indicates the share of space.
+ <code data-code-gray>fill</code>: Fills the space like <code data-code-gray>1fr</code> but can shrink to 0 when the content is too long to prevent overflow.
+ <code data-code-gray>number</code>: Allocates content space according to the specified value. For example, setting <code data-code-gray>30</code> will occupy 30px.
+ <code data-code-gray>$\{number\}%</code>: Occupies content space as a percentage according to the configuration. For example, setting <code data-code-gray>30%</code> will take up 30% of the content space.
----
### MaybeResponsiveConditionalStyle
<code data-code-gray>T | [ConditionalStyle](#conditionalstyle)\<T, [ViewportSizeCondition](#viewportsizecondition)\></code>
<Margin p="8px" m="8px" />

+ Example of a plain value: <code data-code-gray>base</code>
+ Example of a conditional value: <code data-code-gray>\{ defaultValue: 'tight', conditionals: [\{ conditions: \{ viewportInlineSize: \{ min: 'medium' } }, value: 'loose' }] }</code>

----

### ConditionalStyle
<code data-code-gray>\{ defaultValue?: T; conditionals: [ConditionalValue](#conditionalvalue)&lt;T, [Conditions](#conditions)&gt;[] }</code>
<Margin p="8px" m="8px" />

----

### ConditionalValue
<code data-code-gray>\{ conditions: [Conditions](#conditions); value: T }</code>
<Margin p="8px" m="8px" />

----

### Conditions
<code data-code-gray>[AtLeastOne](#atleastone)&lt;[ViewportSizeCondition](#viewportsizecondition)&gt;</code>
<Margin p="8px" m="8px" />

----

### ViewportSizeCondition
<code data-code-gray>\{ viewportInlineSize: \{ min: T } }</code>
<Margin p="8px" m="8px" />

----

### AtLeastOne
<code data-code-gray>Partial&lt;T&gt; &amp; U[keyof U]</code>
<Margin p="8px" m="8px" />

----

### ViewportInlineSize
<code data-code-gray>extraSmall</code> <code data-code-gray>small</code> <code data-code-gray>medium</code> <code data-code-gray>large</code>
<Margin p="8px" m="8px" />

Refer to [Viewport breakpoints](https://developer.shopline.com/docs/apps/checkout/checkout-ui-customizer/component-utilities/style-helper.md#viewport-breakpoints).

----
### MaybeShorthandProperty
<code data-code-gray>T | [ShorthandProperty](#shorthandproperty)&lt;T&gt;</code>
<Margin p="8px" m="8px" />

----

### ShorthandProperty
<code data-code-gray>[T, T]</code><code data-code-gray>[T, T, T, T]</code>
<Margin p="8px" m="8px" />
----