Zoeken...  ⌘K GitHub

ListBullets list

Eenvoudige bulletlijst met gekleurde stippen.

/list-bullets
src/components/list/ListBullets.astro
---
interface Props {
  title?: string;
  items: string[];
  color?: string;
}
const { title, items = ["Transparante rapportage", "Geen lange contracten", "Dedicated accountmanager", "Wekelijkse updates", "ROI-garantie"], color } = Astro.props;
---

<div class="lst-bul">
  {title && <p class="lst-bul__title">{title}</p>}
  <ul class="lst-bul__list">
    {items.map(item => (
      <li class="lst-bul__item">
        <span class="lst-bul__dot" style={color ? `background:${color}` : ''}></span>
        <span>{item}</span>
      </li>
    ))}
  </ul>
</div>

<style>
  :root {
    --color-accent: #6366f1;
    --color-primary: #0a0a0a;
  }
  .lst-bul { padding: 1rem 0; }
  .lst-bul__title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #888;
    margin: 0 0 0.75rem;
  }
  .lst-bul__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
  }
  .lst-bul__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.975rem;
    color: var(--color-primary);
  }
  .lst-bul__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-accent);
    flex-shrink: 0;
  }
</style>

Props

Prop Type Default Beschrijving
title string Optionele titel boven de lijst
items * string[] Bulletpunten
color string Kleur van de stippen (CSS kleurwaarde)

* = verplicht