I have a question about the Material 3 library. Wh...
# compose
w
I have a question about the Material 3 library. Why are many parameters, such as the padding for TextField, hardcoded instead of being exposed as configurable parameters? Currently, customizing many components requires copying the source code to make modifications. If a project has numerous customization requirements, forking the entire Material 3 library seems like a more practical solution. However, since Material 3 is part of the androidx package. I wonder, how challenging would it be to fork Material 3?🤔
e
Mostly because it's an opinionated design system. You'll have an easier time "forking" it if you're adapting it to work with an existing design system. In terms of actually doing it, you can either fork androidx, or copy material3 as a standalone project (but you'll have to de-monolith it). Then you'll have to figure out how to keep it in sync with upstream (check out JetBrains' compose-multiplatform-core for what that might look like).
❤️ 1
👆 1
v
It's because TextField is supposed to conform to Material Design. If you want more flexibility I would recommend just using BasicTextField instead, which is the component that TextField wraps. BasicTextField is part of the same package, so there is no need to fork.