Member-only story

Design Like a Pro: React Native Style Properties You Can’t Ignore 🚀

Jayant Kumar🇮🇳
4 min readFeb 21, 2025
Photo by Alexander Andrews on Unsplash

In this article we will learn about the important styles property that you must know in React Native.

1️⃣ The Shape Shifter — flex

📌 What it does?
Defines how a component should grow or shrink to fill available space.

📌 Usage:

  • flex: 1 → Expands to take up all available space.
  • flex: 0.5 → Takes up half the space.

📌 Example:

<View style={{ flex: 1, backgroundColor: 'blue' }} />

2️⃣ Align It Right — alignItems

📌 What it does?
Aligns child elements along the cross-axis.

📌 Values:

  • flex-start → Aligns children to the start.
  • center → Aligns children in the middle.
  • flex-end → Aligns children at the end.
  • stretch → Stretches children to fill.

📌 Example:

<View style={{ alignItems: 'center' }}>
<Text>Hello!</Text>
</View>

3️⃣ Spread Out — justifyContent

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Jayant Kumar🇮🇳
Jayant Kumar🇮🇳

Written by Jayant Kumar🇮🇳

Hello My name is Jayant Kumar, I am a software Engineer , specialist in Mobile Development (Android , IOS , Flutter , React Native) from India 🇮🇳

No responses yet

Write a response