1 estrella en GitHub = 1 componente nuevo.

Dar una estrella
Secciones de Página statsmetricskpitelemetrydata

Stats Metric Showcase

Sección de métricas clave de plataforma con números grandes, iconos luminosos y descripciones breves.

Vista Previa en Vivo

Global Scale

Built for Production at Enterprise Scale

Powering millions of monthly page views with flawless reliability, instant static caching, and ultra-low latency.

200+ +45 this quarter

Handcrafted UI Components

From atomic buttons to full landing sections.

99.99% Zero incidents

Uptime & Reliability

Hosted on global edge CDN distribution networks.

< 50ms 3.2x faster

Time to First Byte (TTFB)

Pre-rendered static HTML with immutable cache.

10k+ +120% YoY growth

Active Developers

Deploying production Astro apps worldwide.

LIVE NETWORK TELEMETRY
Edge POPs: 310 Cities
Global CDN Latency: 18ms avg
Asset Compression: Brotli / Gzip Enabled

Uso

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

astro
---
import { StatsMetricShowcase } from 'astro-component-kit';
---

<StatsMetricShowcase />
--- import { StatsMetricShowcase } from 'astro-component-kit'; --- <StatsMetricShowcase />

Instalación Manual

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

astro
---
/**
 * StatsMetricShowcase — Full-page data and numbers showcase section with KPIs, sparklines, and live telemetry indicators.
 * 
 * @param {string} badge - Eyebrow badge text.
 * @param {string} title - Section main heading.
 * @param {string} subtitle - Description text.
 */
interface Props {
  badge?: string;
  title?: string;
  subtitle?: string;
  className?: string;
}

const {
  badge = "Global Scale",
  title = "Built for Production at Enterprise Scale",
  subtitle = "Powering millions of monthly page views with flawless reliability, instant static caching, and ultra-low latency.",
  className = ""
} = Astro.props;

const stats = [
  {
    value: "200+",
    label: "Handcrafted UI Components",
    change: "+45 this quarter",
    positive: true,
    desc: "From atomic buttons to full landing sections."
  },
  {
    value: "99.99%",
    label: "Uptime & Reliability",
    change: "Zero incidents",
    positive: true,
    desc: "Hosted on global edge CDN distribution networks."
  },
  {
    value: "< 50ms",
    label: "Time to First Byte (TTFB)",
    change: "3.2x faster",
    positive: true,
    desc: "Pre-rendered static HTML with immutable cache."
  },
  {
    value: "10k+",
    label: "Active Developers",
    change: "+120% YoY growth",
    positive: true,
    desc: "Deploying production Astro apps worldwide."
  }
];
---

<div class="cq-stats-metric-showcase-cq">
<section class={`stats-section ${className}`} aria-labelledby="stats-title">
  <div class="stats-bg" aria-hidden="true">
    <div class="stats-glow"></div>
  </div>

  <div class="container">
    <!-- Header -->
    <div class="section-header">
      {badge && <span class="section-badge">{badge}</span>}
      <h2 id="stats-title" class="section-title">{title}</h2>
      <p class="section-subtitle">{subtitle}</p>
    </div>

    <!-- Stats Grid -->
    <div class="stats-grid">
      {stats.map((stat, i) => (
        <article class="stat-card">
          <div class="stat-top">
            <span class="stat-num">{stat.value}</span>
            <span class="stat-badge">{stat.change}</span>
          </div>
          <h3 class="stat-label">{stat.label}</h3>
          <p class="stat-desc">{stat.desc}</p>
          <div class="stat-chart-bar" aria-hidden="true">
            <div class="chart-progress" style={`width: ${75 + i * 8}%;`}></div>
          </div>
        </article>
      ))}
    </div>

    <!-- Live Telemetry Banner -->
    <div class="telemetry-banner">
      <div class="telemetry-live">
        <span class="live-dot"></span>
        <span class="live-label">LIVE NETWORK TELEMETRY</span>
      </div>
      <div class="telemetry-items">
        <div class="telemetry-item">
          <span class="tel-name">Edge POPs:</span>
          <span class="tel-val">310 Cities</span>
        </div>
        <div class="telemetry-item">
          <span class="tel-name">Global CDN Latency:</span>
          <span class="tel-val">18ms avg</span>
        </div>
        <div class="telemetry-item">
          <span class="tel-name">Asset Compression:</span>
          <span class="tel-val">Brotli / Gzip Enabled</span>
        </div>
      </div>
    </div>
  </div>
