39

React Recoil

 6 years ago
source link: http://reactrecoil.io
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Recoil 0.6.0

github

Description

The Align component arranges children either horizontally or vertically.

Examples

Default

By default, children are aligned horizontally.

By passing an array of numbers to the columns prop, we can easily adjust the width ratio.

align1.png

Vertical

To align elements vertically, pass the vertical prop.

align2.png

Props

className

Value: string

Add a list of class names.

columns

Value: Array<numbers>

Set an array of numbers to define each column width. e.g. 3 columns with the left most expanded would be [1,1,2]

Value: boolean

Give the Align component a height and width of 100%.

margin

Value: number, px, %

Defines the spacing between columns in px or % etc.

vertical

Value: boolean

Defines if the children are aligned vertically.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK