You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+25-1
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ npm install react-plock
23
23
24
24
### Usage
25
25
26
-
Using Plock with the new v3 APIs it's a piece of cake. Here's an example of how can you create an [Unsplash-Like](https://unsplash.com/)masonry grid. You can even see a demo of this example by clicking [here](https://react-plock.netlify.app/).
26
+
Using Plock with the new v3 APIs it's a piece of cake. Here's an example of how can you create a masonry grid. You can even see a demo of this example by clicking [here](https://react-plock-with-vite.vercel.app/).
27
27
28
28
```tsx
29
29
import { Masonry } from'react-plock';
@@ -47,6 +47,29 @@ const ImagesMasonry = () => {
47
47
};
48
48
```
49
49
50
+
### Balanced Layout
51
+
52
+
React Plock offers a balanced layout option that creates a more visually harmonious masonry grid by considering the height of each item. When enabled with `useBalancedLayout: true`, the layout algorithm distributes items across columns while attempting to minimize height differences between columns.
53
+
54
+
This is particularly useful for content with varying heights, such as images or cards, where a traditional masonry layout might create uneven columns.
55
+
56
+
Unlike the default layout which distributes items sequentially, the balanced layout dynamically measures and adjusts item placement to create a more aesthetically pleasing result.
0 commit comments