F
Filament2y ago
John

Dark mode with tables and forms

How do I enable dark mode on tables and forms? (I'm not asking for Admin panel) I have darkMode: 'class' in tailwind.config.js and put this in my app layout: <body class="dark">. It works for every dark:... class but my Filament tables and forms stay light.
6 Replies
toeknee
toeknee2y ago
Check that dark_mode = true in the filament.php config file.
John
JohnOP2y ago
It is. In /admin I can switch from the user menu and it works just fine.
toeknee
toeknee2y ago
Interesting... Sounds like a tailwind config issue from your frontend app
John
JohnOP2y ago
It works for my own dark: classes I add. I'm not seeing dark: classes on the Filament Table though. Admin table div: <div class="border border-gray-300 shadow-sm bg-white rounded-xl filament-tables-container dark:bg-gray-800 dark:border-gray-700"> Custom table div: <div class="border border-gray-300 shadow-sm bg-white rounded-xl filament-tables-container">
Dan Harrin
Dan Harrin2y ago
@John it should be enabled in the forms and tables config file as well as the admin panel config
John
JohnOP2y ago
@Dan Harrin Works like a charm! Thanks.
Want results from more Discord servers?
Add your server