Estructura & Layoutlayoutgridgallery
4-Column Portfolio Grid
Galería de cuatro columnas responsiva para portfolios fotográficos y proyectos.
Vista Previa en Vivo
4-Column Portfolio Grid
Uso
Copia y pega este código directamente en tu componente React:
tsx
import { GalleryGrid4 } from 'react-component-kit-ui/layout';
<GalleryGrid4>Content</GalleryGrid4>Instalación Manual
Si no estás usando el paquete npm, crea un archivo nuevo y pega el siguiente código: src/components/GalleryGrid4.tsx + GalleryGrid4.css:
GalleryGrid4.tsx
'use client';
import type { ReactNode } from 'react';
import './GalleryGrid4.css';
/**
* GalleryGrid4 — 4-Column aspect ratio grid for visual galleries and photos.
*/
export interface GalleryGrid4Props {
className?: string;
children?: ReactNode;
}
export function GalleryGrid4({ className = '',
children
}: GalleryGrid4Props) {
return (
<>
<div className={`gal-grid ${className}`} data-rk-fb6612="">
{children ?? (<>
<div className="gal-item" data-rk-fb6612=""><span data-rk-fb6612="">Photo 1</span></div>
<div className="gal-item" data-rk-fb6612=""><span data-rk-fb6612="">Photo 2</span></div>
<div className="gal-item" data-rk-fb6612=""><span data-rk-fb6612="">Photo 3</span></div>
<div className="gal-item" data-rk-fb6612=""><span data-rk-fb6612="">Photo 4</span></div>
</>)}
</div>
</>
);
}
export default GalleryGrid4;GalleryGrid4.css
/* GalleryGrid4 — ported from astro-component-kit (layout/GalleryGrid4.astro) */
.gal-grid:where([data-rk-fb6612]) {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
gap: 16px;
width: 100%;
}
.gal-grid:where([data-rk-fb6612]) > *, .gal-item:where([data-rk-fb6612]) {
aspect-ratio: 1;
border-radius: 12px;
background: rgb(var(--ink-rgb, 255 255 255) / 0.04);
border: 1px solid rgb(var(--ink-rgb, 255 255 255) / 0.08);
display: flex;
align-items: center;
justify-content: center;
color: #94a3b8;
font-weight: 600;
}Información Rápida
- Categoría
- Estructura & Layout
- Nombre de archivo
GalleryGrid4.tsx- Dependencias
- Ninguna — React + CSS puro
- Etiquetas
- layoutgridgallery