1 estrella en GitHub = 1 componente nuevo.

Dar una estrella
Estructura & Layout layoutgriddashboard

Bento Grid (3 Column)

Variante de cuadrícula bento de tres columnas para exhibir prestaciones de producto.

Vista Previa en Vivo

Main Highlight

Wide key feature metric or banner

Stat Widget

Quick KPI

Live Feed

Real-time status

Analytics

Vertical trend tracker

Uso

Copia y pega este código directamente en tu página de Astro:

astro
---
import { BentoGrid(3Column) } from 'astro-component-kit';
---

<BentoGrid3>Content</BentoGrid3>
--- import { BentoGrid(3Column) } from 'astro-component-kit'; --- <BentoGrid3>Content</BentoGrid3>

Instalación Manual

Si no estás usando el paquete npm, crea un archivo nuevo y pega el siguiente código: src/components/lib/BentoGrid(3Column).astro:

astro
---
/**
 * BentoGrid3 — Modern dashboard grid inspired by Bento-box layouts.
 */
interface Props {
  className?: string;
}

const { className = '' } = Astro.props;
---

<div class="cq-bento-grid3-cq">
<div class={`bento ${className}`}>
  <div class="item wide">
    <slot name="1">
      <h4>Main Highlight</h4>
      <p>Wide key feature metric or banner</p>
    </slot>
  </div>
  <div class="item">
    <slot name="2">
      <h4>Stat Widget</h4>
      <p>Quick KPI</p>
    </slot>
  </div>
  <div class="item">
    <slot name="3">
      <h4>Live Feed</h4>
      <p>Real-time status</p>
    </slot>
  </div>
  <div class="item tall">
    <slot name="4">
      <h4>Analytics</h4>
      <p>Vertical trend tracker</p>
    </slot>
  </div>
</div>
</div>
<style>
  .cq-bento-grid3-cq { container-type: inline-size; }
  .bento {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 150px;
    gap: 1rem;
    width: 100%;
  }
  .item {
    background: rgb(var(--ink-rgb, 255 255 255) / 0.03);
    border: 1px solid rgb(var(--ink-rgb, 255 255 255) / 0.08);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .item h4 {
    color: #fff;
    font-size: 1.1rem;
    margin: 0 0 0.25rem 0;
  }
  .item p {
    color: #94a3b8;
    font-size: 0.85rem;
    margin: 0;
  }
  .wide {
    grid-column: span 2;
  }
  .tall {
    grid-row: span 2;
  }
  @container (max-width: 768px) {
    .bento {
      grid-template-columns: 1fr;
      grid-auto-rows: auto;
    }
    .wide {
      grid-column: span 1;
    }
    .tall {
      grid-row: span 1;
    }
  }
</style>
--- /** * BentoGrid3 — Modern dashboard grid inspired by Bento-box layouts. */ interface Props { className?: string; } const { className = '' } = Astro.props; --- <div class="cq-bento-grid3-cq"> <div class={`bento ${className}`}> <div class="item wide"> <slot name="1"> <h4>Main Highlight</h4> <p>Wide key feature metric or banner</p> </slot> </div> <div class="item"> <slot name="2"> <h4>Stat Widget</h4> <p>Quick KPI</p> </slot> </div> <div class="item"> <slot name="3"> <h4>Live Feed</h4> <p>Real-time status</p> </slot> </div> <div class="item tall"> <slot name="4"> <h4>Analytics</h4> <p>Vertical trend tracker</p> </slot> </div> </div> </div> <style> .cq-bento-grid3-cq { container-type: inline-size; } .bento { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 150px; gap: 1rem; width: 100%; } .item { background: rgb(var(--ink-rgb, 255 255 255) / 0.03); border: 1px solid rgb(var(--ink-rgb, 255 255 255) / 0.08); border-radius: 16px; padding: 1.25rem; display: flex; flex-direction: column; justify-content: center; } .item h4 { color: #fff; font-size: 1.1rem; margin: 0 0 0.25rem 0; } .item p { color: #94a3b8; font-size: 0.85rem; margin: 0; } .wide { grid-column: span 2; } .tall { grid-row: span 2; } @container (max-width: 768px) { .bento { grid-template-columns: 1fr; grid-auto-rows: auto; } .wide { grid-column: span 1; } .tall { grid-row: span 1; } } </style>

Información Rápida

Categoría
Estructura & Layout
Nombre de archivo
BentoGrid(3Column).astro
Dependencias
Ninguna — Astro nativo + CSS puro
Etiquetas
layoutgriddashboard