react-spring-animated-grid
TypeScript icon, indicating that this package has built-in type declarations

0.2.3 • Public • Published

react-spring-animated-grid

Animated grid responsive to width changes.

Features

  • Width aware animated reordering elements

Install

npm i react-spring-animated-grid

Preview

example

Usage

import { GridComponent } from 'react-spring-animated-grid'
...
<GridComponent itemMarginRight={10} style={{ width: "300px" }}>
  {elements.map((e, i) => (
    <div
      className="item"
      key={e.text}
      onClick={() => toggleClicked(e.text)}
    >
      {!isClicked(e.text) && e.text}
    </div>
  ))}
</GridComponent>

Demo

https://codesandbox.io/s/animated-grid-demo-ycu8x?file=/src/App.js:793-814

Package Sidebar

Install

npm i react-spring-animated-grid

Weekly Downloads

2

Version

0.2.3

License

MIT

Unpacked Size

64.5 kB

Total Files

17

Last publish

Collaborators

  • mikemajara