xl vision
  • Component
  • React Hooks
  • Playground
  • Overview
  • Color
  • Getting Start
    • Installation
  • General
    • Icon
    • Button
  • Layout
    • Grid
  • Form
    • Input
    • InputNumber
    • Textarea
  • Navigation
    • Dropdown
    • Affix
    • BackTop
    • Anchor
  • Data Display
    • Tooltip
    • Popover
    • Avatar
  • Faceback
    • Popconfirm
    • Dialog
    • Message
    • Notication
  • Animation
    • Transition
    • TransitionGroup
    • CollapseTransition
    • Ripple
  • Styles
    • Theme
    • CssBaseline
  • Basic Component
    • BaseButton
    • Portal
    • Popper
    • Modal
    • ResizeObserver

Grid

Refer to the grid system of bootstrap.

Examples

col1
col2
col3
col4
col1
col2
col3
col4
col1
col2
col3
col4
col1
col3
col4
Basic

Use span, gutter to achieve basic layout (span set to 0 can realize the hiding of the content block).

col1
col2
col3
col1
col2
col3
col4
col1
col2
col3
Offset

Use offset, push, pull to achieve content offset.

col1
col2
col3
col4
Responsive

span can be passed in the form of objects to realize the layout of different sizes, the default parameters that can be set are: xs, sm, md, lg, xl, xxl. Please try to change the browser window size.

col1
col2
col3
col1
col2
col3
col1
col2
col3
Responsive Offset

offset, push, pull also support responsiveness. The default parameters that can be set are: xs,sm,md,lg,xl,xxl.

col1
col2
col3
col4
col1
col2
col3
col4
col1
col2
col3
col4
col1
col2
col3
col1
col2
col3
col1
col2
col3
flex layout

In modern browsers, you can use align and justify to achieve horizontal and vertical alignment in different ways, and you can also use order to change the order of content blocks ( order also supports responsive).

col1
col2
col3
Allow wrap

Allow wrap when content is overflow.

Current break points:
useBreakpoint Hook

Use useBreakpoint Hook provide personalized layout.

Properties

Row

PropertyDescriptionTypeDefaultRequire
gutterContent block gap (support responsive)number | { xs?: number, sm?: number, md?: number, lg?: number, xl?: number, xxl?: number }0false
wrapAllow line wrapboolean-false
removeOnUnvisibleDo not render child Col when column is 0booleanfalsefalse
justifyGrid left and right alignment (valid under type=flex)start | end | center | space-around | space-between-false
alignGrid up and down alignment (valid under type=flex)top | middle | bottom-false
childrenCol ArrayCol | Array<Col>-true
componentcustom row tagReact.ComponentType-div

Col

PropertyDescriptionTypeDefaultRequire
columnThe number of columns occupied by the grid (support responsive) (0 means hidden)number | { xs?: number, sm?: number, md?: number, lg?: number, xl?: number, xxl?: number }-true
offsetThe number of interval columns on the left side of the grid (support responsive){ xxs?: number, xs?: number, md?: number, xl?: number, xxl?: number }-false
pushThe number of columns to move the grid to the right (support responsive){ xxs?: number, xs?: number, md?: number, xl?: number, xxl?: number }-false
pullThe number of columns to move the grid to the left (support responsive){ xxs?: number, xs?: number, md?: number, xl?: number, xxl?: number }-false
orderGrid order, valid in flex layout mode (support responsive){ xxs?: number, xs?: number, md?: number, xl?: number, xxl?: number }-false
childrenChild nodeReact.ReactNode-false
Examples
Basic
Offset
Responsive
Responsive Offset
layout
Allow wrap
useBreakpoint Hook
Properties
Row
Col
Copyright © 2020-2021 Rhys Xia