Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save tanner-west/86b6ee3e3cd51a9f7bd5731ee589d83c to your computer and use it in GitHub Desktop.
Save tanner-west/86b6ee3e3cd51a9f7bd5731ee589d83c to your computer and use it in GitHub Desktop.

justifyContent in React Native Flexbox: A visual cheat sheet

justifyContent value Preview
flex-start

The default value for justifyContent is flex-start. This justifies content to the start of its container's main axis: the top edge for column layouts and the left edge for row layouts.
"React Native Flexbox justifyContent: 'flex-start'" "React Native Flexbox justifyContent: 'flex-start'"
flex-end

flex-end justifies content to the end of its flex container's main axis: the bottom edge for column layouts and the right edge for row layouts.
"React Native Flexbox justifyContent: 'flex-end'" "React Native Flexbox justifyContent: 'flex-end'"
center

center justifies content to the center of its container's main axis
"React Native Flexbox justifyContent: 'center'" "React Native Flexbox justifyContent: 'center'"
space-between

space-between spaces contents evenly, with remaining space distributed between each item
"React Native Flexbox justifyContent: 'space-between'" "React Native Flexbox justifyContent: 'space-around'"
space-around

space-around spaces contents evenly, with remaining space distributed between children, before the first item, and after the last item. Only half as much space will be distributed before the first and after the last item as is distributed between each item.
"React Native Flexbox justifyContent: 'space-around'" "React Native Flexbox justifyContent: 'space-around'"
space-evenly

space-evenly distributes contents evenly with exactly the same amount of space between each item, before the first item, and after the last time
"React Native Flexbox justifyContent: 'space-evenly'" "React Native Flexbox justifyContent: 'space-around'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment