Zoeken...  ⌘K GitHub

ListSteps list

Stap-voor-stap lijst met titel en beschrijving.

/list-steps
src/components/list/ListSteps.astro
---
interface Props {
  steps: Array<{ title: string; desc: string }>;
}
const { steps = [
  { title: "Boek een gratis gesprek", desc: "Geen verplichtingen, alleen een eerlijk gesprek over jouw situatie." },
  { title: "Ontvang jouw strategie", desc: "Binnen 5 werkdagen presenteren wij een concreet plan." },
  { title: "Ga live", desc: "Wij regelen alles — jij focust op je business." },
] } = Astro.props;
---

<div class="lst-steps">
  {steps.map((step, i) => (
    <div class="lst-steps__step">
      <div class="lst-steps__header">
        <span class="lst-steps__n">{String(i + 1).padStart(2, '0')}</span>
        <strong class="lst-steps__title">{step.title}</strong>
      </div>
      <p class="lst-steps__desc">{step.desc}</p>
    </div>
  ))}
</div>

<style>
  :root {
    --color-accent: #6366f1;
    --color-primary: #0a0a0a;
  }
  .lst-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .lst-steps__step {
    padding: 1.5rem 0 1.5rem 0;
    border-bottom: 1px solid #efefef;
  }
  .lst-steps__step:last-child { border-bottom: none; }
  .lst-steps__header {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
  }
  .lst-steps__n {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    font-variant-numeric: tabular-nums;
  }
  .lst-steps__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary);
  }
  .lst-steps__desc {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    padding-left: 1.75rem;
  }
</style>

Props

Prop Type Default Beschrijving
steps { title: string; desc: string }[] Stappen

* = verplicht