Skip to content

Work with prefix #142

Answered by dcastil
wowissu asked this question in Ideas
Discussion options

You must be logged in to vote

Hey @wowissu! 👋

You can use a prefix with tailwind-merge like this:

const twMerge = extendTailwindMerge({
    prefix: 'tw-',
})

twMerge('bg-app-slate-8', 'bg-app-red-3')
// → 'bg-app-red-3'

I just noticed that this is missing in the API reference docs. I'll add if there in the next release.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by dcastil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
context-v1 Related to tailwind-merge v1
2 participants