0.5.0 • Published 9 years ago

react-image-list v0.5.0

Weekly downloads
8
License
MIT
Repository
github
Last release
9 years ago

react-image-list

simple way to show image list in react

Demo

demo

Props

Propertytypedefaultrequireddescription
imageDataobjectn/ayesthe data of your image ; format: {url: , name: "name"}
gridClassstringcol col-4 px2 py2noset the grid class name
imgClassstringimageList__imgnoset the image class name

Example

data:

var data = [
  {
    url: "http://fakeimg.pl/200/?text=img1",
    name: "img1"
  },
  {
    url: "http://fakeimg.pl/200/?text=img2",
    name: "img2"
  },
  {
    url: "http://fakeimg.pl/200/?text=img3",
    name: "img3"
  },
  {
    url: "http://fakeimg.pl/200/?text=img4",
    name: "img4"
  },
  {
    url: "http://fakeimg.pl/200/?text=img5",
    name: "img5"
  }
]

js:

var ImageList = require('react-image-list');

var App = React.createClass({
  render: function() {
    return (
      <div>
        <ImageList imageData={data}
                    wrapperClass="wrapper"
                    gridClass="col-md-3"
                    imgClass="responsive"/>
      </div>
    )
  }
})

If you want to use the same style as the demo page, clone this css.

Development

npm install
npm start
npm run build:lib

todo

more flexible

License

MIT @ctxhou

0.5.0

9 years ago

0.4.0

10 years ago

0.3.0

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago