Selecting a primary color from existing color plate #8524
Unanswered
berkayyildiz
asked this question in
Help
Replies: 1 comment
-
You can use const colors = require('tailwindcss/colors')
module.exports = {
theme: {
extend: {
colors: {
primary: colors.pink
},
},
},
} Then you can do |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, as an example I have a button, it has bg-primary-200 and text-primary-800 classes. I want to set that primary from existing tailwind plate. For example I want to add primary=red attribute and make component use red-200 and red-800. I can make this manually in scss but its a lot of work for every color even with mixins because it is not possible to iterate color names due to compile time generation of classes. Do you know a way to achieve this?
Beta Was this translation helpful? Give feedback.
All reactions