How can I compile new Tailwind CSS classes in a panel?

Trick Panels Tailwind CSS
Dan Harrin avatar Author: Dan Harrin
Published: Aug 01, 2023

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.

The author

Dan Harrin avatar Author: Dan Harrin

Dan is a software engineer from the UK. He is one of the co-creators of Filament, and leads development of the project. He is passionate about open-source software, and building tools that simplify complex problems.

When he's not coding, Dan enjoys music, board games, and cooking.

Articles
11

From the same author