Customize the style existing components!

When I customize the existing component of filament, please make sure I have to make a new theme or not? Thank you.
Solution:
custom themes are useful if you want to use tailwind classes that are not used yet in filament components. Let's say you want to use bg-purple-600 and this class is not used yet, it won't work unless you use a custom theme.
Jump to solution
4 Replies
Solution
charlie
charlie2mo ago
custom themes are useful if you want to use tailwind classes that are not used yet in filament components. Let's say you want to use bg-purple-600 and this class is not used yet, it won't work unless you use a custom theme.
Shaung Bhone
Shaung BhoneOP2mo ago
Thank you
jjo63
jjo632mo ago
Sorry for jumping in on this with another question - but would we then have to explicitly define e.g. bg-purple-600 within our theme.css ? I have found that I have to (for my example colour) add to my theme.css for example
.bg-yellow-300 {
@apply bg-yellow-300;
}
.bg-yellow-300 {
@apply bg-yellow-300;
}
or perhaps
.bg-my-yellow {
@apply bg-yellow-300;
}
.bg-my-yellow {
@apply bg-yellow-300;
}
This seems overly cumbersome so guess I must be missing something. Look - for anyone elsde who is struggling with this - I now realise that my issue was that to utilise a tailwind class not used already (within Filament I guess) you have to - modify blade (e.g. adding the references to classes required) - run npm run build - reload the page in the browser It was this latter step that puzzled me as most blade changes seem to not require a full page reload to take effect - so sharing in case others have been as frustrated / ignorant ( 🙂 ) as me.
charlie
charlie2mo ago
you can also run npm run dev or composer dev => it will watch the changes and hot reload your browser tab, this way you don't have to do npm run build and refresh each time

Did you find this page helpful?