Compose Unstyled 2.0 is out! Check the official announcement blog ->
Class

TextFieldLabelPosition.Inside

The label is positioned inside the text field container.

Source set: Common
class Inside(
        val isAlwaysMinimized: Boolean = false,
        val minimizedAlignment: Alignment.Horizontal = Alignment.Start,
        val expandedAlignment: Alignment.Horizontal = Alignment.Start,
    ) : TextFieldLabelPosition()

The label is positioned inside the text field container.

This is the default label position for TextField.

Parameters

isAlwaysMinimized Whether to always keep the label of the text field minimized. If false, the label will expand to occupy the input area when the text field is unfocused and empty. If true, this allows displaying the placeholder, prefix, and suffix alongside the label when the text field is unfocused and empty.
minimizedAlignment The horizontal alignment of the label when it is minimized.
expandedAlignment The horizontal alignment of the label when it is expanded.

Last updated: