ant-design/docs/spec/alignment.en-US.md

39 lines
2.3 KiB
Markdown
Raw Normal View History

2016-07-31 10:17:07 +08:00
---
category: Principles
2016-07-31 10:17:07 +08:00
order: 2
title: Alignment
---
As is described in the Law of Continuity of Gestalt psychology, in the perceptual process, people usually tend to understand the object in the way that it is firstly perceived, to let the straight lines be straight and let the curve lines be curve. In the design of interface, aligning the elements meets users perception, also delivers the information to users in a more smooth way.
2016-09-21 11:28:38 +08:00
> ** Gestalt psychology or gestaltismGermanGestalttheorie** Gestalttheorie is an important genre of psychology. It rose in the beginning of the 20 century in Germany.The central principle of gestalt psychology is that the mind forms a global whole with self-organizing tendencies.『The whole is other than the sum of the parts.』--Quote from Wikipedia
2016-07-31 10:17:07 +08:00
---
## Text Alignment
2016-09-21 11:28:38 +08:00
<img class="preview-img good" align="right" alt="good example" description="Align the title and text to the left; use one visual starting point." src="https://os.alipayobjects.com/rmsportal/xvmiAZAIxrEcqdP.png">
<img class="preview-img bad" align="right" asslt="bad example" description="The tile and the text start in different visual point. This is not recommended except the differences between title and text are emphasized. " src="https://os.alipayobjects.com/rmsportal/qvycImsTiDGVgLJ.png">
2016-07-31 10:17:07 +08:00
2016-09-21 11:28:38 +08:00
If the paragraphs or the length of the words are too short or too loose, then a unified visual starting point is needed.
2016-07-31 10:17:07 +08:00
---
2016-09-21 11:28:38 +08:00
## Form Alignment
2016-11-21 12:31:23 +08:00
<img class="preview-img" align="right" alt="example of colon alignment" src="https://os.alipayobjects.com/rmsportal/DmEbaUsrpJkRyUh.png">
2016-07-31 10:17:07 +08:00
2016-09-21 11:28:38 +08:00
Colon alignment(right-align) can encircle the content into a certain range. Users can infer where the chart is through the regular arranged colon so that the speed of filling in the chart can be speeded up.
2016-07-31 10:17:07 +08:00
More ways of aligningplease visit [(/docs/pattern/form#对齐方式)](/docs/pattern/form#对齐方式)。
---
## Numbers Alignment
<img class="preview-img good" align="right" alt="good example" src="https://os.alipayobjects.com/rmsportal/hCSQTEmahFyQcWk.png">
2016-09-21 11:28:38 +08:00
<img class="preview-img bad" align="right" alt="bad example" src="https://os.alipayobjects.com/rmsportal/FDjScmPlWFPxkxL.png">
2016-07-31 10:17:07 +08:00
To compare the numbers faster, we suggest that all numbers should keep the same digit numbers after decimal point; meanwhile all numbers should be right-aligned. 。