# TextFieldLabelPosition.Attached

Artifact: [androidx.compose.material3:material3](https://developer.android.com/jetpack/androidx/releases/compose-material3) [View Source](https://cs.android.com/search?q=file:androidx/compose/material3/TextFieldDefaults.kt+class:androidx.compose.material3.TextFieldLabelPosition.Attached) Common/AllAndroid/JVM
- Cmn

  ```
  class TextFieldLabelPosition.Attached : TextFieldLabelPosition
  ```

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.compose.material3.TextFieldLabelPosition](https://developer.android.com/reference/kotlin/androidx/compose/material3/TextFieldLabelPosition) ||
|   | ↳ | [androidx.compose.material3.TextFieldLabelPosition.Attached](https://developer.android.com/reference/kotlin/androidx/compose/material3/TextFieldLabelPosition.Attached) |

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
> Use Inside for the default filled TextField behavior, or Cutout for the default OutlinedTextField behavior.

Translates to `https://developer.android.com/reference/kotlin/androidx/compose/material3/TextFieldLabelPosition.Inside` for `https://developer.android.com/reference/kotlin/androidx/compose/material3/TextField.composable#TextField(androidx.compose.foundation.text.input.TextFieldState,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.Boolean,androidx.compose.ui.text.TextStyle,androidx.compose.material3.TextFieldLabelPosition,kotlin.Function1,kotlin.Function0,kotlin.Function0,kotlin.Function0,kotlin.Function0,kotlin.Function0,kotlin.Function0,kotlin.Boolean,androidx.compose.foundation.text.input.InputTransformation,androidx.compose.foundation.text.input.OutputTransformation,androidx.compose.foundation.text.KeyboardOptions,androidx.compose.foundation.text.input.KeyboardActionHandler,androidx.compose.foundation.text.input.TextFieldLineLimits,kotlin.Function2,androidx.compose.foundation.ScrollState,androidx.compose.ui.graphics.Shape,androidx.compose.material3.TextFieldColors,androidx.compose.foundation.layout.PaddingValues,androidx.compose.foundation.interaction.MutableInteractionSource)`, and `https://developer.android.com/reference/kotlin/androidx/compose/material3/TextFieldLabelPosition.Cutout` for `https://developer.android.com/reference/kotlin/androidx/compose/material3/OutlinedTextField.composable#OutlinedTextField(androidx.compose.foundation.text.input.TextFieldState,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.Boolean,androidx.compose.ui.text.TextStyle,androidx.compose.material3.TextFieldLabelPosition,kotlin.Function1,kotlin.Function0,kotlin.Function0,kotlin.Function0,kotlin.Function0,kotlin.Function0,kotlin.Function0,kotlin.Boolean,androidx.compose.foundation.text.input.InputTransformation,androidx.compose.foundation.text.input.OutputTransformation,androidx.compose.foundation.text.KeyboardOptions,androidx.compose.foundation.text.input.KeyboardActionHandler,androidx.compose.foundation.text.input.TextFieldLineLimits,kotlin.Function2,androidx.compose.foundation.ScrollState,androidx.compose.ui.graphics.Shape,androidx.compose.material3.TextFieldColors,androidx.compose.foundation.layout.PaddingValues,androidx.compose.foundation.interaction.MutableInteractionSource)`.

## Summary

| ### Public constructors |
|---|---|
| `[Attached](https://developer.android.com/reference/kotlin/androidx/compose/material3/TextFieldLabelPosition.Attached#Attached(kotlin.Boolean,androidx.compose.ui.Alignment.Horizontal,androidx.compose.ui.Alignment.Horizontal))( alwaysMinimize: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, minimizedAlignment: https://developer.android.com/reference/kotlin/androidx/compose/ui/Alignment.Horizontal, expandedAlignment: https://developer.android.com/reference/kotlin/androidx/compose/ui/Alignment.Horizontal )` **This function is deprecated.** Use Inside for the default filled TextField behavior, or Cutout for the default OutlinedTextField behavior. | Cmn |

| ### Public functions |
|---|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `[equals](https://developer.android.com/reference/kotlin/androidx/compose/material3/TextFieldLabelPosition.Attached#equals(kotlin.Any))(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` **This function is deprecated.** Use Inside for the default filled TextField behavior, or Cutout for the default OutlinedTextField behavior. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `[hashCode](https://developer.android.com/reference/kotlin/androidx/compose/material3/TextFieldLabelPosition.Attached#hashCode())()` **This function is deprecated.** Use Inside for the default filled TextField behavior, or Cutout for the default OutlinedTextField behavior. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `[toString](https://developer.android.com/reference/kotlin/androidx/compose/material3/TextFieldLabelPosition.Attached#toString())()` **This function is deprecated.** Use Inside for the default filled TextField behavior, or Cutout for the default OutlinedTextField behavior. | Cmn |

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/TextFieldLabelPosition.Attached#alwaysMinimize()` **This property is deprecated.** Use Inside for the default filled TextField behavior, or Cutout for the default OutlinedTextField behavior. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/Alignment.Horizontal` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/TextFieldLabelPosition.Attached#expandedAlignment()` **This property is deprecated.** Use Inside for the default filled TextField behavior, or Cutout for the default OutlinedTextField behavior. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/Alignment.Horizontal` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/TextFieldLabelPosition.Attached#minimizedAlignment()` **This property is deprecated.** Use Inside for the default filled TextField behavior, or Cutout for the default OutlinedTextField behavior. | Cmn |

## Public constructors

### Attached

Cmn

```
[Attached](https://developer.android.com/reference/kotlin/androidx/compose/material3/TextFieldLabelPosition.Attached#Attached(kotlin.Boolean,androidx.compose.ui.Alignment.Horizontal,androidx.compose.ui.Alignment.Horizontal))(
    alwaysMinimize: Boolean = false,
    minimizedAlignment: Alignment.Horizontal = Alignment.Start,
    expandedAlignment: Alignment.Horizontal = Alignment.Start
)
```

> [!CAUTION]
> **This function is deprecated.**   
> Use Inside for the default filled TextField behavior, or Cutout for the default OutlinedTextField behavior.

| Parameters |
|---|---|
| `alwaysMinimize: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = 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: https://developer.android.com/reference/kotlin/androidx/compose/ui/Alignment.Horizontal = Alignment.Start` | The horizontal alignment of the label when it is minimized. |
| `expandedAlignment: https://developer.android.com/reference/kotlin/androidx/compose/ui/Alignment.Horizontal = Alignment.Start` | The horizontal alignment of the label when it is expanded. |

## Public functions

### equals

Cmn

```
open operator fun [equals](https://developer.android.com/reference/kotlin/androidx/compose/material3/TextFieldLabelPosition.Attached#equals(kotlin.Any))(other: Any?): Boolean
```

> [!CAUTION]
> **This function is deprecated.**   
> Use Inside for the default filled TextField behavior, or Cutout for the default OutlinedTextField behavior.

### hashCode

Cmn

```
open fun [hashCode](https://developer.android.com/reference/kotlin/androidx/compose/material3/TextFieldLabelPosition.Attached#hashCode())(): Int
```

> [!CAUTION]
> **This function is deprecated.**   
> Use Inside for the default filled TextField behavior, or Cutout for the default OutlinedTextField behavior.

### toString

Cmn

```
open fun [toString](https://developer.android.com/reference/kotlin/androidx/compose/material3/TextFieldLabelPosition.Attached#toString())(): String
```

> [!CAUTION]
> **This function is deprecated.**   
> Use Inside for the default filled TextField behavior, or Cutout for the default OutlinedTextField behavior.

## Public properties

### alwaysMinimize

Cmn

```
val alwaysMinimize: Boolean
```

> [!CAUTION]
> **This property is deprecated.**   
> Use Inside for the default filled TextField behavior, or Cutout for the default OutlinedTextField behavior.

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

Cmn

```
val expandedAlignment: Alignment.Horizontal
```

> [!CAUTION]
> **This property is deprecated.**   
> Use Inside for the default filled TextField behavior, or Cutout for the default OutlinedTextField behavior.

The horizontal alignment of the label when it is expanded.

### minimizedAlignment

Cmn

```
val minimizedAlignment: Alignment.Horizontal
```

> [!CAUTION]
> **This property is deprecated.**   
> Use Inside for the default filled TextField behavior, or Cutout for the default OutlinedTextField behavior.

The horizontal alignment of the label when it is minimized.