# ComposeMaterial3Flags

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/ComposeMaterial3Flags.kt+class:androidx.compose.material3.ComposeMaterial3Flags) Common/AllAndroid/JVM
- Cmn

  ```
  @ExperimentalMaterial3Api
  object ComposeMaterial3Flags
  ```

*** ** * ** ***

The object holding the **feature flags**.

Developers can enable or disable experimental or migration-based features by modifying the boolean values within this object. These flags are considered temporary. They are expected to be removed and should not be relied upon as permanent configuration.

**Usage:**

```kotlin
class MyApplication : Application() {
    override fun onCreate() {
        ComposeMaterial3Flags.someFeatureEnabled = true
        super.onCreate()
    }
}
```

## Summary

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/ComposeMaterial3Flags#isAnchoredDraggableComponentsInvalidationFixEnabled()` This flag affects Material3 components that use `https://developer.android.com/reference/kotlin/androidx/compose/foundation/gestures/anchoredDraggable.modifier#(androidx.compose.ui.Modifier).anchoredDraggable(androidx.compose.foundation.gestures.AnchoredDraggableState,kotlin.Boolean,androidx.compose.foundation.gestures.Orientation,kotlin.Boolean,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.compose.foundation.OverscrollEffect,androidx.compose.foundation.gestures.FlingBehavior)`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/ComposeMaterial3Flags#isAnchoredDraggableComponentsStrictOffsetCheckEnabled()` This flag affects Material3 components that use `https://developer.android.com/reference/kotlin/androidx/compose/foundation/gestures/anchoredDraggable.modifier#(androidx.compose.ui.Modifier).anchoredDraggable(androidx.compose.foundation.gestures.AnchoredDraggableState,kotlin.Boolean,androidx.compose.foundation.gestures.Orientation,kotlin.Boolean,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.compose.foundation.OverscrollEffect,androidx.compose.foundation.gestures.FlingBehavior)`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/ComposeMaterial3Flags#isBottomSheetPartiallyExpandedDeterministicEnabled()` This flag affects `https://developer.android.com/reference/kotlin/androidx/compose/material3/BottomSheet.composable#BottomSheet(androidx.compose.ui.Modifier,androidx.compose.material3.SheetState,kotlin.Function0,androidx.compose.ui.unit.Dp,kotlin.Boolean,kotlin.Boolean,kotlin.Function0,kotlin.Function0,androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,kotlin.Function1)` and `https://developer.android.com/reference/kotlin/androidx/compose/material3/ModalBottomSheet.composable#ModalBottomSheet(kotlin.Function0,androidx.compose.ui.Modifier,androidx.compose.material3.SheetState,androidx.compose.ui.unit.Dp,kotlin.Boolean,androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.unit.Dp,androidx.compose.ui.graphics.Color,kotlin.Function0,kotlin.Function0,androidx.compose.material3.ModalBottomSheetProperties,kotlin.Function1)`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/ComposeMaterial3Flags#isCheckboxStylingFixEnabled()` When the flag is `true`, the `https://developer.android.com/reference/kotlin/androidx/compose/material3/Checkbox.composable#Checkbox(kotlin.Boolean,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.compose.material3.CheckboxColors,androidx.compose.foundation.interaction.MutableInteractionSource)` will use Material Design 3 styling, including updated colors and container sizing. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/ComposeMaterial3Flags#isExpressiveListItemHeightBasedOnTextLinesFixEnabled()` This flag affects overloads of `https://developer.android.com/reference/kotlin/androidx/compose/material3/ListItem.composable#ListItem(kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Function0,kotlin.Function0,kotlin.Function0,kotlin.Function0,androidx.compose.material3.ListItemColors,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)` and `https://developer.android.com/reference/kotlin/androidx/compose/material3/SegmentedListItem.composable#SegmentedListItem(androidx.compose.material3.ListItemShapes,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.Function0,kotlin.Function0,kotlin.Function0,kotlin.Function0,androidx.compose.ui.Alignment.Vertical,androidx.compose.material3.ListItemColors,androidx.compose.material3.ListItemElevation,androidx.compose.foundation.layout.PaddingValues,kotlin.Function0)` that use expressive styling. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/ComposeMaterial3Flags#isModalBottomSheetStateRestorationFixEnabled()` When true (default), ModalBottomSheet will only trigger its initial entrance animation when `https://developer.android.com/reference/kotlin/androidx/compose/material3/SheetState#targetValue()` is `https://developer.android.com/reference/kotlin/androidx/compose/material3/SheetValue#Hidden`, preserving restored state (e.g. expanded state) across configuration changes or process recreation. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/ComposeMaterial3Flags#isPrecisionPointerComponentSizingEnabled()` When this flag is true and a precision pointer is present, components are resized accordingly | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/ComposeMaterial3Flags#isSnackbarStylingFixEnabled()` When this flag is `true`, the `https://developer.android.com/reference/kotlin/androidx/compose/material3/Snackbar.composable#Snackbar(androidx.compose.ui.Modifier,kotlin.Function0,kotlin.Function0,kotlin.Boolean,androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,kotlin.Function0)` component will use an updated layout implementation that correctly handles vertical alignment for multi-line text. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/ComposeMaterial3Flags#isUpdatedTimepickerToggleEnabled()` This flag affects `https://developer.android.com/reference/kotlin/androidx/compose/material3/TimePicker.composable#TimePicker(androidx.compose.material3.TimePickerState,androidx.compose.ui.Modifier,androidx.compose.material3.TimePickerColors,androidx.compose.material3.TimePickerLayoutType)`. | Cmn |

