Fower provides a powerful Flexbox-based layout toolkit. By adjusting the direction and alignment of the layout, you can build most of the layout and make the layout easier.
Compared with the traditional flex layout, the layout of Fower is more abstract and streamlined. The layout of Fower is abstracted as
toAround ten kinds of atomic alignment, you can forget the concept of main axis and cross axis in traditional flex layout when you use them, you only need to have a sense of direction.
Fower Layout base on Flexbox, Compare to Flexbox, it has several advantages:
- Less Api: You don't have to memorize all the APIs of Flexbox, just to remember 10 Atomic Props:
- Easy to learn: It's more intuitive，lower mental burden. No need to understand main axis and cross axis.
SyntaxError: Unexpected token (1:8) 1 : return () ^
All Alignment Props with row direction:
All Alignment Props with column direction:
All Layout compose with toLeft:
All Layout compose with toRight:
All Layout compose with toTop:
All Layout compose with toBottom:
All Layout compose with toCenterX:
All Layout compose with toCenterY:
All Layout compose with toBetween:
All Layout compose with toEvenly:
All Layout compose with toAround: