Does anyone know how to disable the label animatio...
# compose-android
j
Does anyone know how to disable the label animation of TextField when the value is empty? I’d like for the Label to be top-aligned at all times and not only where there is text present.
s
Doubt that’s customizable on the m3 component there. Just look inside the source code of it and see for yourself too to make sure.
j
I’ve taken a look but wanted to make sure I didn’t miss anything.
s
Yeah, don’t think so from last time I checked there. Might have to copy-paste the entire component if you want to customize that. Otherwise you can kinda hack it by always displaying a whitespace ” ” when your state is actually just an empty string, but that is absolutely a hack that you might regret in the future for various reasons 😄
👍 1
c
Yeah that is the design spec for Material3 TextField. To fully customize, you can replicate parts of it with BasicTextField and custom decorator box
1