https://kotlinlang.org logo
r

Reondz

09/06/2020, 11:25 AM
Why we must pass a param of "label" into TextField?Could it has a default value(null)?
c

Chris Sinco [G]

09/10/2020, 5:38 PM
The look and feel of
TextField
is based on the Material Design spec, which always includes a label in the component. It is technically possible to pass
emptyContent()
into the label parameter, which removes it visually.
The other alternative is to use
BaseTextField
from the Foundation package which doesn't have a label, but also doesn't have other UI features like placeholder text.