react-stonecutter
Animated grid layout component for React, inspired by Masonry.
Choose between CSS Transitions or React-Motion for animation.
Live Demo
http://dantrain.github.io/react-stonecutter/
Installation
With npm:
npm install --save react-stonecutter
Usage
A simple layout with items of equal height:
A Pinterest-style layout with varying item heights, this time using CSS transitions:
To render React components as children, wrap them in simple elements. This gives you full control of your markup:
If you don't know the heights of your items ahead of time, use the measureItems
higher-order component to measure them in the browser before layout:
If your grid spans the page and you want to vary the number of columns based on the viewport width, use the makeResponsive
higher-order component which makes use of enquire.js: