Prodular UI

Variant matrix

Pro

Every variant of a generated batch on one table, concepts across and formats down, each at its own shape, showing what is ready, what is still being made and what needs a person.

npx prodular-ui add variant-matrix

Part of Prodular UI Pro. Preview and read the docs freely, install with a license. See pricing

Campaign

Five concepts in three formats. A warning ring needs review, the AI dot was fixed by the agent, the last concept is still being made. Pick any variant.

Close in daysConcept 1
Fewer chasesConcept 2
One ledgerConcept 3
Audit readyConcept 4
Cash on timeConcept 5
Feed 1:1
Story 9:16
Display 1.91:1

One ledger, Story 9:16. The headline runs under the app's safe area on iPhone. Check it before export.

Anatomy

<VariantMatrix columns={concepts.length}>  <VariantMatrixRow>    <VariantMatrixColumn />    {concepts.map((c) => <VariantMatrixColumn key={c.id} label={c.name} />)}  </VariantMatrixRow>  {formats.map((f) => (    <VariantMatrixRow key={f.id}>      <VariantMatrixRowLabel>{f.label}</VariantMatrixRowLabel>      {concepts.map((c) => (        <VariantMatrixCell key={c.id} status={status} aspect={f.aspect} label={`${c.name}, ${f.label}`}>          <img src={url} alt="" />        </VariantMatrixCell>      ))}    </VariantMatrixRow>  ))}</VariantMatrix>

Guidance

Use it when

  • Use it when an agent makes a set of variants at once: ad formats, image sizes, email versions, localized screens.
  • Show the whole batch while it is being made, so people see progress and can open what is ready.
  • Keep the real proportions of each format so problems with a crop are visible.

Avoid

  • A gallery of unrelated images. Use a grid of cards.
  • More than eight concepts. Split the batch or let it scroll sideways, as it does.
  • Marking every variant for review. Mark the ones a person must decide on.

Rules for AI agents

Published in llms-full.txt, the registry and the MCP server, so coding agents follow them when they build with this component.

  • Render one VariantMatrixRow of VariantMatrixColumn first, starting with an empty VariantMatrixColumn above the row labels, then one VariantMatrixRow per format with a VariantMatrixRowLabel and one VariantMatrixCell per concept, in the same order.
  • Pass columns with the number of concepts, and aspect on every cell from the format, for example "9 / 16".
  • Status: queued before work starts, generating while the model makes it, review when a check failed and a person must look, fixed when the agent corrected it itself, ready otherwise. Leave children out while queued or generating.
  • Give every cell a label with the concept and format, for example "Night runs, Story 9:16". It is what screen readers hear, with the status.
  • Pass onSelect to open the variant, and set selected on the open one.

API

VariantMatrix

PropTypeDefaultDescription
columnsnumberConcept columns after the row labels. Set --variant-width to change the column width (96px).

VariantMatrixColumn

PropTypeDefaultDescription
label / descriptionReactNodeConcept heading. The first, empty one sits above the row labels.

VariantMatrixCell

PropTypeDefaultDescription
status"ready" | "queued" | "generating" | "review" | "fixed""ready"Exposed as data-status. Review draws a warning ring, fixed an AI dot.
aspectstring"1 / 1"The format's shape as a CSS aspect ratio.
labelstringConcept and format, for screen readers.
selected / onSelectboolean, () => voidMakes the cell a button that opens the variant.

Installation

The Prodular UI CLI adds the source to components/ui with everything it depends on. In a project that already uses shadcn/ui, the shadcn CLI installs it from the Prodular registry too. See Installation for the first setup.

npx prodular-ui add variant-matrix# or, with the registry in components.jsonnpx shadcn@latest add @prodular/variant-matrix