paulcollett / react-masonry-css

React Masonry layout component powered by CSS, dependancy free
https://paulcollett.github.io/react-masonry-css/demo/
MIT License
962 stars 66 forks source link

Add "originLeft" option #26

Closed adamsoffer closed 4 years ago

adamsoffer commented 5 years ago

Masonry has an option for controlling the horizontal flow of the layout. By default, item elements start positioning at the left, with originLeft: true. If you want them to start positioning at the right you simply set it to false. How does one achieve the same thing with this library?

Loving this library. Thank you!

paulcollett commented 5 years ago

Hi @adamsoffer, currently not supported though could be a trivial addition. Just so I understand it better, could you give me a bit of background on your and other common use cases for this feature?

adamsoffer commented 5 years ago

Sure! Here's the page where I'm using the library: https://thinkfwd.co/about

On the bottom of the page, notice how the three team members are stacked? The third one "floats" right. I was able to achieve that in a sort of hacky fashion - I created a hidden third element so that that the library forces the forth one to the right. Ideally, the library would provide an option for me to set the items origin to the right.

Hope that makes sense.