Import
Basic Usage
Layout Properties
Direction and Alignment
Responsive Layout
View.Item Component
View.Item provides additional layout control for individual children within a View.Gap Control
Auto Margin
Props
View Props
Node for inserting the content
Render as a different element
Flex direction for the content
Gap between children, base unit token number multiplier
Flex wrap for the content
Flex align-items for the content
Flex justify-content for the content
Render a divider between each child
Height style, literal string value or a base unit token number multiplier
Width style, literal string value or a base unit token number multiplier
Aspect ratio style, represented as width / height
Maximum height style, literal string value or a base unit token number multiplier
Maximum width style, literal string value or a base unit token number multiplier
Minimum height style, literal string value or a base unit token number multiplier
Minimum width style, literal string value or a base unit token number multiplier
Padding style for all sides, base unit token number multiplier
Padding top, base unit token number multiplier
Padding bottom, base unit token number multiplier
Padding inline start, base unit token number multiplier
Padding inline end, base unit token number multiplier
Padding inline, base unit token number multiplier
Padding block, base unit token number multiplier
Apply negative margin and remove side borders, base unit token number multiplier
Text align for the content
backgroundColor
'neutral' | 'neutral-faded' | 'critical' | 'critical-faded' | 'positive' | 'warning' | 'warning-faded' | 'positive-faded' | 'primary' | 'primary-faded' | 'elevation-base' | 'elevation-raised' | 'elevation-overlay' | 'page' | 'page-faded' | 'disabled' | 'disabled-faded' | 'brand' | 'white' | 'black'
Background color, based on the color tokens
borderColor
Responsive<'neutral' | 'neutral-faded' | 'primary' | 'primary-faded' | 'critical' | 'critical-faded' | 'warning' | 'warning-faded' | 'positive' | 'positive-faded' | 'transparent'>
Border color, based on the color tokens
Add border to all sides
Add border to the top side
Add border to the bottom side
Add border to the inline start side
Add border to the inline end side
Add border to the inline direction
Add border to the block direction
Border radius, based on the radius tokens
Position style
Inset style, base unit token number multiplier when used as a number
Inset start, base unit token number multiplier when used as a number
Inset end, base unit token number multiplier when used as a number
Inset top, base unit token number multiplier when used as a number
Inset bottom, base unit token number multiplier when used as a number
z-index style
Shadow style, based on the shadow tokens
Overflow style
Add transition for the properties
Apply flex-grow (can also be used on View when using it as a View.Item)
Apply flex-shrink
Additional classname for the root element
Additional attributes for the root element
View.Item Props
Node for inserting the item content
Render as a different element
Number of columns the item should span in the parent, View uses 12 columns
Flex order of the item inside the parent
Apply flex-grow, using it on View.Item applies additional styles on the parent View
Apply flex-shrink
Individual gap before the item, overrides the parent View gap. Use ‘auto’ for auto margin
Additional classname for the root element
Additional attributes for the root element
View automatically becomes a flexbox container when using layout properties like
direction, align, justify, or gap.The
columns prop uses a 12-column grid system. For example, columns={6} spans half the width.Responsive props accept an object with viewport keys:
{ s: value, m: value, l: value }