Replies: 1 comment 3 replies
-
The goal of the Tailwind CSS config is to make sure that all parts of the site use the same design parameters. It's like a design system in code. From what I understand you want the exact opposite? I don't exactly understand the reasoning behind that. Shouldn't all components of the library share the same appearance? Maybe I didn't really get what you are trying to achieve. Usually you'd have a bunch of design settings in your module.exports = {
theme: {
extend: {
colors: {
brand: {
default: '#ff0000',
light: '#ff6666',
dark: '#990000',
}
},
shadow: {
'3xl': '0 35px 60px -15px rgba(0, 0, 0, 0.3)',
},
},
},
}; and you'd use these throughout your component library: <button class="bg-brand-default text-white shadow-3xl">Hit me</button> <input type="border-brand-dark shadow-3xl"> and so on. Does that make things clearer? If not, maybe provide some more insight into what you are trying to do. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm building component library and wanted to build it framework agnostic.
so naturally wanted to try out tailwind css for that purpose.
Right now if want to add new colors or shadow classes apart from what tailwind already provides, i use to update
tailwind.config.js
. Each component is different from each other and how can i create multiple configuration of individual components that get applied only to that component.Beta Was this translation helpful? Give feedback.
All reactions