Summary
Add field.matrix(label) — a grid where each row is an item and each column is a rating / option. The classic survey "rate each item on this scale" pattern.
Why this would help
- Surveys, questionnaires, multi-criteria evaluations, peer reviews.
- Replicating this with N separate
radio fields is verbose and brittle to add/remove rows.
- A composite field stores
Record<rowKey, columnValue> so downstream code consumes a single shape.
Proposed API
field.matrix('Rate each')
.rows([
{ key: 'design', label: 'Design' },
{ key: 'usability', label: 'Usability' },
{ key: 'performance', label: 'Performance' },
])
.columns([1, 2, 3, 4, 5])
.inputType('radio'); // 'radio' | 'checkbox'
Suggested implementation areas
src/core/field-descriptors/matrix/MatrixFieldBuilder.ts (new)
src/core/field-descriptors/field.ts
src/renderers/web/ — semantic table with proper headers and aria-labels
src/renderers/native/ — vertical row stacks with column-as-segmented-control
Acceptance Criteria
Summary
Add
field.matrix(label)— a grid where each row is an item and each column is a rating / option. The classic survey "rate each item on this scale" pattern.Why this would help
radiofields is verbose and brittle to add/remove rows.Record<rowKey, columnValue>so downstream code consumes a single shape.Proposed API
Suggested implementation areas
src/core/field-descriptors/matrix/MatrixFieldBuilder.ts(new)src/core/field-descriptors/field.tssrc/renderers/web/— semantic table with proper headers and aria-labelssrc/renderers/native/— vertical row stacks with column-as-segmented-controlAcceptance Criteria
Record<rowKey, columnValue>(or arrays forinputType('checkbox'))<table>+ headers)