Laravel
Set up Layout UI in a Laravel project using the Inertia.js React stack and Tailwind v4.
New project
Create a Laravel app with the React/Inertia starter kit
Laravel 11+ ships official starter kits. Use the React variant which includes Inertia.js, TypeScript, and Tailwind:
laravel new my-app --starter-kit=react cd my-appUpgrade to Tailwind v4
The Laravel React starter kit ships with Tailwind v3. Upgrade to v4:
npm install tailwindcss@latest @tailwindcss/vite@latest npm uninstall @tailwindcss/forms autoprefixer postcssUpdate
vite.config.tsto use the Vite plugin instead of PostCSS:import tailwindcss from "@tailwindcss/vite"; export default defineConfig({ plugins: [ laravel({ input: ["resources/css/app.css", ...] }), react(), tailwindcss(), ], });Replace
resources/css/app.csscontent with:@import "tailwindcss";Configure path aliases
The starter kit sets up
@/aliased toresources/js/. Verify intsconfig.json:{ "compilerOptions": { "paths": { "@/*": ["./resources/js/*"] } } }Initialise shadcn
npx shadcn@latest init -y -b base -p novaWhen prompted for the components path, use
resources/js/components.Add the Layout registry and install components
// components.json { "registries": { "@layout": "https://ui.layout.design/r/{name}.json" } }npx shadcn add @layout/theme-layout npx shadcn add @layout/button