Zoeken...  ⌘K GitHub

IconLarge icon

Groot-stat-raster: kop + grid van items met groot icoon, prominente waarde en sublabel. Bewijs-sectie met kerncijfers.

/icon-large
src/components/icon/IconLarge.astro
---
/**
 * IconLarge
 * Groot-stat-raster: kop + grid van items met groot icoon, prominente waarde en sublabel.
 * Geschikt als bewijs-sectie met kerncijfers.
 *
 * Props:
 * - headline?: string
 * - items: { icon?: string; value: string; label: string }[]
 * - accentColor?: string   default '#6366f1'
 * - theme?: 'light' | 'dark'   default 'light'
 */
interface Props {
  headline?: string;
  items: { icon?: string; value: string; label: string }[];
  accentColor?: string;
  theme?: 'light' | 'dark';
}

const { headline, items, accentColor = '#6366f1', theme = 'light' } = Astro.props;
---

<section class:list={['bl-section', 'ilg', `ilg--${theme}`]}>
  <div class="bl-inner ilg-inner" style={`--color-accent: ${accentColor}`}>
    {headline && <h2 class="ilg-headline">{headline}</h2>}
    <div class="ilg-grid">
      {items.map(item => (
        <div class="ilg-item">
          {item.icon && <span class="ilg-icon" aria-hidden="true">{item.icon}</span>}
          <strong class="ilg-title">{item.value}</strong>
          <span class="ilg-sub">{item.label}</span>
        </div>
      ))}
    </div>
  </div>
</section>

<style>
  .ilg--light { background: var(--color-bg, #fff); }
  .ilg--dark { background: #0a0a0a; }

  .ilg-headline {
    margin: 0 0 3rem;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 800;
    color: var(--color-primary, #0a0a0a);
    letter-spacing: -.02em;
    text-align: center;
  }
  .ilg--dark .ilg-headline { color: #e8e8e8; }

  .ilg-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
    justify-content: center;
  }

  .ilg-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    flex: 1 1 160px;
    text-align: center;
  }

  .ilg-icon {
    font-size: 3rem;
    line-height: 1;
  }

  .ilg-title {
    font-size: 2rem;
    font-weight: 900;
    color: var(--color-accent);
    letter-spacing: -.02em;
    line-height: 1;
  }

  .ilg-sub {
    font-size: .9375rem;
    color: #6b7280;
    font-weight: 500;
  }
  .ilg--dark .ilg-sub { color: #aaa; }
</style>

Props

Prop Type Default Beschrijving
headline string - Optionele sectiekop
items * { icon?: string; value: string; label: string }[] - Stat-items met waarde en sublabel
accentColor string '#6366f1' Kleur van de stat-waarde
theme 'light' | 'dark' 'light' Achtergrondmodus

* = verplicht