- What is inertiaui/modal and how does it work with Laravel Inertia?
- inertiaui/modal is a package that lets existing Inertia routes render inside modal windows or slideovers. The page component decides whether it renders as a full page or as a modal panel, so you do not need a separate API or a parallel route tree. It extends the Inertia visit lifecycle rather than replacing it.
- How do I install inertiaui/modal in a Laravel app?
- Installation is two-part: a Composer package for the Laravel side and an npm package for the frontend adapter. You configure the base route and middleware helpers, then register the Vue 3, React, or Svelte adapter. No controller changes or route restructuring are required for a basic adoption.
- Which Laravel and Inertia versions does inertiaui/modal support?
- The package assumes Laravel 10+ with Inertia and a supported frontend adapter. It is described as working across Inertia v1 and v2, but version coupling matters because Laravel, Inertia, and the adapter can each introduce breaking changes. Verify the exact supported matrix against your pinned versions before committing.
- Does inertiaui/modal work with Vue 3, React, and Svelte?
- Yes, the package describes adapters for Vue 3, React, and Svelte through one API. Typical frontend helpers include ModalLink, Modal, useModal, and visitModal. Confirm that your chosen adapter is a first-class citizen in the version you pin, not a secondary integration.
- Can I use existing Inertia routes as modals without duplicating controllers?
- Yes, any existing Inertia route can be rendered inside a modal or slideover. The same route, controller, and page component handle both full-page and modal rendering. This removes the need for separate modal-variant routes and the drift that usually follows them.
- How do nested modals, slideovers, and persistent layouts work?
- The package supports route-driven modals, nested modals, slideovers, and persistent layouts with minimal setup. It handles common history, focus, and scroll cases, but nested flows and post-submit redirects are where teams often need extra testing. Validate those edge cases in your own application shell before broad adoption.
- Do I need Tailwind CSS for inertiaui/modal styling?
- The default styling assumes Tailwind CSS, so Tailwind users get a working modal immediately. Teams using another CSS approach will need to restyle the components. Also ensure the package frontend distribution is included in Tailwind content globs, because purged classes are a common cause of unstyled modals.
- Is inertiaui/modal accessible and production-ready?
- The package handles common modal behavior such as focus trapping, aria-modal, and Escape or backdrop closing, but you should test it against your accessibility bar, such as WCAG 2.1 AA. Check focus return, scroll locking, and nested modal behavior in your real flows. Production readiness also depends on your version matrix and tolerance for a single-maintainer dependency.
- What are the alternatives to inertiaui/modal for Laravel Inertia modals?
- The main alternative is building an in-house modal wrapper around Inertia visits, often around 200 lines of glue code. You can also use modal components from a general UI library, but those usually do not solve route-driven modal rendering. The package’s value is removing a parallel route tree, so weigh that against the cost of an external dependency.
- Who maintains inertiaui/modal and what is the long-term risk?
- The repository has around 246 stars and a single primary maintainer, so the bus factor is one. MIT licensing and a small meaningful code footprint make forking viable, which limits the downside. Still, price in vendor concentration and verify the Laravel, Inertia, adapter, and Tailwind version matrix before standardizing on it.