I’m looking for some help to develop a v2 addon that will serve as a UI components library (buttons, forms, modals, cards, badges, etc.) to be used across multiple apps I’m developing.
Where can I find documentation on how to create a version 2 addon from scratch?
How can I implement a color scheme (nothing complex, just 2-3 main colors) that can be redefined in each app that uses the addon? (I would prefer to use Tailwind if possible)
There is a lot of common behaviors between all our components when we make new design systems (or implementing an existing design system that maybe already has CSS).
Libraries that may be of use to you along your journey:
How can I implement a color scheme (nothing complex, just 2-3 main colors) that can be redefined in each app that uses the addon? (I would prefer to use Tailwind if possible)
For this, I would use css variables everywhere, and then define the values in your app’s index.html (or somewhere else central)
Example:
// in your app
:root {
--primary: #9900bb;
--secondary: #eeeeee;
}
// in your library
button.primary {
background: var(--primary);
}
Hope this helps! And don’t hesitate to ask more questions