Skip to content

What's the best approach when working with custom classes? #84

Answered by dcastil
b-89 asked this question in Help
Discussion options

You must be logged in to vote

Hi @b-89! 👋

The best way for this is to create a file where you configure tailwind-merge with extendTailwindMerge and export your custom twMerge function, which you then use everywhere. You put all your custom classes into the object you pass as argument to extendTailwindMerge. Where exactly depends on the classes.

Do you have an example of how you want to extend the Tailwind config?

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@b-89
Comment options

@dcastil
Comment options

Answer selected by b-89
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
context-v1 Related to tailwind-merge v1
2 participants