StyleSheet and Flexbox

React Native styles are declared as JavaScript objects, grouped by StyleSheet.create, with CSS-like properties in camelCase (backgroundColor). Layout is based on Flexbox, with flexDirection: 'column' by default, and without units: values are in density-independent points.

Example

const styles = StyleSheet.create({
  ligne: { flexDirection: 'row', padding: 16 },
});

Related concepts

The whole glossary