Installation
Setting up Preline UI in a Laravel project using Tailwind CSS.
PHP web application framework with expressive, elegant syntax.
Install preline
via npm or yarn.
// Terminal or Shellnpm install preline // or yarn add preline
Add the path to Preline UI JavaScript files in your tailwind.config.js
file.
// tailwind.config.jsmodule.exports = { content: [ 'node_modules/preline/dist/*.js', ], plugins: [ require('preline/plugin'), ],}
Add the Preline UI JavaScript in your app entry point app.js
// index.jsimport('preline')
With your Vite entry points configured, you only need reference them in a @vite()
Blade directive that you add to the <head>
of your application's root template
<!doctype html><head> {{-- ... --}} @vite('resources/js/app.js')</head>