GridWave is a small, dependency-free library for responsive DOM layouts with filtering, sorting, animation, equal-height rows, and experimental masonry.
GridWave is in early development and might not be suitable for production use. Please open an issue if you encounter a problem.
See the complete documentation or try the CodePen demo.
npm install gridwaveimport GridWave from "gridwave";You can also load GridWave from a CDN:
<script src="https://unpkg.com/[email protected]"></script><button type="button" data-filter="">All</button>
<button type="button" data-filter=".featured">Featured</button>
<div id="grid">
<article class="card featured">First item</article>
<article class="card">Second item</article>
<article class="card featured">Third item</article>
</div>
<script>
const grid = new GridWave("#grid", {
columns: 3,
gap: 16,
breakpoints: {
768: {
columns: 2,
gap: 12,
},
480: {
columns: 1,
gap: 8,
},
},
});
document.querySelectorAll("[data-filter]").forEach((button) => {
button.addEventListener("click", () => {
grid.filter(button.dataset.filter);
});
});
</script>- Getting started
- Layouts and responsive grids
- Filtering and sorting
- Dynamic content and animation
- Configuration reference
- API reference
- Architecture
- Contributing
Clone the repository and run:
php -S localhost:8000GridWave is available under the MIT License.
Reach Linus Benkner on X at @linusbenkner or by email at [email protected].