I have a design system that is not like Material a...
# compose
c
I have a design system that is not like Material at all EXCEPT for the "card" pattern. We want to keep cards and especially their properties for dark theme (where elevation gets converted to brightness)> Anyway. What do you all recommend? Not using Material dependency at all? Copy pasting the card code into my app directly. Or including material dep, and just using a Material card?
g
I would just copy-paste material implementation if Card is the only element what you use
r
it's fine to include material dep and just use material card. essentially once you enabled proguard all deadcode should be get removed.
g
I don’t think that it’s “not fine” but I wouldn’t follow this path if you really reimplemented everything, it’s not only about app size, but because you also will have 2 versions of many components between you have to choose (like TextField)
👍 1
b
We are taking the approach of not using the Material library and copying the implementation of the parts we want into our codebase. At this point we have either wrapped or completely copied just about all of the Material components now so that they use the colors and typography from our design system. I also have a lint check that checks for Material imports and throws a warning when they are used. It’ll also helpfully offer a quickfix when we have a replacement in our design system
👍 1
There was a pretty long discussion on Material and custom design systems here: https://kotlinlang.slack.com/archives/CJLTWPH7S/p1603291475356800
c
Thanks will take a look