The matrix field renders a row-by-column grid and stores one selected column ID for each answered row.
Options and value shape
| Option | Type | Behavior |
|---|---|---|
rows | SelectOption[] | Declares the questions down the grid |
columns | SelectOption[] | Declares the answer choices across the grid |
required | boolean | Requires an answer for every row |
The stored object maps row IDs to column IDs, and unknown rows or columns are rejected. An optional matrix can contain only the rows the respondent answered.
Add a matrix field
In the dashboard, select Add block, choose Matrix, then edit the rows and columns separately.
ts
const experienceField = {
id: "experience",
kind: "matrix",
label: "Rate each part of setup",
rows: [
{ id: "docs", label: "Documentation" },
{ id: "install", label: "Installation" },
],
columns: [
{ id: "poor", label: "Poor" },
{ id: "ok", label: "OK" },
{ id: "great", label: "Great" },
],
required: true,
} as const;Related
- Rating: Ask one compact score question.
- Linear scale: Add clear labels to a numbered range.
- Custom UI: Replace the built-in grid while keeping the same value shape.