</section>
</div>
<style>
  .cq-stats-metric-showcase-cq { container-type: inline-size; }
  .stats-section {
    position: relative;
    padding: var(--sp-20, 5rem) var(--sp-6, 1.5rem);
    background: var(--c-bg-primary, #030712);
    overflow: hidden;
  }

  .stats-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
  }

  .stats-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 700px;
    height: 400px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.08), transparent 70%);
    filter: blur(120px);
  }

  .container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
  }

  .section-header {
    text-align: center;
    max-width: 780px;
    margin: 0 auto 3.5rem;
  }

  .section-badge {
    display: inline-flex;
    padding: 0.35rem 0.9rem;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
    margin-bottom: var(--sp-4, 1rem);
  }

  .section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    color: #fff;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 var(--sp-4, 1rem);
  }

  .section-subtitle {
    font-size: 1.1rem;
    color: #94a3b8;
    line-height: 1.6;
    margin: 0;
  }

  .stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
  }

  .stat-card {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgb(var(--ink-rgb, 255 255 255) / 0.08);
    border-radius: var(--r-xl, 20px);
    padding: 2rem 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, border-color 0.3s ease;
  }

  .stat-card:hover {
    transform: translateY(-4px);
    border-color: rgb(var(--ink-rgb, 255 255 255) / 0.2);
  }

  .stat-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 0.75rem;
  }

  .stat-num {
    font-size: 2.5rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    letter-spacing: -0.02em;
  }

  .stat-badge {
    padding: 0.2rem 0.55rem;
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
  }

  .stat-label {
    font-size: 1.05rem;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0 0 0.5rem;
  }

  .stat-desc {
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.5;
    margin: 0 0 1.25rem;
  }

  .stat-chart-bar {
    height: 4px;
    background: rgb(var(--ink-rgb, 255 255 255) / 0.08);
    border-radius: 9999px;
    overflow: hidden;
  }

  .chart-progress {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #3b82f6);
    border-radius: 9999px;
  }

  /* Live Telemetry Banner */
  .telemetry-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.25rem 2rem;
    background: rgba(10, 15, 30, 0.8);
    border: 1px solid rgb(var(--ink-rgb, 255 255 255) / 0.08);
    border-radius: 16px;
    flex-wrap: wrap;
  }

  .telemetry-live {
    display: flex;
    align-items: center;
    gap: 0.65rem;
  }

  .live-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 12px #10b981;
    animation: livePulse 2s infinite ease-in-out;
  }

  @keyframes livePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.5; }
  }

  .live-label {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #10b981;
  }

  .telemetry-items {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
  }

  .telemetry-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
  }

  .tel-name {
    color: #64748b;
  }

  .tel-val {
    color: #f1f5f9;
    font-weight: 600;
  }

  @container (max-width: 1024px) {
    .stats-grid {
      grid-template-columns: repeat(2, 1fr);
    }
  }

  @container (max-width: 640px) {
    .stats-grid {
      grid-template-columns: 1fr;
    }
    .telemetry-banner {
      flex-direction: column;
      align-items: flex-start;
      gap: 1rem;
    }
  }
