Properties
All properties are optional and strings.
Property | Description |
---|---|
alignContent | Aligns a flex container's lines within the flex container when there is extra space on the cross-axis. |
alignItems | Aligns items along the cross-axis of a flex container. |
alignSelf | Aligns a flex item along the cross-axis of the flex container. |
aspectRatio | Specifies the aspect ratio of an element's box. |
backfaceVisibility | Determines whether or not the back face of an element is visible when facing the user. |
backgroundColor | Sets the background color of an element. |
borderBottomColor | Sets the color of the bottom border of an element. |
borderBottomLeftRadius | Sets the radius of the bottom-left corner of an element's border. |
borderBottomRightRadius | Sets the radius of the bottom-right corner of an element's border. |
borderBottomWidth | Sets the width of the bottom border of an element. |
borderColor | Sets the color of all four borders of an element. |
borderLeftColor | Sets the color of the left border of an element. |
borderLeftWidth | Sets the width of the left border of an element. |
borderRadius | Sets the radius of all four corners of an element's border. |
borderRightColor | Sets the color of the right border of an element. |
borderRightWidth | Sets the width of the right border of an element. |
borderStyle | Sets the style of all four borders of an element. |
borderTopColor | Sets the color of the top border of an element. |
borderTopLeftRadius | Sets the radius of the top-left corner of an element's border. |
borderTopRightRadius | Sets the radius of the top-right corner of an element's border. |
borderTopWidth | Sets the width of the top border of an element. |
borderWidth | Sets the width of all four borders of an element. |
bottom | Sets the distance between the bottom edge of an element and the bottom edge of its containing element. |
color | Sets the color of an element's text. |
decomposedMatrix | Specifies a 2D or 3D transformation matrix for an element. |
direction | Specifies the direction of an element's text. |
display | Specifies how an element should be displayed. |
elevation | Specifies the elevation of an element. |
flex | Specifies the length of an element's flex item. |
flexBasis | Specifies the initial length of a flex item. |
flexDirection | Specifies the direction of the main axis of a flex container. |
flexGrow | Specifies how much an element should grow relative to the rest of the flex items in the container. |
flexShrink | Specifies how much an element should shrink relative to the rest of the flex items in the container. |
flexWrap | Specifies whether flex items should wrap or not when there is not enough room on one line. |
fontFamily | Specifies the font family of an element's text. |
fontSize | Specifies the font size of an element's text. |
fontStyle | Specifies the font style of an element's text. |
fontVariant | Specifies the font variant of an element's text. |
fontWeight | Specifies the font weight of an element's text. |
height | Sets the height of an element. |
includeFontPadding | Specifies whether an element's font padding should be included in its height. |
justifyContent | Aligns items along the main axis of a flex container. |
left | Sets the distance between the left edge of an element and the left edge of its containing element. |
letterSpacing | Sets the spacing between characters in an element's text. |
lineHeight | Sets the height of a line of text in an element. |
margin | Sets the margin of an element on all four sides. |
marginBottom | Sets the margin of an element on its bottom side. |
marginHorizontal | Sets the margin of an element on its left and right sides. |
marginLeft | Sets the margin of an element on its left side. |
marginRight | Sets the margin of an element on its right side. |
marginTop | Sets the margin of an element on its top side. |
marginVertical | Sets the margin of an element on its top and bottom sides. |
maxHeight | Sets the maximum height of an element. |
maxWidth | Sets the maximum width of an element. |
minHeight | Sets the minimum height of an element. |
minWidth | Sets the minimum width of an element. |
opacity | Sets the opacity of an element. |
overflow | Specifies what should happen when an element's content overflows its container. |
overlayColor | Specifies the color of an element's overlay. |
padding | Sets the padding of an element on all four sides. |
paddingBottom | Sets the padding of an element on its bottom side. |
paddingHorizontal | Sets the padding of an element on its left and right sides. |
paddingLeft | Sets the padding of an element on its left side. |
paddingRight | Sets the padding of an element on its right side. |
paddingTop | Sets the padding of an element on its top side. |
paddingVertical | Sets the padding of an element on its top and bottom sides. |
position | Specifies the position of an element. |
resizeMode | Specifies how an element's content should be resized to fit its container. |
right | Sets the distance between the right edge of an element and the right edge of its containing element. |
rotation | Specifies the rotation of an element. |
scaleX | Specifies the horizontal scaling of an element. |
scaleY | Specifies the vertical scaling of an element. |
shadowColor | Specifies the color of an element's shadow. |
shadowOffset | Specifies the offset of an element's shadow. |
shadowOpacity | Specifies the opacity of an element's shadow. |
shadowRadius | Specifies the radius of an element's shadow. |
textAlign | Specifies the horizontal alignment of an element's text. |
textAlignVertical | Specifies the vertical alignment of an element's text. |
textDecorationColor | Specifies the color of an element's text decoration. |
textDecorationLine | Specifies the type of text decoration to apply to an element's text. |
textDecorationStyle | Specifies the style of an element's text decoration. |
textShadowColor | Specifies the color of an element's text shadow. |
textShadowOffset | Specifies the offset of an element's text shadow. |
textShadowRadius | Specifies the radius of an element's text shadow. |
tintColor | Specifies the tint color of an element. |
top | Sets the distance between the top edge of an element and the top edge of its containing element. |
transform | Specifies a 2D or 3D transformation to apply to an element. |
transformMatrix | Specifies a 2D or 3D transformation matrix to apply to an element. |
translateX | Specifies the horizontal translation of an element. |
translateY | Specifies the vertical translation of an element. |
width | Sets the width of an element. |
writingDirection | Specifies the writing direction of an element's text. |
zIndex | Sets the z-index of an element. |