Community
Trick
How can I compile new Tailwind CSS classes in a panel?
Aug 1, 2023
Tailwind CSS
Panel Builder

Tailwind does not compile every single possible utility class. It only compiles the ones that are actually used within Filament. Therefore, to use new utility classes, you must compile them yourself. In the panel builder, you can do this with a custom theme. You can find out how to set up custom themes in our documentation.

Once you've set up and compiled a custom theme, if the Tailwind class you need is still not compiled, check the content array of the theme's tailwind.config.js file, to ensure that your file is included.

Dan Harrin

Dan is a full-stack developer from the Cardiff, UK. He co-created Filament, and continues to lead development of the project. He works for Kirschbaum, a web development agency.

8
Articles
145
Stars