Member-only story

Fun with Flexbox (with Material-UI and React)

Part 2 of 2 — Editing the flex item’s properties

Ran (Reine)
4 min readJun 21, 2021
Cover image from Unsplash that shows two cardboard boxes
Photo by Mildlee on Unsplash

Okay so this article is a continuation of the previous article — link. Just like how it’s divided in this guide to flexbox, we’ll be looking what what happens when we edit the flex item’s properties.

Part 4: Examples where we Edit the flex item’s Properties

order

This property is probably pretty self-explanatory. When you define a few flex items within a flex container, it’ll render in the same order. But by specifying the specific order for a flex item, you can render the flex items in a different order.

Screenshot of codes that shows how the order property affects each flex item
Screenshot by Author — link

flexGrow

To see the effects of this property kick in, one will have to compare how the flex items look like when the browser window is fully expanded VS when it’s shrunk (so I’ll be showing two screenshots with the same codes).

For flexGrow, the value you pass in dictates how much available space in the flex container it should take up.

--

--

Ran (Reine)
Ran (Reine)

Written by Ran (Reine)

I live for days when I can watch skies of blue, while enjoying the view. Most other days I’m a city rat who scuttles between Art and Coding. SG NTU CS Grad.

No responses yet