TextFieldLabelPosition.Attached


The default label position according to the Material specification.

For TextField, the label is positioned inside the text field container. For OutlinedTextField, the label is positioned inside the text field container when expanded and cuts into the border when minimized.

Summary

Public constructors

Attached(
    alwaysMinimize: Boolean,
    minimizedAlignment: Alignment.Horizontal,
    expandedAlignment: Alignment.Horizontal
)
Cmn

Public functions

open operator Boolean
equals(other: Any?)
Cmn
open Int
Cmn
open String
Cmn

Public properties

Boolean

Whether to always keep the label of the text field minimized.

Cmn
Alignment.Horizontal

The horizontal alignment of the label when it is expanded.

Cmn
Alignment.Horizontal

The horizontal alignment of the label when it is minimized.

Cmn

Public constructors

Attached

Attached(
    alwaysMinimize: Boolean = false,
    minimizedAlignment: Alignment.Horizontal = Alignment.Start,
    expandedAlignment: Alignment.Horizontal = Alignment.Start
)
Parameters
alwaysMinimize: Boolean = false

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: Alignment.Horizontal = Alignment.Start

The horizontal alignment of the label when it is minimized.

expandedAlignment: Alignment.Horizontal = Alignment.Start

The horizontal alignment of the label when it is expanded.

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

alwaysMinimize

val alwaysMinimizeBoolean

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.

expandedAlignment

val expandedAlignmentAlignment.Horizontal

The horizontal alignment of the label when it is expanded.

minimizedAlignment

val minimizedAlignmentAlignment.Horizontal

The horizontal alignment of the label when it is minimized.