Unable to load proper styles for components used outside of admin panel
I've got a basic layout blade and I want to use button from filament. No luck so far, I've read the docs but sadly did not find anything or missed it..
app.blade.php
vite.config.js
and tailwind.config.js
Am I missing something? It is probably something stupid I forgot about.. the styles actually get loaded but the button is not styled properly.. one thing I noticed is that
--c-400: var(--primary-400);
--c-500: var(--primary-500);
--c-600: var(--primary-600);
on the button dont work, it says that --primary-400
, --primary-500
, --primary-600
are not defined.2 Replies
you don't have filament preset in your tailwind config
it's in the docs
import preset from './vendor/filament/support/tailwind.config.preset'
I thought that was the case only when installing forms separately, not with full panel builder installation
Adding the preset alone did not work, I had to run the
php artisan filament:install --scaffold --forms
in order to add proper vite and tailwind config (which automatically adds the preset as well)
Thank you!!