Skip to content
Discussion options

You must be logged in to vote

In packages/ui/src/components/button.tsx line 13, you have:

default:
  "… text-indigo … text-primary-foreground …",

Notice how you have two classes that apply color. On line 53, you then pass the result of this cva function through cn() which uses tailwind-merge.

Since text-primary-foreground appears after text-indigo, text-indigo is removed from the class names rendered on the element. Generally, you only want one class name per element for the same variant (in this case, no variants) regardless if you are using tailwind-merge or not.

So, if you want the text color value in the default CVA variant to be text-indigo, remove text-primary-foreground:

--- a/packages/ui/src/components/button.tsx

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@dragos-cojocaru
Comment options

Answer selected by dragos-cojocaru
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #18796 on August 25, 2025 18:31.