Installation
Prerequisites
Install
vite.config.ts.
Require the package
Neura Kit is MIT licensed. No license key.
composer require neura-ui/neura-kit:^3.0
Register the plugin
The command patches the first config it finds: vite.config.js, .mjs, .ts, or .mts. It then adds the Tailwind source line. app.js stays untouched.
php artisan neura-kit:install
import neuraKit from './vendor/neura-ui/neura-kit/resources/js/index.ts';
plugins: [
neuraKit(),
laravel({
input: ['resources/css/app.css', 'resources/js/app.js'],
refresh: true,
}),
tailwindcss(),
]
@source '../../vendor/neura-ui/neura-kit/**/*.{js,ts,vue,blade.php,php}';
Load the runtime
Place @neuraKit just before </body>. It renders the modal, toast, and overlay managers.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="csrf-token" content="{{ csrf_token() }}">
@vite(['resources/css/app.css', 'resources/js/app.js'])
</head>
<body>
@yield('content')
@neuraKit
</body>
</html>
Compile
Use the command that matches the toolchain you kept.
Vite.js
npm run dev
Vite+
vp dev
vp build
Vite+
neura-kit:install
, so the plugin is written into the new config.
Install the CLI
On Windows, run irm https://vite.plus/ps1 | iex.
curl -fsSL https://vite.plus | bash
Migrate the app
This writes vite.config.ts for an existing Laravel project.
vp migrate
Register the plugin
Same command as Install, step 02. Then compile with vp dev.
php artisan neura-kit:install
After install
php artisan neura-kit:install-deps
composer update neura-ui/neura-kit