Hello and welcome back to this React native tutorial for Beginners.
Today we're going to be talking about
paddings, another important aspect of styling in React native.
Paddings are used to create space within elements in your app design.
And they are different from Martin's
in that they create space inside an element rather than around it.
Paddings are an essential part of creating clean and organized layouts and can also
be used to create visual rest in your designs.
So let's dive in and take a look at all
different aspects of paddings in React native.
So first let's talk about padding property.
This allows you to specify the amount of space that should be created inside
an element and it can be specified in points.
For example, here we could add a padding of ten.
And you're going to see that inside this
we're going to get a bigger red container.
So here we go.
It applies the padding style to all of the sides here.
So here you can also get more specific like margins.
And you could do padding top of 100.
Here we go.
And you could do a padding
left of hundred.
Here we go.
You can also do
padding right of 20.
Actually, that's not really visible.
What about 200?
Okay, here we go.
And then you can do padding bottom of 100.
And I'm just going to reduce this because this was too much.
And here you go.
You have padding bottom of hundred as well.
So this is how it works.
And in addition to these properties,
there are also properties for specifying
paddings in a more simplified way, such as
padding vertical and padding horizontal.
So let's comment these out
and let's say padding horizontal is 100.
That was too much.
Okay, what about 50? Here we go.
We have value of 50 padding horizontal
and can do same for vertical.
Let's say that's 50 as well.
And here we go.
And there you have it.
Those are all the different aspects of paddings in React native.
By using these properties, you can create clean and organized layouts
for your apps and control the space within elements exactly the way you want it.
So get creative and have fun. See you in the next video.