A responsive grid specifically designed for card layouts with auto-fill columns.
Component preview not available for: glass-card-grid
glass-card-grid
Ensure the filename matches GlassCardGrid.astro
GlassCardGrid.astro
Copy the full block below to use this component with its imports.
--- import { GlassCardGrid } from 'astro-component-kit'; --- <GlassCardGrid>Content</GlassCardGrid>
If you are not using the npm package, create a new file src/components/lib/GlassCardGrid.astro and paste the following code:
src/components/lib/GlassCardGrid.astro
--- --- <div class="card-grid"><slot /></div> <style> .card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2rem; } </style>