---
label: kpi voorbeeld
description: Generieke KPI-kaart (configurable)
type: kpi
author: maik
---

import React from 'react';

export default function KpiTemplate({ data, config }) {
  const value = data?.[config.value_key] ?? 0;
  return (
    <div className="widget-kpi">
      <div className="widget-kpi__label">{config.title}</div>
      <div className="widget-kpi__value">
        {value.toFixed(config.precision ?? 0)} {config.unit ?? ''}
      </div>
    </div>
  );
}
