askides / react-plock

The 1kB Masonry Grid for React.

Home Page:https://react-plock-with-nextjs.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Breakpoints with Gap setting

tomthor opened this issue · comments

I wonder if it would be possible to add the ability to use different gap values using the same "breakpoint" method as the columns?

Hi, what's your proposal?

Are you talking about something like this?

const breakpoints = [
  { size: 640, columns: 1, gap: "10px" },
  { size: 768, columns: 2, gap: "20px" },
  { size: 1024, columns: 3, gap: "30px" },
  { size: 1280, columns: 6, gap: "40px" },
];

yes that's the kind of thing I had in mind

Hello @tomthor, please check out the new v3.0.0 version just published. In addition to a number of performance and bundle size improvements, the problem you reported has been fixed, now you can pass responsive gaps!