## Public properties

### isAnchoredDraggableComponentsInvalidationFixEnabled

Cmn

```
var isAnchoredDraggableComponentsInvalidationFixEnabled: Boolean
```

This flag affects Material3 components that use `https://developer.android.com/reference/kotlin/androidx/compose/foundation/gestures/anchoredDraggable.modifier#(androidx.compose.ui.Modifier).anchoredDraggable(androidx.compose.foundation.gestures.AnchoredDraggableState,kotlin.Boolean,androidx.compose.foundation.gestures.Orientation,kotlin.Boolean,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.compose.foundation.OverscrollEffect,androidx.compose.foundation.gestures.FlingBehavior)`. Those are: `https://developer.android.com/reference/kotlin/androidx/compose/material3/BottomSheetScaffold.composable#BottomSheetScaffold(kotlin.Function1,androidx.compose.ui.Modifier,androidx.compose.material3.BottomSheetScaffoldState,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,kotlin.Function0,kotlin.Boolean,kotlin.Function0,kotlin.Function1,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,kotlin.Function1)`, `https://developer.android.com/reference/kotlin/androidx/compose/material3/ModalBottomSheet.composable#ModalBottomSheet(kotlin.Function0,androidx.compose.ui.Modifier,androidx.compose.material3.SheetState,androidx.compose.ui.unit.Dp,kotlin.Boolean,androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.unit.Dp,androidx.compose.ui.graphics.Color,kotlin.Function0,kotlin.Function0,androidx.compose.material3.ModalBottomSheetProperties,kotlin.Function1)`, `https://developer.android.com/reference/kotlin/androidx/compose/material3/SwipeToDismissBox.composable#SwipeToDismissBox(androidx.compose.material3.SwipeToDismissBoxState,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.Boolean,kotlin.Boolean,kotlin.Function1,kotlin.Function1)` and `https://developer.android.com/reference/kotlin/androidx/compose/material3/WideNavigationRail.composable#WideNavigationRail(androidx.compose.ui.Modifier,androidx.compose.material3.WideNavigationRailState,androidx.compose.ui.graphics.Shape,androidx.compose.material3.WideNavigationRailColors,kotlin.Function0,androidx.compose.foundation.layout.WindowInsets,androidx.compose.foundation.layout.Arrangement.Vertical,androidx.compose.foundation.layout.PaddingValues,kotlin.Function0)`.

