The flex-direction is used for changing the direction of the flex item layout. There are four main keywords that can be used to set the direction.


This is the default value. If you don't set the flex-direction property, the flex items are laid out horizontally starting from the left.

flex-direction: row


When you set this property value, flex items are laid out from right to left.