ant-design-vue/components/grid/index.en-US.md
tangjinzhou 2ee3d43534
Feat css var (#5327)
* style: affix & util

* feat(alert): add customIcon slot

* feat(anchor): ts type

* style: auto-complete

* feat: avatar add crossOrigin & maxPopoverTrigger

* style(backTop): v-show instead v-if

* style: badge

* style: breadcrumb

* feat: button add global size

* feat: update i18n

* feat: picker add disabledTime

* test: update snap

* doc: update img url

* style: fix Card tabs of left position

* doc: update cascader doc

* feat: collapse

* style: comment

* style: configprovider

* feat: date-picker add soem icon slot

* style: update descriptions style

* feat: add divider orientationMargin

* doc: update drawer

* feat: dropdown add destroyPopupOnHide & loading

* style: update empty

* feat: form add labelWrap

* style: update grid

* test: update grid snap

* fix: image ts error

* fix: mentions cannot select, close #5233

* doc: update pagination change info, close #5293

* fix: table dynamic expand error, close #5295

* style: remove not use

* release 3.0.0-beta.11

* doc: update typo

* feat: input add showCount

* feat: inputNumber add prefix slot

* style: update layout

* style: update list

* feat: add locale i18

* style: update locale ts

* style: update mentions

* feat: menu divider add dashed

* perf: menu

* perf: menu animate

* feat: modal method add wrapClassName

* style: update pageheader

* feat: update pagination ts

* feat: confirm add showCancel & promise

* doc: update popover

* style: update progress

* style: radio

* style: update rate、result、row

* feat: select add fieldNames

* feat: add skeleton button & input

* feat: spin tip support slot

* style: slider & space

* stype: update steps ts type

* style: update switch

* feat: table add tree filter

* test: update input sanp

* feat: table add filterMode...

* fix: tree autoExpandParent bug

* test: update input snap

* doc: tabs add destroyInactiveTabPane

* style: update tag

* style: update timeline & time-picker

* fix: Tooltip arrowPointAtCenter 1px shift bug

* feat: typography add enterEnterIcon triggerType

* doc: update tree-select

* fix: deps and TypeScript types

* style: udpate transfer

* style: update style

* doc: add colorScheme

* chore: add css var builg

* doc: sort api

* style: lint code

* doc: add css var

* test: update snap

* chore: add pre script

* chore: update lint

* perf: collapse animate

* perf: collapse tree

* perf: typography shaking when edit

* doc: update auto-complete demo

* fix: table tree not have animate

* feat: deprecated dropdown center placement

* feat: deprecated dropdown center placement

* test: update snap
2022-03-12 09:56:32 +08:00

3.8 KiB

category type cols title cover
Components Layout 1 Grid https://gw.alipayobjects.com/zos/alicdn/5rWLU27so/Grid.svg

24 Grids System.

Design concept

In most business situations, Ant Design Vue needs to solve a lot of information storage problems within the design area, so based on 12 Grids System, we divided the design area into 24 sections.

We name the divided area 'box'. We suggest four boxes for horizontal arrangement at most, one at least. Boxes are proportional to the entire screen as shown in the picture above. To ensure a high level of visual comfort, we customize the typography inside of the box based on the box unit.

Outline

In the grid system, we define the frame outside the information area based on `row` and `column`, to ensure that every area can have stable arrangement.

Following is a brief look at how it works:

  • Establish a set of `column` in the horizontal space defined by `row` (abbreviated col)
  • Your content elements should be placed directly in the `col`, and only `col` should be placed directly in `row`
  • The column grid system is a value of 1-24 to represent its range spans. For example, three columns of equal width can be created by ``.
  • If the sum of `col` spans in a `row` are more than 24, then the overflowing `col` as a whole will start a new line arrangement.

Flex layout

Our grid systems support Flex layout to allow the elements within the parent to be aligned horizontally - left, center, right, wide arrangement, and decentralized arrangement. The Grid system also supports vertical alignment - top aligned, vertically centered, bottom-aligned. You can also define the order of elements by using `order`. Flex layout uses a 24 grid layout to define the width of each "box", but does not rigidly adhere to the grid layout.

API

Row

Property Description Type Default
align the vertical alignment of the flex layout: top middle bottom string top
gutter spacing between grids, could be a number or a object like { xs: 8, sm: 16, md: 24}. or you can use array to make horizontal and vertical spacing work at the same time [horizontal, vertical] (supported after 1.5.0) number/object/array 0
justify horizontal arrangement of the flex layout: start end center space-around space-between string start
wrap Auto wrap line boolean false

Col

Property Description Type Default
flex the layout fill of flex string|number -
offset the number of cells to offset Col from the left number 0
order raster order, used in flex layout mode number 0
pull the number of cells that raster is moved to the left number 0
push the number of cells that raster is moved to the right number 0
span raster number of cells to occupy, 0 corresponds to display: none number none
xxxl ≥2000px, could be a span value or an object containing above props number|object -
xs <576px and also default setting, could be a span value or an object containing above props number|object -
sm ≥576px, could be a span value or an object containing above props number|object -
md ≥768px, could be a span value or an object containing above props number|object -
lg ≥992px, could be a span value or an object containing above props number|object -
xl ≥1200px, could be a span value or an object containing above props number|object -
xxl ≥1600px, could be a span value or an object containing above props number|object -

The breakpoints of responsive grid follow BootStrap 4 media queries rules(not including occasionally part).