Best practices for styling Filament components

What are the best practices for custom styling according to you guys? For example the TextInput from the Form builder. I want to style multiple components globally around my Filament project, preferable by using tailwind classes instead of custom css.

I can think of 4 options:
  1. Global css using existing specific classes and selectors.
  2. Overwriting the blade template, but I prefer not to due to the disadvantage of not retrieving automatic updates.
  3. Using setAttribute per component (adding custom css or tailwind classes), but I prefer not to due to the amount of extra (duplicated) code.
  4. Setting the extra classes globally somewhere using setAttribute, maybe via dependency injection? I haven't tried this yet though.
I prefer just to add tailwind classes in an elegant way. What is your best practice in styling Filament?
Was this page helpful?