ant-design/docs/spec/proximity.en-US.md
二货机器人 f965d92aa8
docs: Update 4.0 site (#20486)
* adjust docs & logo

* adjust typo

* doc update

* update style & trans

* fix style

* update doc

* update translate
2019-12-28 11:57:41 +08:00

2.0 KiB

category type order title
Design Patterns Principles 1 Proximity

When several items are in close proximity to each other, they become one visual unit rather than several separate units. Otherwise, their distance should be larger and look more like several visual units. The basic purpose of proximity is to organize. To give an apparent view of the page structure and the hierarchy of information to users.


The relation of vertical spacing

Example of the different vertical distance

Divide the hierarchy of information through three formats:「small spacing」, 「middle spacing」and「large spacing」


Example of added element

In the case that the three formats are applicable, the hierarchy of information can be separated clearly through adding or cutting down the multiple of 「basic spacing」, or adding elements.

Note: in Ant Design, y = 8 + 8 * n, among which, n >= 0, y stands for the vertical spacing and 8 represents 「basic spacing」.


Relationship of horizontal spacing

Example of combination and configuration

To adapt to screens of different sizes, in the horizontal direction, use grid layout to arrange the components to ensure the flexibility of the layout.


Example of checkbox

In the inner of a component, the horizontal spacing of elements should differ too.