Get 2024 Templates Mega Bundle!$1000 worth of 19 Bootstrap HTML, Vue & React Templates + 3 Vector Sets for just $99
Get for 99$

Dark theme on Laravel


Hello everyone,

I'm currently playing with the new version of Metronic Tailwind and trying to integrate Filament Datatables and Filament Forms as per the documentation:
https://filamentphp.com/docs/3.x/forms/installation

However, I'm encountering issues with the dark mode. It doesn't seem to apply properly to the Filament components.

<img src="https://i.ibb.co/yqQ14YY/1.png" />

<img src="https://i.ibb.co/gvxgKKd/2.png" />

Has anyone else faced this? Is there something I'm missing to ensure dark mode compatibility with these plugins?

Any advice would


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (4)


Implementing a dark theme in Laravel has transformed my development experience. I appreciate how it enhances visual comfort, especially Spectra Precision Laser HL700 Laserometer during long coding sessions. The ability to customize the appearance and integrate it seamlessly into my projects not only improves aesthetics but also boosts productivity, making my workflow more enjoyable and efficient.



Hi Abderaouf,

Can you check this if the theme mode is in cache and wont change to dark. Can you try to remove it?

https://tinyurl.com/mr3v5ube

Thanks



Hi Abderaouf,

To ensure dark mode compatibility, you'll need to use the `defaultThemeMode()` method, passing either `ThemeMode::Light` or `ThemeMode::Dark`, as outlined in the Filament documentation.

Here’s the relevant link:
https://filamentphp.com/docs/3.x/panels/themes#changing-the-default-theme-mode

Let me know if this helps!



I'm using form builder plugin without the panel !

https://filamentphp.com/docs/3.x/forms/installation


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(