Skip to content

Installation

InertiaX is installed into an existing Laravel, React, and Inertia application. If you are starting a new project, create it with Laravel’s official React starter kit, confirm the application runs, and then continue here.

You do not need to install React, React DOM, or Inertia again.

Your application should already use:

  • PHP 8.3, 8.4, or 8.5;
  • Laravel 12 or 13;
  • React 19.1 or newer within React 19;
  • matching 2.x or matching 3.x versions of the Laravel and React Inertia adapters.

See Compatibility for the tested combinations.

  1. Install the Laravel package

    Once Composer can access the package, install it in the existing application:

    Terminal window
    composer require inertiax/inertiax-laravel

    Laravel discovers the package automatically. The standard Table workflow does not require publishing a configuration file.

  2. Install the frontend packages

    Install the renderer and Inertia integration with your preferred package manager:

    Terminal window
    pnpm add @inertiax/react @inertiax/react-inertia

    These are the only frontend InertiaX packages needed by the normal Laravel + React + Inertia path. Your package-manager choice is remembered anywhere the same tabs appear in the guide.

  3. Load the Table styles

    Import the shipped stylesheet once in your browser entry point:

    resources/js/app.tsx
    import '@inertiax/react/styles.css';

    This is the maintained polished default. The stylesheet is compiled and scoped, works without Tailwind, and does not require adding InertiaX package paths to Tailwind’s source configuration. Applications that deliberately own every visual rule can use the advanced base.css path instead.

  4. Add the provider

    Mount one provider at the application entry point so every Inertia page shares the same runtime, application-level custom types, and Table presentation defaults:

    resources/js/app.tsx
    import { createInertiaApp } from '@inertiajs/react';
    import { InertiaXProvider } from '@inertiax/react';
    import { createRoot } from 'react-dom/client';
    import '@inertiax/react/styles.css';
    createInertiaApp({
    // Keep your existing resolve() and other options.
    setup({ el, App, props }) {
    createRoot(el).render(
    <InertiaXProvider>
    <App {...props} />
    </InertiaXProvider>,
    );
    },
    });

    A deliberately isolated React root or test harness may own a local provider. Ordinary Inertia pages should use the application provider rather than creating a new runtime on each page.

Build your first Table from the application’s existing User model. It is the fastest end-to-end check of Composer access, npm access, styling, Laravel production, and Inertia rendering.