Box
A container for grouping elements. It is similar to a div in HTML. It supports flex layout similar to that in HTML.
Properties
style
Modifies the appearance, positioning, and geometry of the block.
-
width
,maxWidth
,minWidth
The width of the block. Learn more. -
height
,maxHeight
,minHeight
The height of the block. Learn more. -
overflow
The method of displaying child elements when they take up excess space beyond the container. Learn more. -
padding
,paddingHorizontal
,paddingVertical
,paddingTop
,paddingRight
,paddingBottom
,paddingLeft
Internal padding of the container. Learn more. -
margin
,marginHorizontal
,marginVertical
,marginTop
,marginRight
,marginBottom
,marginLeft
External margins of the block. Learn more. -
position
The positioning method of the block: relative or absolute. Learn more. -
top
,right
,bottom
,left
Offset from the original position. Learn more. -
border
Sets borders for the block on all four sides: thickness, style, and color. Learn more. -
borderTop
,borderRight
,borderBottom
,borderLeft
Sets individual borders for the sides of the block: thickness and color. Learn more. -
borderRadius
,borderBottomLeftRadius
,borderBottomRightRadius
,borderTopLeftRadius
,borderTopRightRadius
Rounding the corners of the borders. Learn more. -
borderWidth
,borderTopWidth
,borderRightWidth
,borderBottomWidth
,borderLeftWidth
Thickness of the borders. Learn more. -
borderColor
,borderTopColor
,borderRightColor
,borderBottomColor
,borderLeftColor
Color of the borders. Learn more. -
backgroundColor
Background color of the block. Learn more. -
backgroundGradient
Background gradient of the block. Learn more. -
opacity
Opacity of the entire block along with its content. Learn more. -
elevation
Height of the shadow. Learn more. -
shadowColor
Color of the block's shadow. Learn more. -
flexDirection
Defines the main axis of the container (the direction of blocks within the container). Learn more. -
flexBasis
The initial size of the block along the main axis of the container. Learn more. -
flexGrow
The growth factor of the block along the main axis of the container. Learn more. -
flexShrink
The shrink factor of the block along the main axis of the container. Learn more. -
flex
Specifies the size behavior of the block (growth, shrinkage, and initial size) along the main axis of the container. Learn more. -
justifyContent
Alignment and distribution of space along the main axis of the container. Learn more. -
alignItems
Alignment across the main axis of the container. Learn more. -
alignContent
Distribution of space across the main axis of the container. Learn more. -
alignSelf
Alignment of a specific block across the main axis of the container. Learn more. -
flexWrap
Wrapping blocks onto a new line along the main axis of the container. Learn more. -
transform
Transformation of the geometry of blocks and containers in 2D and 3D space. Learn more.