zent-layout

1.1.0 • Public • Published

Layout 布局

24栅格布局组件

代码演示

:::demo 基本用法

import { Layout } from 'zent';
 
const { Row, Col } = Layout
 
ReactDOM.render(
    <div className="layout-demo-basic">
        <Row>
            <Col span={24}>Col 24</Col>
        </Row>
 
        <Row>
            <Col span={8}>Col 8</Col>
            <Col span={8}>Col 8</Col>
            <Col span={8}>Col 8</Col>
        </Row>
 
        <Row>
            <Col span={8}>Col 8</Col>
            <Col span={8} offset={8}>Col 8, Offset 8</Col>
        </Row>
 
        <Row>
            <Col span={4}>Col 4</Col>
            <Col span={4} offset={4}>Col 4, Offset 4</Col>
            <Col span={4} offset={4}>Col 4, Offset 4</Col>
        </Row>
    </div>
    , mountNode
);

:::

Row API

属性 说明 类型 默认值
className 额外的样式名 string
prefix UI 前缀 string 'zent'

Col API

属性 说明 类型 默认值
span col所占的栅格数 number
offset col左偏移的栅格数 number
className 额外的样式名 string
prefix UI 前缀 string 'zent'

Readme

Keywords

none

Package Sidebar

Install

npm i zent-layout

Weekly Downloads

0

Version

1.1.0

License

MIT

Last publish

Collaborators

  • delai
  • youzan-lc