1.3.1 • Published 6 years ago

uxcore-grid v1.3.1

Weekly downloads
18
License
MIT
Repository
github
Last release
6 years ago

uxcore-grid Dependency Status devDependency Status

npm.io

TL;DR

uxcore-grid ui component for react

setup develop environment

$ git clone https://github.com/uxcore/uxcore-grid
$ cd uxcore-grid
$ npm install
$ gulp server

Usage

let Grid = require('uxcore-grid');
let {Row, Col} = Grid;
<Grid>
    <Row className="show-grid">
        <Col xs={12} md={8}><code>&lt;{'Col xs={12} md={8}'} /&gt;</code></Col>
        <Col xs={6} md={4}><code>&lt;{'Col xs={6} md={4}'} /&gt;</code></Col>
    </Row>

    <Row className="show-grid">
        <Col xs={6} md={4}><code>&lt;{'Col xs={6} md={4}'} /&gt;</code></Col>
        <Col xs={6} md={4}><code>&lt;{'Col xs={6} md={4}'} /&gt;</code></Col>
        <Col xs={6} md={4}><code>&lt;{'Col xs={6} md={4}'} /&gt;</code></Col>
    </Row>

    <Row className="show-grid">
         <Col xs={6} xsOffset={6}><code>&lt;{'Col xs={6} xsOffset={6}'} /&gt;</code></Col>
    </Row>

    <Row className="show-grid">
        <Col md={6} mdPush={6}><code>&lt;{'Col md={6} mdPush={6}'} /&gt;</code></Col>
        <Col md={6} mdPull={6}><code>&lt;{'Col md={6} mdPull={6}'} /&gt;</code></Col>
    </Row>
</Grid>

demo

http://uxcore.github.io/

API

Props

Grid

配置项类型必填默认值功能/备注
componentClasselementTypeoptional'div'You can use a custom element for this component
fluidbooleanoptionalfalseTurn any fixed-width grid layout into a full-width layout by this property. Adds container-fluid class.

Row

通过 Grid.Row 取得。

配置项类型必填默认值功能/备注
componentClasselementTypeoptional'div'You can use a custom element for this component

Col

通过 Grid.Col 取得。

配置项类型功能/备注
lgnumberThe number of columns you wish to span for Large devices Desktops (≥1200px) class-prefix col-lg-
lgOffsetnumberMove columns to the right for Large devices Desktops class-prefix col-lg-offset-
lgPullnumberChange the order of grid columns to the left for Large devices Desktops class-prefix col-lg-pull-
lgPushnumberChange the order of grid columns to the right for Large devices Desktops class-prefix col-lg-push-
mdnumberThe number of columns you wish to span for Medium devices Desktops (≥992px) class-prefix col-md-
mdOffsetnumberMove columns to the right for Medium devices Desktops class-prefix col-md-offset-
mdPullnumberChange the order of grid columns to the left for Medium devices Desktops class-prefix col-md-pull-
mdPushnumberChange the order of grid columns to the right for Medium devices Desktops class-prefix col-md-push-
smnumberThe number of columns you wish to span for Small devices Tablets (≥768px) class-prefix col-sm-
smOffsetnumberMove columns to the right for Small devices Tablets class-prefix col-sm-offset-
smPullnumberChange the order of grid columns to the left for Small devices Tablets class-prefix col-sm-pull-
smPushnumberChange the order of grid columns to the right for Small devices Tablets class-prefix col-sm-push-
xsnumberThe number of columns you wish to span for Extra small devices Phones (<768px) class-prefix col-xs-
xsOffsetnumberMove columns to the right for Extra small devices Phones class-prefix col-xs-offset-
xsPullnumberChange the order of grid columns to the left for Extra small devices Phones class-prefix col-xs-pull-
xsPushnumberChange the order of grid columns to the right for Extra small devices Phones class-prefix col-xs-push-
1.3.1

6 years ago

1.3.0

7 years ago

1.2.2

8 years ago

1.2.1

9 years ago

1.2.0

9 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.7

9 years ago

1.0.6

9 years ago

1.0.5

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago