---
title: "View"

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/view'
  md: 'https://developer.shopline.com/docs/apps/checkout/checkout-ui-customizer/ui-components/structure/view.md'
---
# View

The <code data-code-gray>View</code> component is a universal container that maintains its internal content at its original size without forcibly stretching it. This component is particularly useful within layout components (such as <code>[Grid](https://developer.shopline.com/docs/apps/checkout/checkout-ui-customizer/ui-components/structure/grid.md)</code>, <code>[BlockStack](https://developer.shopline.com/docs/apps/checkout/checkout-ui-customizer/ui-components/structure/block-stack.md)</code>, <code>[InlineLayout](https://developer.shopline.com/docs/apps/checkout/checkout-ui-customizer/ui-components/structure/inline-layout.md)</code>) to prevent unexpected distortion of child components due to automatic size adjustments by layout components.

## Preview
![View.jpg](https://s2cdn.myshopline.com/slfs/op-new/177512440330475/View.jpg)

## Code example
```tsx
render('Checkout::Dynamic::Render', (props) => {
  return (
    <View border="base">
        View
    </View>
  );
});
```


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

### display?
<code data-code-gray>[MaybeResponsiveConditionalStyle](#mayberesponsiveconditionalstyle)&lt;[Display](#display-1)&gt;</code><code data-code-white>Default: block</code>

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

The alignment direction.

----

### maxBlockSize?
<code data-code-gray>[MaybeResponsiveConditionalStyle](#mayberesponsiveconditionalstyle)&lt;[Sizing](#sizing)&gt;</code>

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

The maximum vertical size.

----

### maxInlineSize?
<code data-code-gray>[MaybeResponsiveConditionalStyle](#mayberesponsiveconditionalstyle)&lt;[Sizing](#sizing)&gt;</code>

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

The maximum horizontal size.

----

### minBlockSize?
<code data-code-gray>[MaybeResponsiveConditionalStyle](#mayberesponsiveconditionalstyle)&lt;[Sizing](#sizing)&gt;</code>

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

The minimum vertical size.

----

### minInlineSize?
<code data-code-gray>[MaybeResponsiveConditionalStyle](#mayberesponsiveconditionalstyle)&lt;[Sizing](#sizing)&gt;</code>

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

The minimum horizontal size.

----

### opacity?
<code data-code-gray>[Opacity](#opacity-1)</code>

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

The opacity of the component.

----

### overflow?
<code data-code-gray>[Overflow](#overflow-1)</code>

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

Manages content overflow.

----

### border?
<code data-code-gray>[MaybeResponsiveConditionalStyle](#mayberesponsiveconditionalstyle)\<[MaybeShorthandProperty](#maybeshorthandproperty)&lt;[BorderStyle](#borderstyle)&gt;\></code>

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

The border style.

----

### cornerRadius?
<code data-code-gray>[MaybeResponsiveConditionalStyle](#mayberesponsiveconditionalstyle)\<[MaybeShorthandProperty](#maybeshorthandproperty)&lt;[CornerRadius](#cornerradius-1)&gt;\></code>

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

The corner radius size.

----

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

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

Configures the inner padding.

----

### borderWidth?
<code data-code-gray>[MaybeResponsiveConditionalStyle](#mayberesponsiveconditionalstyle)\<[MaybeShorthandProperty](#maybeshorthandproperty)&lt;[BorderWidth](#borderwidth-1)&gt;\></code>

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

Specifies the border width. Requires the <code data-code-gray>border</code> to be enabled first. Supports a custom numeric value, such as <code data-code-gray>20</code>.

----

### backgroundColor
<code data-code-gray>string</code>

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

The background color. Supports custom color values, for example:
- Color Names: <code data-code-gray>red</code>
- Hex: <code data-code-gray>#FF0000</code>
- RGB: <code data-code-gray>rgb(255, 0, 0)</code>
- RGBA: <code data-code-gray>rgba(255, 0, 0, 0.5)</code>
- HSL: <code data-code-gray>hsl(0, 100%, 50%)</code>
- HSLA: <code data-code-gray>hsla(0, 100%, 50%, 0.5)</code>

> **CAUTION**
>
> Invalid inputs will not be applied.

----

### borderColor
<code data-code-gray>string</code>

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

The border color. Requires the <code data-code-gray>border</code> to be enabled first. Supports custom color values, for example:
- Color Names: <code data-code-gray>red</code>
- Hex: <code data-code-gray>#FF0000</code>
- RGB: <code data-code-gray>rgb(255, 0, 0)</code>
- RGBA: <code data-code-gray>rgba(255, 0, 0, 0.5)</code>
- HSL: <code data-code-gray>hsl(0, 100%, 50%)</code>
- HSLA: <code data-code-gray>hsla(0, 100%, 50%, 0.5)</code>

> **CAUTION**
>
> Invalid inputs will not be applied.

----

## Type descriptions
### Display
<code data-code-gray>block</code> <code data-code-gray>inline</code>
<Margin p="8px" m="8px" />
<Margin p="8px" m="8px" />
+ <code data-code-gray>block</code>: Aligns the component vertically.
+ <code data-code-gray>inline</code>: Aligns the component horizontally.
----

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

### Opacity
<code data-code-gray>10</code>
<code data-code-gray>20</code>
<code data-code-gray>30</code>
<code data-code-gray>40</code>
<code data-code-gray>50</code>
<code data-code-gray>60</code>
<code data-code-gray>70</code>
<code data-code-gray>80</code>
<code data-code-gray>90</code>
<Margin p="8px" m="8px" />
----

### Overflow
<code data-code-gray>hidden</code> <code data-code-gray>visible</code>
<Margin p="8px" m="8px" />
<Margin p="8px" m="8px" />
+ <code data-code-gray>hidden</code>: Hides content that overflows the component bounds.
+ <code data-code-gray>visible</code>: Allows content to overflow and remain visible.
----

### BorderStyle
<code data-code-gray>base</code> <code data-code-gray>dotted</code> <code data-code-gray>none</code>
<Margin p="8px" m="8px" />
<Margin p="8px" m="8px" />
+ <code data-code-gray>base</code>: Solid border.
+ <code data-code-gray>dotted</code>: Dashed border.
+ <code data-code-gray>none</code>: No border.

----

### CornerRadius
<code data-code-gray>base</code> <code data-code-gray>small</code> <code data-code-gray>large</code> <code data-code-gray>fullyRounded</code> <code data-code-gray>none</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" />
----
### BorderWidth
<code data-code-gray>base</code> <code data-code-gray>medium</code> <code data-code-gray>number</code>
<Margin p="8px" m="8px" />
----
### 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" />
----