Skip to content

Installation

Lattice adds a server-driven UI layer to a Laravel application running Inertia with the React adapter.

RequirementVersion
PHP8.4+
Laravel11, 12, or 13
Inertia (Laravel + React)v3
React19
Tailwind CSS4

Lattice ships as two coordinated packages:

  • lattice-php/lattice on Composer — the PHP layer that describes pages, forms, tables, actions, and menus and serializes them to typed component trees.
  • @lattice-php/lattice on npm — the React renderer that turns those trees into rendered UI in the browser.

Both packages are cut from the same release, so a given Composer version always has a matching npm version — the renderer can’t drift from the server that serialized the page. Install the Composer package below, then add the npm package in Frontend Setup.

Terminal window
composer require lattice-php/lattice

The service provider is registered automatically through Laravel package discovery, so there is nothing to add to bootstrap/providers.php.

Publish config/lattice.php to customize discovery paths, endpoints, and middleware:

Terminal window
php artisan vendor:publish --tag="lattice-config"

See Configuration for what each option controls.

Install the React renderer and wire it into your Inertia entrypoint once: add the npm package, import its stylesheet, and register the page component. Follow Frontend Setup.