F
Filament5w ago
dyo

Missing filament primary color after version upgrade

Can someone help for my problem above? My action buttons which are without color method is like transparent background. For example, In attached image, there's actually a create button on the table header action. I've already got primary color in $panel->colors(). I've tried this also: https://filamentphp.com/docs/3.x/support/colors#customizing-the-default-colors What should I do?
No description
12 Replies
slamx_
slamx_5w ago
Can you share your Panel Provider Settings?
dyo
dyo5w ago
sure
return $panel
->default()
->id('admin')
->path('admin')
->login()
->colors([
'primary' => Color::Amber,
'danger' => Color::Rose,
'gray' => Color::Gray,
'info' => Color::Blue,
'success' => Color::Emerald,
'warning' => Color::Orange,
])
->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages')
->pages([])
->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\\Filament\\Widgets')
->widgets([
Widgets\AccountWidget::class,
Widgets\FilamentInfoWidget::class,
])
->databaseNotifications()
->middleware([
EncryptCookies::class,
AddQueuedCookiesToResponse::class,
StartSession::class,
AuthenticateSession::class,
ShareErrorsFromSession::class,
VerifyCsrfToken::class,
SubstituteBindings::class,
DisableBladeIconComponents::class,
DispatchServingFilamentEvent::class,
])
->authMiddleware([
Authenticate::class,
])
->viteTheme('resources/css/filament/admin/theme.css')
->plugins([
SpotlightPlugin::make(),
]);
return $panel
->default()
->id('admin')
->path('admin')
->login()
->colors([
'primary' => Color::Amber,
'danger' => Color::Rose,
'gray' => Color::Gray,
'info' => Color::Blue,
'success' => Color::Emerald,
'warning' => Color::Orange,
])
->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages')
->pages([])
->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\\Filament\\Widgets')
->widgets([
Widgets\AccountWidget::class,
Widgets\FilamentInfoWidget::class,
])
->databaseNotifications()
->middleware([
EncryptCookies::class,
AddQueuedCookiesToResponse::class,
StartSession::class,
AuthenticateSession::class,
ShareErrorsFromSession::class,
VerifyCsrfToken::class,
SubstituteBindings::class,
DisableBladeIconComponents::class,
DispatchServingFilamentEvent::class,
])
->authMiddleware([
Authenticate::class,
])
->viteTheme('resources/css/filament/admin/theme.css')
->plugins([
SpotlightPlugin::make(),
]);
Vp
Vp5w ago
IIRC you also need 'custom' => Color::Amber Or not. can you run npm run build to see it's working or not cause you've another theme as well
dyo
dyo4w ago
I've ran npm run build. what else should I try?
awcodes
awcodes4w ago
Can you show us your resources/css/filament/admin.css And resources/css/filament/tailwind.config.js
dyo
dyo4w ago
@awcodes here's tailwind config
const defaultTheme = require("tailwindcss/defaultTheme");

import colors from 'tailwindcss/colors'
import forms from '@tailwindcss/forms'
import typography from '@tailwindcss/typography'


/** @type {import('tailwindcss').Config} */
module.exports = {
darkMode: 'class',
content: [
"./vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php",
"./storage/framework/views/*.php",
"./resources/views/**/*.blade.php",
"./node_modules/tw-elements/dist/js/**/*.js",
'./vendor/filament/**/*.blade.php',
'./vendor/savannabits/filament-flatpickr/**/*.blade.php',

],

theme: {
extend: {
fontFamily: {
sans: ["Nunito", ...defaultTheme.fontFamily.sans],
},
},
},

plugins: [
require("@tailwindcss/forms"),
require("daisyui"),
require("tw-elements/dist/plugin.cjs"),
typography,
require('flowbite/plugin')
],
daisyui: {
themes: ['light'],
},
};
const defaultTheme = require("tailwindcss/defaultTheme");

import colors from 'tailwindcss/colors'
import forms from '@tailwindcss/forms'
import typography from '@tailwindcss/typography'


/** @type {import('tailwindcss').Config} */
module.exports = {
darkMode: 'class',
content: [
"./vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php",
"./storage/framework/views/*.php",
"./resources/views/**/*.blade.php",
"./node_modules/tw-elements/dist/js/**/*.js",
'./vendor/filament/**/*.blade.php',
'./vendor/savannabits/filament-flatpickr/**/*.blade.php',

],

theme: {
extend: {
fontFamily: {
sans: ["Nunito", ...defaultTheme.fontFamily.sans],
},
},
},

plugins: [
require("@tailwindcss/forms"),
require("daisyui"),
require("tw-elements/dist/plugin.cjs"),
typography,
require('flowbite/plugin')
],
daisyui: {
themes: ['light'],
},
};
and i don't have admin.css in that path, how can i have that?
awcodes
awcodes4w ago
You’re using panels, right? Either way you’re missing the filament preset in your tailwind.config.js. Theming changed between v2 and v3
awcodes
awcodes4w ago
This could also affect any plugins you might be using.
dyo
dyo4w ago
yes i'm using panels.. how can i reset it?
Dennis Koch
Dennis Koch4w ago
Best to follow the theme instructions in the docs
dyo
dyo4w ago
thanks, eventually I reset my tailwind config to basic, and start from zero again to use plugins
Want results from more Discord servers?
Add your server
More Posts
Saving Optional Relationship to db does not persistEdit: **This is not solved, only halfway there :(** Hey all, I've been trying my hand at Laravel andRepeater - Array to String Conversion when save - logImplodeAssoci am on my first testing to store json arrays into database with repeater. - the database column waUpload Image Always Failed On Ubuntu working fine on windowsUpload Image Always Failed On Ubuntu working fine on windowsEdit profile page redirection to the Breeze login page to be preventedI have created a custom Edit Profile page that extends to the Base Edit Profile Page. I previously Issue with RelationManager in one direction when I want to attach an elementHi , I'm encountering the following issue with 2 models on which I have deployed a Many-to-Many relaFilament Asset RegisterIs it possible to register filament assets somewhere else, I have registered filament assets in theWidget in Relation ManagerFrom my understanding is that we can create a widget and register in the ListPage as normal way . I Tenancy Check in Model PolicyMy Policy has the following code: ```php public function view(User $user, Model $model): bool Question about File Upload Security announcement on May 20th regarding file names and mimtypes.This is probably a dumb question cuz I'm really new to coding, but there is an #💫┊announcements froHow to Create a Livewire List Table with Filament's Default DesignI'm building a Livewire component to display a list/table to reduce loading times when dealing with