</style>
--- /** * StatsMetricShowcase — Full-page data and numbers showcase section with KPIs, sparklines, and live telemetry indicators. * * @param {string} badge - Eyebrow badge text. * @param {string} title - Section main heading. * @param {string} subtitle - Description text. */ interface Props { badge?: string; title?: string; subtitle?: string; className?: string; } const { badge = "Global Scale", title = "Built for Production at Enterprise Scale", subtitle = "Powering millions of monthly page views with flawless reliability, instant static caching, and ultra-low latency.", className = "" } = Astro.props; const stats = [ { value: "200+", label: "Handcrafted UI Components", change: "+45 this quarter", positive: true, desc: "From atomic buttons to full landing sections." }, { value: "99.99%", label: "Uptime & Reliability", change: "Zero incidents", positive: true, desc: "Hosted on global edge CDN distribution networks." }, { value: "< 50ms", label: "Time to First Byte (TTFB)", change: "3.2x faster", positive: true, desc: "Pre-rendered static HTML with immutable cache." }, { value: "10k+", label: "Active Developers", change: "+120% YoY growth", positive: true, desc: "Deploying production Astro apps worldwide." } ]; --- <div class="cq-stats-metric-showcase-cq"> <section class={`stats-section ${className}`} aria-labelledby="stats-title"> <div class="stats-bg" aria-hidden="true"> <div class="stats-glow"></div> </div> <div class="container"> <!-- Header --> <div class="section-header"> {badge && <span class="section-badge">{badge}</span>} <h2 id="stats-title" class="section-title">{title}</h2> <p class="section-subtitle">{subtitle}</p> </div> <!-- Stats Grid --> <div class="stats-grid"> {stats.map((stat, i) => ( <article class="stat-card"> <div class="stat-top"> <span class="stat-num">{stat.value}</span> <span class="stat-badge">{stat.change}</span> </div> <h3 class="stat-label">{stat.label}</h3> <p class="stat-desc">{stat.desc}</p> <div class="stat-chart-bar" aria-hidden="true"> <div class="chart-progress" style={`width: ${75 + i * 8}%;`}></div> </div> </article> ))} </div> <!-- Live Telemetry Banner --> <div class="telemetry-banner"> <div class="telemetry-live"> <span class="live-dot"></span> <span class="live-label">LIVE NETWORK TELEMETRY</span> </div> <div class="telemetry-items"> <div class="telemetry-item"> <span class="tel-name">Edge POPs:</span> <span class="tel-val">310 Cities</span> </div> <div class="telemetry-item"> <span class="tel-name">Global CDN Latency:</span> <span class="tel-val">18ms avg</span> </div> <div class="telemetry-item"> <span class="tel-name">Asset Compression:</span> <span class="tel-val">Brotli / Gzip Enabled</span> </div> </div> </div> </div> </section> </div> <style> .cq-stats-metric-showcase-cq { container-type: inline-size; } .stats-section { position: relative; padding: var(--sp-20, 5rem) var(--sp-6, 1.5rem); background: var(--c-bg-primary, #030712); overflow: hidden; } .stats-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; } .stats-glow { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 700px; height: 400px; background: radial-gradient(circle, rgba(16, 185, 129, 0.08), transparent 70%); filter: blur(120px); } .container { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; } .section-header { text-align: center; max-width: 780px; margin: 0 auto 3.5rem; } .section-badge { display: inline-flex; padding: 0.35rem 0.9rem; border-radius: 9999px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; background: rgba(16, 185, 129, 0.12); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.25); margin-bottom: var(--sp-4, 1rem); } .section-title { font-size: clamp(2rem, 4vw, 3rem); font-weight: 900; color: #fff; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 var(--sp-4, 1rem); } .section-subtitle { font-size: 1.1rem; color: #94a3b8; line-height: 1.6; margin: 0; } .stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-bottom: 2.5rem; } .stat-card { background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(20px); border: 1px solid rgb(var(--ink-rgb, 255 255 255) / 0.08); border-radius: var(--r-xl, 20px); padding: 2rem 1.75rem; display: flex; flex-direction: column; justify-content: space-between; transition: transform 0.3s ease, border-color 0.3s ease; } .stat-card:hover { transform: translateY(-4px); border-color: rgb(var(--ink-rgb, 255 255 255) / 0.2); } .stat-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 0.75rem; } .stat-num { font-size: 2.5rem; font-weight: 900; color: #fff; line-height: 1; letter-spacing: -0.02em; } .stat-badge { padding: 0.2rem 0.55rem; background: rgba(16, 185, 129, 0.15); color: #34d399; border-radius: 9999px; font-size: 0.7rem; font-weight: 700; } .stat-label { font-size: 1.05rem; font-weight: 700; color: #f1f5f9; margin: 0 0 0.5rem; } .stat-desc { font-size: 0.85rem; color: #94a3b8; line-height: 1.5; margin: 0 0 1.25rem; } .stat-chart-bar { height: 4px; background: rgb(var(--ink-rgb, 255 255 255) / 0.08); border-radius: 9999px; overflow: hidden; } .chart-progress { height: 100%; background: linear-gradient(90deg, #10b981, #3b82f6); border-radius: 9999px; } /* Live Telemetry Banner */ .telemetry-banner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 1.25rem 2rem; background: rgba(10, 15, 30, 0.8); border: 1px solid rgb(var(--ink-rgb, 255 255 255) / 0.08); border-radius: 16px; flex-wrap: wrap; } .telemetry-live { display: flex; align-items: center; gap: 0.65rem; } .live-dot { width: 10px; height: 10px; border-radius: 50%; background: #10b981; box-shadow: 0 0 12px #10b981; animation: livePulse 2s infinite ease-in-out; } @keyframes livePulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.4); opacity: 0.5; } } .live-label { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; color: #10b981; } .telemetry-items { display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; } .telemetry-item { display: flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; } .tel-name { color: #64748b; } .tel-val { color: #f1f5f9; font-weight: 600; } @container (max-width: 1024px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } } @container (max-width: 640px) { .stats-grid { grid-template-columns: 1fr; } .telemetry-banner { flex-direction: column; align-items: flex-start; gap: 1rem; } } </style>

Información Rápida

Categoría
Secciones de Página
Nombre de archivo
StatsMetricShowcase.astro
Dependencias
Ninguna — Astro nativo + CSS puro
Etiquetas
statsmetricskpitelemetrydata