lara-zeus/matrix-choice
A Laravel package for matrix-style multiple choice fields in Filament forms: let users pick answers across rows and columns in a grid, with a clean, intuitive interface for surveys, ratings, and structured selections.
Package: lara-zeus/matrix-choice — a Filament form-field plugin that renders a rows × columns matrix with one selection per row. Release under review: 5.0.1 (patch). Ecosystem signals: 27 stars, 0 dependents, single primary maintainer, MIT licensed.
Architecture fit — favourable for a bounded UI primitive. The package is a presentation-layer extension to a Filament form schema. It does not own the data model, require migrations, introduce services, register queues, or dictate persistence. It inherits the host application's Livewire state, validation pipeline, and theming. From a TPM's standpoint this is the best possible shape for a third-party dependency: low coupling in both directions means the cost to adopt is low and the cost to exit is low. For a UI pattern that is genuinely expensive to hand-roll (Likert scales, NPS/CSAT batteries, onboarding questionnaires, skills self-assessments, compliance checklists, priority matrices) and that carries near-zero competitive differentiation, "buy" is the correct default. Adoption converts a multi-week custom-UI workstream into days of configuration and returns engineering capacity to differentiating work.
Integration feasibility — high, conditional on the stack. The mechanics are a Composer require plus a field class inside a form schema. No infrastructure, no external services, no data migration, no asset publishing. The real effort is verification rather than construction: confirm php / laravel/framework / filament/filament constraints against our pins, then exercise the field end-to-end on a representative form (render → select → validate → persist → re-render a saved record). Budget a half-day to one day for the spike. That is the entire integration risk envelope, which makes this an unusually cheap decision to make with real evidence rather than estimation.
What actually changed in 5.0.1. One functional change: feat: allow hiding specific options (#42). Everything else is documentation restructuring (#40) and three Dependabot bumps to CI tooling. No removals, no deprecations, no migration steps, no config or asset republication. The CI housekeeping is a positive maintenance-hygiene signal with zero runtime impact.
Technical risk — low overall, three items on the register.
Key questions for the spike / maintainer.
php / laravel / filament constraints for ^5.0.1, and is our current Filament major supported?Verdict. Adopt for near-term questionnaire/matrix roadmap items, provided we are on Filament. 5.0.1 does not warrant a migration project or risk escalation. It does warrant pinning exact versions, gating the option-hiding feature behind a verification step, and keeping the field definition thin.
Stack fit. Hard prerequisite: a Filament-based admin or forms surface on Laravel + Livewire. If the target application is not on Filament, the package does not apply — there is no headless or Blade-only path, and no workaround worth building. Filament's major version is the primary compatibility fault line; confirm alignment before scheduling any dependent work.
Migration path. No migration for 5.0.0 → 5.0.1; it is a drop-in Composer update. Teams on 4.x should treat 4.x → 5.x as the genuine migration boundary and plan it as its own line item — this assessment's guidance applies to the 5.x line only.
Compatibility. Read composer.json constraints directly rather than inferring from the changelog, and validate against our pins with composer why-not. Pay specific attention to PHP 8.4 / Laravel 12 adoption and Filament peer constraints, since that is where breakage surfaces first. Treat any Filament major upgrade as a mandatory retest trigger for this field.
Sequencing.
5.0.1; add the matrix field to one non-critical form; exercise normal selection, persistence, re-render of a saved record, and the option-hiding path including a tampered submission attempting to post a hidden option.Scope discipline. Keep validation rules, allow-lists, scoring, and persistence in our code. The field must remain a thin declarative layer over our domain model, never the place where business rules accumulate — that discipline is what preserves the cheap-exit property that justified adoption in the first place.
Maintenance. Near-zero steady-state effort. No migrations, no scheduled jobs, no runtime services, no workers, no storage. The update stream is small and recently dominated by chore and Dependabot traffic. Realistic ongoing cost is a periodic dependency-bump review plus a retest on Filament majors — hours per quarter, not days. Ownership should sit with the team that owns the Filament forms surface, not a platform team.
Support. Best-effort, single maintainer, no SLA, no LTS, no commercial backstop. That is an acceptable support profile for a form input and would be disqualifying for anything owning data or auth. The organization's real support plan is the vendoring fallback: the surface is small enough to fork and maintain in-house if upstream stalls. Cost that now — a rough estimate is enough — so the contingency is a known number.
Scaling. No scaling surface to speak of: rendering is client-side plus standard Livewire round-trips. Two things to watch as usage grows — (a) very large matrices (many rows × many columns) increase payload and Livewire state size per request, so cap row/column counts per form and paginate long questionnaires at the form level rather than the field level; (b) repeated matrix fields on one long form compound the same cost. Neither is a blocker; both are design guardrails to write into the form conventions.
Failure modes.
Ramp-up. Low. A developer familiar with Filament form schemas is productive within an hour using the fluent configuration API. Enablement material is one internal snippet plus the team convention: the matrix schema is declarative and lives in one place; validation, allow-lists, and scoring live in our code. One developer takes the spike end-to-end; no specialized skills, no training program, no onboarding artifact beyond the contract test and that convention note.
Roadmap framing for stakeholders. We can deliver the questionnaire/matrix surface on the roadmap by adopting a small, actively maintained MIT component instead of commissioning custom UI — a multi-week build becomes days of configuration, and per-context option hiding (new in 5.0.1) matches the per-persona and "not applicable" behaviour in the spec. Risk is contained: no breaking changes, presentation-layer only so the data model is not locked in, exact version pinning, and a costed exit path. Recommendation: adopt for the current roadmap item, fund a one-day spike to validate against our form requirements, gate option hiding behind the semantics test, and keep the field definition thin so a swap is a contained change.
How can I help you explore Laravel packages today?