0% found this document useful (0 votes)
54 views

Styles React Native

React Native uses JavaScript objects and arrays to style core components through a "style" prop, with camel-cased style names that generally match CSS. Styles are applied without inheritance, so the last style in an array takes precedence. Common style properties include border, margin, padding, and text styles.

Uploaded by

Syed Aqib Raza
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views

Styles React Native

React Native uses JavaScript objects and arrays to style core components through a "style" prop, with camel-cased style names that generally match CSS. Styles are applied without inheritance, so the last style in an array takes precedence. Common style properties include border, margin, padding, and text styles.

Uploaded by

Syed Aqib Raza
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Styles

React Native
Style
• React Native style application using JavaScript
• core components accept a prop named style
• style names and values usually match how CSS works on the web,
except names are written using camel casing,
• e.g. backgroundColor rather than background-color
• style prop can be a plain old JavaScript object OR an Array
• the last style in the array has precedence
Style Properties
• Border
• Margin
• Padding
• Text
Style Encapsulation
• React Native does not support Style Inheritence.
References
[1] Cheat Sheet: https://
github.com/vhpoet/react-native-styling-cheat-sheet

You might also like