X Enterprises
nuxt-x-affiliate

Decision Matrix

Weighted multi-criteria scoring matrix — products × criteria with weighted totals and a winner highlight.

Decision Matrix

The XAFDecisionMatrix component renders a weighted multi-criteria scoring matrix — products on the columns, criteria (with weights) on the rows, and a "weighted total" footer row that picks the winner. More rigorous than <XAFComparisonTable>: the reader can see exactly how the final score was computed.

Components

<XAFDecisionMatrix />

<XAFDecisionMatrix
  title="How we scored them"
  :criteria="[
    { label: 'Performance', weight: 0.4 },
    { label: 'Build',       weight: 0.3 },
    { label: 'Battery',     weight: 0.2 },
    { label: 'Price',       weight: 0.1 },
  ]"
  :products="[
    { name: 'Logitech MX Keys S', scores: [9, 9, 8, 7], highlighted: true, href: '/reviews/mx-keys-s' },
    { name: 'Keychron K3',        scores: [8, 8, 9, 8] },
    { name: 'Apple Magic',        scores: [7, 9, 6, 5] },
  ]"
/>

Props

PropTypeDefaultDescription
criteriaCriterion[]requiredEach criterion: { label, weight, description? }. Weights typically sum to 1.
productsScoredProduct[]requiredEach product carries name, optional image, href, highlighted, and scores[] aligned with criteria.
maxScorenumber10Maximum score per criterion.
titlestring"Decision Matrix"Section heading.

The weighted total is normalized by the sum of weights, so weights don't have to sum to exactly 1.


AI Context

component: XAFDecisionMatrix
package: "@xenterprises/nuxt-x-affiliate"
use-when: Weighted multi-criteria scoring matrix with weighted totals and a winner highlight.
Copyright © 2026