Tailwind css not working on full-page livewire component
Hi, hope you all are doing well.
I'm trying to render livewire component as full-page via:
Route::get('path', LivewireComponent::class)
Tailwind css not working on it.
First error was components.layouts.app not found
So i created the folder components/layouts
and inside created app.blade.php
.
The component view is showing correctly but tailwind css not working on it.
Am i missed something ?Solution:Jump to solution
you can do this if you don't want to use TALL preset..
php artisan livewire:layout
```bash...20 Replies
This might help you:
https://filamentexamples.com/tutorial/tailwind-css-class-not-found-how-to-add-them?source=search
In short - tailwind comes with required classes for Filament to work. If you need anything custom - you have to create a theme 🙂
Filament Examples
Filament Tailwind CSS Class Not Found: How to Activate It
Some elements in your panel require an existing Tailwind CSS class, but often, it's not pre-compiled and doesn't work. So let's see how we can use any class!
this not working too. i already had custom theme configured. applying style in theme.css do not work also.
Have you compiled the assets after you used tailwind classes?
Yes,
npm run dev
. And also tried npm run build
. Nothing changed.Is the theme being loaded correctly? Try to override some filament styling and see if it works
wait, what this have to do with filament here? that's the first important question
I'm using filament. Already build the backend with it. I need to show a livewire full-page component via a route to display for exemple a list of orders for kitchen.
So, that's why.
Okay, but how did you import the theme/asset files into your layout?
This page. Is it also in a filament panel or outside?
no, i want it to be outside, no need to login. i just created a livewire component and called it via the web route.
Are you using Filament outside the panel?
I think that the resources are not being loaded in the
components/layouts
correctlythen you are doing everything wrong. Nothing works from the filament outside of the panel until you tell it
in this case you need to learn more about livewire and laravel
If you want to install the TALL preset, you can use this
If you want to use Filament Form builder, for example, you need to install the Form Builder assets, Tailwind, etc
GitHub
GitHub - laravel-frontend-presets/tall: A TALL (Tailwind CSS, Alpin...
A TALL (Tailwind CSS, Alpine.js, Laravel and Livewire) Preset for Laravel - laravel-frontend-presets/tall
No
use TALL Stack preset
https://tallstack.dev/
TALL stack
TALL Stack: Tailwind CSS, Alpine.js, Laravel, and Livewire. One Hap...
Learn more about the newest stack for Laravel developers. Full stack, all in Laravel-inspired syntax.
Sorry for this question, but this can be installed in the same project with filament ? As i said, i'm already using filament for backend.
it can
Solution
you can do this if you don't want to use TALL preset..
php artisan livewire:layout
run npm run dev
Great. It's working now.
I've tried to use TALL preset but after installing the ui the dashboard route for filament didn't work anymore,
so mooving to this solution and css work now.
Thanks for your help. Thanks you all.