Skip to content
Getting Started

Installation ​

Installation has three steps: the Composer package, the npm package, and one line of CSS.

1. Install the PHP package ​

bash
composer require erag/inertia-forms

Then run the install command:

bash
php artisan erag:install-inertia-forms

It publishes config/inertia-forms.php, then prints the next steps: the Vue, React and Svelte packages to choose from, the Tailwind @source line, and make:form. A config you already published is kept; add --force to replace it.

The service provider is registered automatically through Laravel package discovery. It adds the erag:install-inertia-forms and make:form Artisan commands and the inertia-forms config.

2. Install the frontend package ​

Install the package for your framework:

bash
npm install @erag/inertia-forms-vue
bash
npm install @erag/inertia-forms-react
bash
npm install @erag/inertia-forms-svelte

3. Let Tailwind scan the package ​

The components are styled with Tailwind CSS 4 utility classes. Tailwind only generates classes it can see, so point it at the package's built files with an @source directive in your main CSS file (usually resources/css/app.css):

css
@import 'tailwindcss';

@source "../../node_modules/@erag/inertia-forms-vue/dist";
css
@import 'tailwindcss';

@source "../../node_modules/@erag/inertia-forms-react/dist";
css
@import 'tailwindcss';

@source "../../node_modules/@erag/inertia-forms-svelte/dist";

The path is relative to the CSS file. From resources/css/app.css, ../../ points to the project root. Adjust it if your CSS file lives elsewhere.

Forms look unstyled?

The @source line is missing or the path is wrong. Fix the path and restart npm run dev.

AI agents (Laravel Boost) ​

The package ships Laravel Boost guidelines and an inertia-forms-development skill. If your app uses Boost, load them into your agent (Claude Code, Cursor, Codex, and others):

bash
php artisan boost:install

Already set up Boost? Run php artisan boost:update --discover to pick up the new package.

Publishing the config ​

erag:install-inertia-forms already published it. To publish (or re-publish) it by hand:

bash
php artisan vendor:publish --tag=inertia-forms-config

make:form needs nothing published; it uses the stub inside the package. See Artisan Command & Config for both.

Next step ​

Build your first form in the Quick Start.