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

Left-to-right content flow #35

Closed filipjnc closed 5 years ago

filipjnc commented 5 years ago

It would be great to have an option to set content to flow from left to right instead of top to bottom.

A possible solution would be to reorder the passed array of React elements like described here before rendering.

image

paulcollett commented 5 years ago

You've found the right plugin then! left to right flow is exactly how this plugin works regardless of what props you pass

filipjnc commented 5 years ago

@paulcollett yes and no. The content is indeed flowing from left to right but it's rendered in the dom from top to bottom. Keyboard navigation for people with disabilities is confusing.

Is there a way to also render them in the dom left to right or does the focus need to be hacked to behave in this way?

MichalMoravik commented 4 years ago

@filipjnc Hey! This is exactly now my problem since it only counts a total number of objects and then dividing it. I am working with photos and something one of my photo is bigger than 2 other photos. This is then problem and it arranges them in one row.

@filipjnc Did you find some other solution for this library? Could you send me the link if yes, please? I am in the urgent mode and this can make me much slower. :/ Thanks!