When this flag is set to true, these components will recalculate their anchor points when the instance of their respective state changes and remeasure. When this flag is set to false, no additional remeasure is performed when the state instance changes.

### isAnchoredDraggableComponentsStrictOffsetCheckEnabled

Cmn

```
var isAnchoredDraggableComponentsStrictOffsetCheckEnabled: Boolean
```

This flag affects Material3 components that use `https://developer.android.com/reference/kotlin/androidx/compose/foundation/gestures/anchoredDraggable.modifier#(androidx.compose.ui.Modifier).anchoredDraggable(androidx.compose.foundation.gestures.AnchoredDraggableState,kotlin.Boolean,androidx.compose.foundation.gestures.Orientation,kotlin.Boolean,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.compose.foundation.OverscrollEffect,androidx.compose.foundation.gestures.FlingBehavior)`. Those are: `https://developer.android.com/reference/kotlin/androidx/compose/material3/BottomSheetScaffold.composable#BottomSheetScaffold(kotlin.Function1,androidx.compose.ui.Modifier,androidx.compose.material3.BottomSheetScaffoldState,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,kotlin.Function0,kotlin.Boolean,kotlin.Function0,kotlin.Function1,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,kotlin.Function1)`, `https://developer.android.com/reference/kotlin/androidx/compose/material3/ModalBottomSheet.composable#ModalBottomSheet(kotlin.Function0,androidx.compose.ui.Modifier,androidx.compose.material3.SheetState,androidx.compose.ui.unit.Dp,kotlin.Boolean,androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.unit.Dp,androidx.compose.ui.graphics.Color,kotlin.Function0,kotlin.Function0,androidx.compose.material3.ModalBottomSheetProperties,kotlin.Function1)`, `https://developer.android.com/reference/kotlin/androidx/compose/material3/SwipeToDismissBox.composable#SwipeToDismissBox(androidx.compose.material3.SwipeToDismissBoxState,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.Boolean,kotlin.Boolean,kotlin.Function1,kotlin.Function1)` and `https://developer.android.com/reference/kotlin/androidx/compose/material3/WideNavigationRail.composable#WideNavigationRail(androidx.compose.ui.Modifier,androidx.compose.material3.WideNavigationRailState,androidx.compose.ui.graphics.Shape,androidx.compose.material3.WideNavigationRailColors,kotlin.Function0,androidx.compose.foundation.layout.WindowInsets,androidx.compose.foundation.layout.Arrangement.Vertical,androidx.compose.foundation.layout.PaddingValues,kotlin.Function0)`.

When this flag is set to true, these components will require their internal offset to be initialized during measurement before they are placed, throwing an exception if the offset was not initialized in placement. When this flag is set to false, the component will not throw an exception and won't place the content while their internal offset is not initialized. The content will be placed as soon as the offset is initialized.

