react-magic-grid

1.2.1 • Public • Published

React Magic Grid

A react adapter for Magic Grid. Uses react hooks, so requires react at least in version 16.8.0.

There is another react adapter available that uses react's Component Class so it also supports older versions of react.

See example use cases.

Usage

npm i -S magic-grid react-magic-grid

import MagicGrid from "react-magic-grid"

const Cards = ({ cards }) => (
  <MagicGrid items={cards.length}>
    {cards.map(item => (
      <Card key={item} item={item} />
    ))}
  </MagicGrid>
)

Props

Supports all options in Magic-Grid's config.

Package Sidebar

Install

npm i react-magic-grid

Weekly Downloads

29

Version

1.2.1

License

MIT

Unpacked Size

141 kB

Total Files

5

Last publish

Collaborators

  • amytych