Work with prefix
#142
-
twMerge('bg-app-slate-8', 'bg-app-red-3'); // This is working
twMerge('tw-bg-app-slate-8', 'tw-bg-app-red-3'); // But this is not working Maybe const tm = twMerge.prefix('tw-');
tm('tw-bg-app-slate-8', 'tw-bg-app-red-3'); |
Beta Was this translation helpful? Give feedback.
Answered by
dcastil
Sep 17, 2022
Replies: 1 comment
-
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. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
dcastil
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @wowissu! 👋
You can use a prefix with tailwind-merge like this:
I just noticed that this is missing in the API reference docs. I'll add if there in the next release.