This flag can be helpful if you are encountering a crash with an uninitialized offset (such as https://issuetracker.google.com/issues/477038695) and will be removed when the associated bugs are fixed.

### isBottomSheetPartiallyExpandedDeterministicEnabled

Cmn

```
var isBottomSheetPartiallyExpandedDeterministicEnabled: Boolean
```

This flag affects `https://developer.android.com/reference/kotlin/androidx/compose/material3/BottomSheet.composable#BottomSheet(androidx.compose.ui.Modifier,androidx.compose.material3.SheetState,kotlin.Function0,androidx.compose.ui.unit.Dp,kotlin.Boolean,kotlin.Boolean,kotlin.Function0,kotlin.Function0,androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,kotlin.Function1)` and `https://developer.android.com/reference/kotlin/androidx/compose/material3/ModalBottomSheet.composable#ModalBottomSheet(kotlin.Function0,androidx.compose.ui.Modifier,androidx.compose.material3.SheetState,androidx.compose.ui.unit.Dp,kotlin.Boolean,androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.unit.Dp,androidx.compose.ui.graphics.Color,kotlin.Function0,kotlin.Function0,androidx.compose.material3.ModalBottomSheetProperties,kotlin.Function1)`.

When true (default), BottomSheet will always include `https://developer.android.com/reference/kotlin/androidx/compose/material3/SheetValue#PartiallyExpanded` if provided in `https://developer.android.com/reference/kotlin/androidx/compose/material3/SheetState#enabledValues()`, converging it with `https://developer.android.com/reference/kotlin/androidx/compose/material3/SheetValue#Expanded` for small sheets.

When false, the legacy auto-exclusion logic is enabled.

### isCheckboxStylingFixEnabled

Cmn

```
var isCheckboxStylingFixEnabled: Boolean
```

When the flag is `true`, the `https://developer.android.com/reference/kotlin/androidx/compose/material3/Checkbox.composable#Checkbox(kotlin.Boolean,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.compose.material3.CheckboxColors,androidx.compose.foundation.interaction.MutableInteractionSource)` will use Material Design 3 styling, including updated colors and container sizing. When `false`, it uses older Material Design 2 styling. See the [Material Design 2 Checkboxes Specs](https://m2.material.io/components/checkboxes#specs) and the [Material Design 3 Checkboxes Specs](https://m3.material.io/components/checkbox/specs).

### isExpressiveListItemHeightBasedOnTextLinesFixEnabled

Cmn

```
var isExpressiveListItemHeightBasedOnTextLinesFixEnabled: Boolean
```

This flag affects overloads of `https://developer.android.com/reference/kotlin/androidx/compose/material3/ListItem.composable#ListItem(kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Function0,kotlin.Function0,kotlin.Function0,kotlin.Function0,androidx.compose.material3.ListItemColors,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)` and `https://developer.android.com/reference/kotlin/androidx/compose/material3/SegmentedListItem.composable#SegmentedListItem(androidx.compose.material3.ListItemShapes,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.Function0,kotlin.Function0,kotlin.Function0,kotlin.Function0,androidx.compose.ui.Alignment.Vertical,androidx.compose.material3.ListItemColors,androidx.compose.material3.ListItemElevation,androidx.compose.foundation.layout.PaddingValues,kotlin.Function0)` that use expressive styling.

When true (default), list item minimum height will depend on the lines of text in its content.

When false, the number of lines in a list item has no effect on its minimum height.

### isModalBottomSheetStateRestorationFixEnabled

Cmn

```
var isModalBottomSheetStateRestorationFixEnabled: Boolean
```

When true (default), ModalBottomSheet will only trigger its initial entrance animation when `https://developer.android.com/reference/kotlin/androidx/compose/material3/SheetState#targetValue()` is `https://developer.android.com/reference/kotlin/androidx/compose/material3/SheetValue#Hidden`, preserving restored state (e.g. expanded state) across configuration changes or process recreation.

When false, the legacy behavior is used where show() is called unconditionally.

### isPrecisionPointerComponentSizingEnabled

Cmn

```
var isPrecisionPointerComponentSizingEnabled: Boolean
```

When this flag is true and a precision pointer is present, components are resized accordingly

### isSnackbarStylingFixEnabled

Cmn

```
var isSnackbarStylingFixEnabled: Boolean
```

When this flag is `true`, the `https://developer.android.com/reference/kotlin/androidx/compose/material3/Snackbar.composable#Snackbar(androidx.compose.ui.Modifier,kotlin.Function0,kotlin.Function0,kotlin.Boolean,androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,kotlin.Function0)` component will use an updated layout implementation that correctly handles vertical alignment for multi-line text.

### isUpdatedTimepickerToggleEnabled

Cmn

```
var isUpdatedTimepickerToggleEnabled: Boolean
```

This flag affects `https://developer.android.com/reference/kotlin/androidx/compose/material3/TimePicker.composable#TimePicker(androidx.compose.material3.TimePickerState,androidx.compose.ui.Modifier,androidx.compose.material3.TimePickerColors,androidx.compose.material3.TimePickerLayoutType)`.

When true (default), TimePicker AM/PM toggle buttons will use shape morph buttons and bold the text of the selected button.

When false, the legacy AM/PM toggle items are displayed.