0.3.1 • Published 5 years ago

magic-grid-react v0.3.1

Weekly downloads
175
License
ISC
Repository
-
Last release
5 years ago

magic-grid-react

GitHub forks GitHub stars GitHub issues GitHub license

This is a React.js port of @e-oj's Magic Grid. Please check the /example folder for a example.

If you use images, make sure they have a set height, otherwise the grid will calculate weirdly.

Setup

Install the component

$ npm i magic-grid-react magic-grid
import MagicGrid from 'magic-grid-react'

<MagicGrid>
  {posts.map(post => (
    <Card
      style={{maxWidth: 200}}
      key={post.id}
      title={post.title}
      body={post.body}
    />
  ))}
</MagicGrid>

Props

Supports all optinons in Magic-Grid

Default Props:

PropDefaultComment
gutter32Gap between elements
maxCols5Max number of colums
useMinfalseUse min width of columns
animatefalseAnimate item positioning