Generated banner for Wear Compose M3
Generated logo for Wear Compose M3

Wear Compose M3

Android (Google)OfficialCreated by Google LLCDistributed by Android (Google)

  • Skill
  • Tool integration
  • Software development
  • Apache-2.0
  • No issues found

From the author

Guidance for Wear OS Compose Material3 (Wear Compose Material 3 / Wear Compose Material3) watch and wearable apps. Covers creating, updating, and migrating projects (Material 2.5 and Horologist migration) using androidx.wear.compose.material3, androidx.wear.compose.foundation, and androidx.wear.compose.navigation3, including AppScaffold, ScreenScaffold, TransformingLazyColumn, ambient mode, and previews.
— the description by Google LLC

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill provides essential guidance for developers building or migrating Wear OS applications to the Material 3 (M3) design system. It covers the integration of androidx.wear.compose.material3, foundation, and navigation libraries, offering best practices for component usage, project migration from Material 2.5 or Horologist, and implementation of key Wear OS features like ambient mode and scaffold structures.

What it does

  • Provides migration paths from Material 2.5 and Horologist to Wear Compose M3.
  • Defines mandatory project configuration for Kotlin, Compose compiler, and SDK versions.
  • Maps legacy components to their modern M3 equivalents.
  • Offers a comprehensive reference table for canonical component samples.
  • Guides developers on implementing scaffold structures and ambient mode.
  • Enforces strict versioning and build validation protocols.

When to use it

  • When starting a new Wear OS project using Compose Material 3.
  • When migrating an existing Wear OS app from Material 2.5 or Horologist.
  • When updating dependencies for Wear Compose libraries.
  • When looking for canonical implementation samples for M3 components.

Advantages

  • Ensures consistency with official Google Material 3 design standards.
  • Reduces migration friction through clear component mapping.
  • Promotes stable build practices by enforcing version compliance.
  • Centralizes access to verified component samples and implementation patterns.

Usage examples

“How do I migrate my Wear OS app from Material 2.5 to Material 3?”
The agent will guide you through updating your dependencies, replacing legacy components like Chip with Button, and updating your MaterialTheme implementation to use ColorScheme and MotionScheme.
“What is the M3 equivalent for ScalingLazyColumn?”
The agent will advise using TransformingLazyColumn and provide links to the relevant samples for implementation.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/android/wear-compose-m3/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip wear-compose-m3.zip -d .agents/skills

Documentation by Google LLC

Prerequisites and compatibility

  1. Current Wear OS Compose version in-use: To find the installed library version, read gradle/libs.versions.toml or build.gradle.kts directly. Don't run ./gradlew dependencies or other shell commands to resolve versions.

  2. Wear OS Compose Material3 version: If an internal tool is available to establish the latest stable version {VERSION} of androidx.wear.compose:compose-material3, use that tool.

  3. Strict compliance: If a version is listed as stable, you MUST use it, unless overridden by the user. Do not downgrade based on initial "Unresolved reference" errors in the editor or outdated web search results.

  4. Kotlin & Compose compiler: Use Kotlin 2.0.0+ with the org.jetbrains.kotlin.plugin.compose Gradle plugin.

  5. Min SDK: Ensure minSdk is at least 25.

  6. Compile SDK & AGP: Ensure compileSdk and AGP meet the library's AAR metadata floors (compileSdk >= 35 and AGP >= 8.6.0 for 1.6.x; compileSdk >= 37 and AGP >= 9.1.0 for 1.7.x).

Gotchas

  1. Mandatory sync and validation: After updating versions in libs.versions.toml or build.gradle.kts, perform a Gradle sync (or ./gradlew assembleDebug) before refactoring, and run ./gradlew assembleDebug after refactoring to verify the build.

  2. Prohibition of guessing (error protocol): If you encounter an 'Unresolved Reference' or API mismatch after a successful sync, do not attempt to 'fix' it by downgrading the library version.

Capabilities and tools

Capability 1: Migration, updates, and adding features

Use this guidance when migrating from an older version of Wear OS Compose or Horologist, updating an existing Wear Compose Material3 project, or adding features.

  1. Unless otherwise indicated by the developer, use the latest stable version of Wear Compose Material3 from {VERSION} (superseding any literal version strings in the migration guide).

  2. When migrating from Material 2.5 or Horologist, read the migration guide and use its official component mappings.

  3. Before refactoring any component (for example, Chip -> Button), check the parameter names, slot types, and "Expressive" design tokens.

  4. Do not use the Horologist Composables, Compose Layout, or Compose Material libraries; replace Horologist components with Wear Compose M3 equivalents (AppScaffold -> M3 AppScaffold, ScreenScaffold -> M3 ScreenScaffold, ScalingLazyColumn -> TransformingLazyColumn, ResponsiveListHeader -> ListHeader, PagerScreen -> HorizontalPagerScaffold, Chip -> Button, Confirmation -> ConfirmationDialog).

  5. Always check against the component guidance in Capability 3.

  6. Expect screenshot tests to fail when migrating or updating components: expected defaults for padding and positioning will have changed. Do not seek to artificially match the previous screenshot, but give preference to the Material3 defaults.

Capability 2: Component samples

Use this table of reference to find canonical samples for Wear Compose components. When working with a Wear Compose component, you must use the samples linked from the table to ensure you know how to correctly use it.

Important: Symbols marked with [alpha], [beta], or [rc] are only available in that pre-release track and are not in stable {VERSION}. Do not use them unless the project explicitly targets that pre-release version.

Material 3 components in androidx.wear.compose.material3.*
Component / SymbolReference Samples
AlertDialog, AlertDialogDefaultsAlertDialogSample
AnimatedPage, HorizontalPagerScaffold, VerticalPagerScaffoldOneHandedGestureSamples, PageIndicatorSample, PagerScaffoldSample
AnimatedText, rememberAnimatedTextFontRegistryAnimatedTextSample
AppCardCardSample
AppScaffoldListHeaderSample, PagerScaffoldSample, ScaffoldSample, SurfaceTransformationSample, TransformingLazyColumnNotificationsSample, TransformingLazyColumnSample
ArcProgressIndicator, ArcProgressIndicatorDefaults, CircularProgressIndicator, CircularProgressIndicatorDefaults, ProgressIndicatorDefaults, SegmentedCircularProgressIndicator, drawCircularProgressIndicatorProgressIndicatorSample
ButtonAlertDialogSample, AnimatedTextSample, ButtonGroupSample, ButtonSample, DatePickerSample, DynamicColorSchemeSample, FadingExpandingLabelSample, ListHeaderSample, OneHandedGestureSamples, PageIndicatorSample, PagerScaffoldSample, PickerSample, ScaffoldSample, ScrollIndicatorSample, StepperSample, SurfaceTransformationSample, SwipeDismissableSceneStrategySample, SwipeToRevealSample, TimePickerSample, TransformationSpecSample, TransformingLazyColumnSample, TransformingLazyColumnSample
ButtonDefaultsButtonSample, CurvedTextSamples, DynamicColorSchemeSample, EdgeButtonSample, ListHeaderSample, OneHandedGestureSamples, PlaceholderSample, ScaffoldSample, ScrollAwaySample, ScrollIndicatorSample, SurfaceTransformationSample, TextButtonSample, TransformationSpecSample, TransformingLazyColumnSample, TransformingLazyColumnSample
ButtonGroupButtonGroupSample, TransformationSpecSample
CardCardSample, SwipeDismissableSceneStrategySample, SwipeToRevealSample, TransformingLazyColumnSample
CardDefaultsCardSample, SurfaceTransformationSample, SwipeToRevealSample, TransformingLazyColumnSample, TransformingLazyColumnSample
CheckboxButtonCheckboxButtonSample, SwipeToDismissBoxSample
ChildButton, OutlinedButtonButtonSample
ColorScheme, dynamicColorSchemeDynamicColorSchemeSample
CompactButton, CompactButtonDefaultsButtonSample, TransformingLazyColumnSample
ConfirmationDialog, ConfirmationDialogDefaults, FailureConfirmationDialog, SuccessConfirmationDialog, confirmationDialogCurvedTextConfirmationDialogSample
CurvedTextDefaultsCurvedTextSamples
DatePicker, DatePickerTypeDatePickerSample
EdgeButtonEdgeButtonSample, OneHandedGestureSamples, ScaffoldSample, SwipeDismissableSceneStrategySample, TransformingLazyColumnSample
EdgeButtonSizeEdgeButtonSample
FadingExpandingLabelFadingExpandingLabelSample
FilledIconButton, FilledTonalIconButton, IconButtonColors, IconButtonShapes, OutlinedIconButtonIconButtonSample
FilledTonalButtonAlertDialogSample, ButtonSample, ConfirmationDialogSample, OpenOnPhoneDialogSample, PlaceholderSample, ScrollAwaySample, SwipeToDismissBoxSample
HorizontalPageIndicator, VerticalPageIndicatorPageIndicatorSample
IconAlertDialogSample, ButtonSample, CardSample, CheckboxButtonSample, ConfirmationDialogSample, CurvedTextSamples, DatePickerSample, EdgeButtonSample, IconButtonSample, ListHeaderSample, PlaceholderSample, ProgressIndicatorSample, RadioButtonSample, SwipeToRevealSample, SwitchButtonSample, TimePickerSample
IconButtonIconButtonSample, LevelIndicatorSample, ProgressIndicatorSample
IconButtonDefaultsIconButtonSample, ProgressIndicatorSample
IconToggleButton, IconToggleButtonDefaultsIconToggleButtonSample
LevelIndicatorLevelIndicatorSample
LinearProgressIndicatorLinearProgressIndicatorSample
ListHeaderListHeaderSample, ScrollAwaySample, SwipeDismissableSceneStrategySample, TransformingLazyColumnNotificationsSample, TransformingLazyColumnSample
ListHeaderDefaultsListHeaderSample, ScrollAwaySample, TransformingLazyColumnSample
ListSubHeaderListHeaderSample
LocalOneHandedGestureEnabled, OneHandedGestureDefaults, OneHandedGestureHorizontalPageIndicator, OneHandedGesturePageIndicatorState, OneHandedGesturePriority, OneHandedGestureScrollIndicator, OneHandedGestureScrollIndicatorState, OneHandedGestureVerticalPageIndicatorOneHandedGestureSamples
MaterialThemeAlertDialogSample, ButtonSample, CardSample, CurvedTextSamples, DynamicColorSchemeSample, LinearProgressIndicatorSample, PagerScaffoldSample, ProgressIndicatorSample, SwipeToDismissBoxSample, TimeTextSample, TransformingLazyColumnNotificationsSample
OneHandedGestureAction, OneHandedGestureClickIndicator, OneHandedGestureClickIndicatorState, oneHandedGesture, rememberOneHandedGestureConfigurationButtonSample, CardSample, OneHandedGestureSamples
OpenOnPhoneDialog, OpenOnPhoneDialogDefaults, openOnPhoneDialogCurvedTextOpenOnPhoneDialogSample
OutlinedCardCardSample, TransformingLazyColumnSample
PagerScaffoldDefaultsPageIndicatorSample, PagerScaffoldSample
PickerPickerSample
PickerGroupPickerGroupSample
RadioButton, SplitRadioButtonRadioButtonSample
ResponsiveTransformationSpec, TransformationVariableSpecSurfaceTransformationSample, TransformationSpecSample
RevealValue, SwipeToReveal, SwipeToRevealDefaults, rememberRevealStateSwipeToRevealSample
ScreenScaffoldListHeaderSample, OneHandedGestureSamples, PagerScaffoldSample, ScaffoldSample, SurfaceTransformationSample, SwipeDismissableSceneStrategySample, TransformingLazyColumnNotificationsSample, TransformingLazyColumnSample
ScreenScaffoldDefaults, ScrollIndicatorScrollIndicatorSample
ScreenStage, scrollAwayScrollAwaySample
Slider, SliderDefaultsSliderSample
SplitCheckboxButtonCheckboxButtonSample
SplitSwitchButtonSwitchButtonSample
Stepper, StepperLevelIndicator, rangeSemanticsStepperSample
StepperDefaultsLevelIndicatorSample, StepperSample
SurfaceTransformationAlertDialogSample, DynamicColorSchemeSample, ListHeaderSample, ScaffoldSample, SurfaceTransformationSample, SwipeDismissableSceneStrategySample, TransformationSpecSample, TransformingLazyColumnNotificationsSample, TransformingLazyColumnSample, TransformingLazyColumnSample
SwipeToDismissBoxSwipeToDismissBoxSample
SwitchButtonAlertDialogSample, OneHandedGestureSamples, SwitchButtonSample
TextAlertDialogSample, AnimatedTextSample, ButtonGroupSample, ButtonSample, CardSample, CheckboxButtonSample, ConfirmationDialogSample, DatePickerSample, DynamicColorSchemeSample, EdgeButtonSample, ListHeaderSample, OneHandedGestureSamples, OpenOnPhoneDialogSample, PageIndicatorSample, PagerScaffoldSample, PickerGroupSample, PickerSample, PlaceholderSample, RadioButtonSample, ScaffoldSample, ScrollAwaySample, ScrollIndicatorSample, StepperSample, SurfaceTransformationSample, SwipeDismissableSceneStrategySample, SwipeToDismissBoxSample, SwipeToRevealSample, SwitchButtonSample, TextButtonSample, TextToggleButtonSample, TimePickerSample, TransformationSpecSample, TransformingLazyColumnNotificationsSample, TransformingLazyColumnSample
TextButtonTextButtonSample
TextButtonDefaultsTextButtonSample, TextToggleButtonSample
TextToggleButton, TextToggleButtonDefaults, touchTargetAwareSizeTextToggleButtonSample
TimePicker, TimePickerTypeTimePickerSample
TimeTextScrollAwaySample, ScrollIndicatorSample, TimeTextSample
TimeTextDefaults, timeTextCurvedTextTimeTextSample
TitleCardCardSample, SurfaceTransformationSample, SwipeDismissableSceneStrategySample, SwipeToRevealSample, TransformingLazyColumnNotificationsSample, TransformingLazyColumnSample
TransformationSpecTransformationSpecSample
curvedTextCurvedTextSamples, ScrollAwaySample, TimeTextSample
firstVisibleItemLayoutItemInfo, layoutItemInfoOf, rememberTransformingLazyColumnFirstLayoutItemProviderTransformingLazyColumnSample
placeholder, placeholderShimmer, rememberPlaceholderStatePlaceholderSample
rememberPickerStatePickerGroupSample, PickerSample
rememberTransformationSpec, transformedHeightAlertDialogSample, DynamicColorSchemeSample, ListHeaderSample, ScaffoldSample, SurfaceTransformationSample, SwipeDismissableSceneStrategySample, SwipeToRevealSample, TransformationSpecSample, TransformingLazyColumnNotificationsSample, TransformingLazyColumnSample, TransformingLazyColumnSample
timeTextSeparatorScrollAwaySample, TimeTextSample
Foundation components in androidx.wear.compose.foundation.*
Component / SymbolReference Samples
AmbientMode, LocalAmbientModeManager, rememberAmbientModeManagerAmbientModeSample, OneHandedGestureSamples
AmbientTickEffectAmbientModeSample
BasicSwipeToDismissBoxSwipeToDismissBoxSample
CurvedAlignment, CurvedTextStyle, angularGradientBackground, angularSize, basicCurvedText, clearAndSetSemantics, curvedColumn, padding, radialGradientBackground, radialSize, semantics, sizeCurvedWorldSample
CurvedDirection, CurvedLayout, angularSizeDp, background, curvedBox, curvedComposable, curvedRowCurvedTextSamples, CurvedWorldSample
CurvedModifierCurvedTextSamples, CurvedWorldSample, TimeTextSample
HorizontalPager, VerticalPager, rememberPagerStateOneHandedGestureSamples, PageIndicatorSample, PagerSamples, PagerScaffoldSample
PagerDefaultsPagerScaffoldSample
RotaryScrollableDefaultsPagerScaffoldSample, RotarySamples, TransformingLazyColumnSample
RotarySnapLayoutInfoProvider, rotaryScrollableRotarySamples
ScrollInfoProviderScrollAwaySample
SwipeToDismissValue, edgeSwipeToDismiss, rememberSwipeToDismissBoxStateSwipeToDismissBoxSample, SwipeToDismissBoxSample
TransformingLazyColumnDynamicColorSchemeSample, ListHeaderSample, OneHandedGestureSamples, ScaffoldSample, ScrollAwaySample, ScrollIndicatorSample, SurfaceTransformationSample, SwipeDismissableSceneStrategySample, SwipeToRevealSample, TransformationSpecSample, TransformingLazyColumnNotificationsSample, TransformingLazyColumnSample, TransformingLazyColumnSample
TransformingLazyColumnDefaultsTransformingLazyColumnSample
TransformingLazyColumnFirstLayoutItemProviderTransformingLazyColumnSample, TransformingLazyColumnSample
TransformingLazyColumnItemScrollProgressTransformationSpecSample
expandableButton, expandableItem, expandableItems, rememberExpandableStateExpandableSample
hierarchicalFocusGroupHierarchicalFocusSample
itemsSwipeDismissableSceneStrategySample, SwipeToRevealSample, TransformingLazyColumnNotificationsSample
itemsIndexedTransformingLazyColumnSample
rememberTransformingLazyColumnStateListHeaderSample, OneHandedGestureSamples, ScaffoldSample, ScrollAwaySample, ScrollIndicatorSample, SurfaceTransformationSample, SwipeDismissableSceneStrategySample, SwipeToRevealSample, TransformingLazyColumnNotificationsSample, TransformingLazyColumnSample, TransformingLazyColumnSample
requestFocusOnHierarchyActiveHierarchicalFocusSample, RotarySamples
weightCurvedWorldSample, TimeTextSample
Navigation 3 components in androidx.wear.compose.navigation3.*
Component / SymbolReference Samples
rememberSwipeDismissableSceneStrategySwipeDismissableSceneStrategySample
Capability 3: Component guidance

Mandatory: Use this capability as a checklist against any component use. It provides more holistic guidance on how to use each component in practice, beyond the component syntax.

  1. AppScaffold and ScreenScaffold

    • [ ] Use AppScaffold as the outer container, with ScreenScaffold children.

    • [ ] Use only ONE AppScaffold and any number of ScreenScaffold.

  2. ScalingLazyColumn - Use TransformingLazyColumn instead.

  3. TransformingLazyColumn - You will need the following imports:

    import androidx.wear.compose.foundation.lazy.TransformingLazyColumn
    import androidx.wear.compose.foundation.lazy.TransformingLazyColumnDefaults
    import androidx.wear.compose.foundation.lazy.rememberTransformingLazyColumnState
    // ...
    import androidx.wear.compose.material3.lazy.rememberTransformationSpec
    import androidx.wear.compose.material3.lazy.transformedHeight

    <br />

    Canonical example:

    val columnState = rememberTransformingLazyColumnState()
    val transformationSpec = rememberTransformationSpec()
    ScreenScaffold(
        scrollState = columnState
    ) { contentPadding ->
        TransformingLazyColumn(
            state = columnState,
            contentPadding = contentPadding
        ) {
            item {
                ListHeader(
                    modifier = Modifier
                        .fillMaxWidth()
                        .transformedHeight(this, transformationSpec)
                        .minimumVerticalContentPadding(ListHeaderDefaults.minimumTopListContentPadding),
                    transformation = SurfaceTransformation(transformationSpec)
                ) {
                    Text(text = "Header")
                }
            }
            // ... other items
            item {
                Button(
                    modifier = Modifier
                        .fillMaxWidth()
                        .transformedHeight(this, transformationSpec)
                        .minimumVerticalContentPadding(ButtonDefaults.minimumVerticalListContentPadding),
                    transformation = SurfaceTransformation(transformationSpec),
                    onClick = { /* ... */ },
                    icon = {
                        Icon(
                            imageVector = Icons.Default.Build,
                            contentDescription = "build",
                        )
                    },
                ) {
                    Text(
                        text = "Build",
                        maxLines = 1,
                        overflow = TextOverflow.Ellipsis,
                    )
                }
            }
        }
    }

    <br />

    • [ ] Use TransformingLazyColumn instead of ScalingLazyColumn.

    • [ ] You must pass the contentPadding parameter from ScreenScaffold to the TransformingLazyColumn.

    • [ ] Use the minimumVerticalContentPadding modifier to achieve required padding top and bottom.

      • This expects a value from defaults, such as ButtonDefaults, CardDefaults, ListHeaderDefaults.

      • Note: This is a scoped modifier available within TransformingLazyColumnItemScope.

    • [ ] Ensure items morph and scale (apply to components within TransformingLazyColumn, not the list itself):

      • [ ] Use Modifier.transformedHeight(this, transformationSpec).

      • [ ] Use transformation = SurfaceTransformation(transformationSpec).

    • [ ] If configuring a list for snapping, use flingBehavior and rotaryScrollableBehavior together:

    val columnState = rememberTransformingLazyColumnState()
    ScreenScaffold(scrollState = columnState) { contentPadding ->
        TransformingLazyColumn(
            state = columnState,
            flingBehavior = TransformingLazyColumnDefaults.snapFlingBehavior(columnState),
            rotaryScrollableBehavior = RotaryScrollableDefaults.snapBehavior(columnState)
        ) {
            // ...
            // ...
        }
    }

    <br />

  4. ScreenScaffold

    • [ ] Guard the scrollIndicator with !LocalScrollCaptureInProgress.current (androidx.compose.ui.platform).

  5. EdgeButton

    • [ ] Do NOT use as the final item within a TransformingLazyColumn. Instead, use the slot in ScreenScaffold.

    • [ ] When used in a TransformingLazyColumn, add the required overscroll behavior:

    val columnState = rememberTransformingLazyColumnState()
    ScreenScaffold(
        scrollState = columnState,
        edgeButton = {
            EdgeButton(
                onClick = { /* TODO */ },
                modifier = Modifier.scrollable(
                    columnState,
                    orientation = Orientation.Vertical,
                    reverseDirection = true,
                    // Apply overscroll to the EdgeButton for proper scrolling behavior.
                    overscrollEffect = rememberOverscrollEffect(),
                )
            ) {
                Text("More")
            }
        }
    ) { contentPadding ->
        TransformingLazyColumn(
            contentPadding = contentPadding,
            state = columnState,
        ) {
            // ...
            // ...
        }
    }

    <br />

  6. Column

    • [ ] USE as a direct child of ScreenScaffold if the screen will never scroll, even with the largest system font.

    • [ ] Use TransformingLazyColumn instead for all other cases.

  7. Styles

    • [ ] Do NOT hard-code text sizes, use typography from MaterialTheme.

    • [ ] Do NOT hard-code colors, use colorScheme from MaterialTheme.

  8. Use component defaults:

    • [ ] Components such as Button have a corresponding ButtonDefaults object.

    • [ ] Check for and use the *Defaults object for any component when working with padding and styling values, in preference to hard-coded values.

  9. Use Wear-specific preview annotations (androidx.wear.compose.ui.tooling.preview):

    • [ ] @WearPreviewDevices

    • [ ] @WearPreviewFontScales

    • [ ] Ensure the androidx.wear.compose:compose-ui-tooling dependency is included.

  10. Ambient mode

    • [ ] Use LocalAmbientModeManager (provided by CompositionLocalProvider and rememberAmbientModeManager()) instead of AmbientLifecycleObserver.

  11. Navigation

    • [ ] When adding navigation fresh, use Navigation3 (androidx.wear.compose:compose-navigation3).

    • [ ] Use rememberSwipeDismissableSceneStrategy() / SwipeDismissableSceneStrategy (androidx.wear.compose.navigation3).

  12. Comments

    • [ ] Where any Kotlin file has been modified, ensure that the existing comments are up to date and accurately reflect any changes to the implementation.

  13. HorizontalPager or VerticalPager

    • [ ] Use the Composable hierarchy in this order: AppScaffold, HorizontalPagerScaffold, HorizontalPager, AnimatedPage, ScreenScaffold. Or similarly for VerticalPager.

Files

references/android/training/wearables/compose/migrate-to-material3.md

Material 3 Expressive is the next evolution of Material Design. It includes updated theming, components, and personalization features like dynamic color.

This guide focuses on migrating from the Wear Compose Material 2.5 (androidx.wear.compose) Jetpack library to the Wear Compose Material 3 (androidx.wear.compose.material3) Jetpack library for apps.

[!NOTE] Note: This guide uses abbreviation "M3" to refer to the interchangeable terms of "Material 3 Expressive" and the equivalent Jetpack library for Compose on Wear OS (androidx.wear.compose.material3). The abbreviation "M2.5" is used to refer to the interchangeable terms of "Material 2.5" and the equivalent Jetpack library for Compose on Wear OS (androidx.wear.compose.material).

Approaches

For migrating your app code from M2.5 to M3, follow the same approach described in the Compose Material migration phone guidance, in particular:

Dependencies

M3 has a separate package and version to M2.5:

M2.5
implementation("androidx.wear.compose:compose-material:1.4.0")
M3
implementation("androidx.wear.compose:compose-material3:1.8.0-alpha02")

See the latest M3 versions on the Wear Compose releases page.

Wear Compose Foundation library version 1.8.0-alpha02 introduced some new components that are designed to work with Material 3 components. Similarly, SwipeDismissableNavHost from Wear Compose Navigation library has an updated animation when running on Wear OS 6 (API level 36) or higher. When updating to Wear Compose Material 3 version, we suggest to also update the Wear Compose Foundation and Navigation libraries:

implementation("androidx.wear.compose:compose-foundation:1.8.0-alpha02")
implementation("androidx.wear.compose:compose-navigation:1.8.0-alpha02")

Theme

In both M2.5 and M3, the theme composable is named MaterialTheme, but the import packages and parameters differ. In M3, the Colors parameter has been renamed to ColorScheme and MotionScheme has been introduced for implementing transitions.

M2.5
import androidx.wear.compose.material.MaterialTheme

MaterialTheme(
    colors = AppColors,
    typography = AppTypography,
    shapes = AppShapes,
    content = content
)
M3
import androidx.wear.compose.material3.MaterialTheme
// ...
    MaterialTheme(
        colorScheme = ColorScheme(),
        typography = Typography(),
        shapes = Shapes(),
        motionScheme = MotionScheme.standard(),
        content = { /*content here*/ }
    )

<br />

Color

The color system in M3 is significantly different from M2.5. The number of color parameters has increased, they have different names, and they map differently to M3 components. In Compose, this applies to the M2.5 Colors class, the M3 ColorScheme class, and related functions:

M2.5
import androidx.wear.compose.material.Colors

val appColorScheme: Colors = Colors(
   // M2.5 Color parameters
)
M3
import androidx.wear.compose.material3.ColorScheme
// ...
    val appColorScheme: ColorScheme = ColorScheme(
        // M3 ColorScheme parameters
    )

<br />

The following table describes the key differences between M2.5 and M3:

M2.5M3
ColorsHas been renamed to ColorScheme
13 colors29 colors
N/ANew dynamic color theming
N/ANew tertiary colors for more expression
Dynamic color theming

A new feature in M3 is dynamic color theming. If users change the watch face colors, the colors in the UI change to match.

Use the dynamicColorScheme function to implement dynamic color scheme and provide a defaultColorScheme as a fallback in case dynamic color scheme is not available.

@Composable
fun myApp() {
    val dynamicColorScheme = dynamicColorScheme(LocalContext.current)
    MaterialTheme(colorScheme = dynamicColorScheme ?: myBrandColors) {}
}

internal val myBrandColors: ColorScheme = ColorScheme( /* Specify colors here */)

<br />

Typography

The typography system in M3 is different from M2.5 and it includes the following features:

  • Nine new text styles

  • Flex fonts, which allow for customization of the type scales for different weights, widths, and roundness

  • AnimatedText, which uses flex fonts

M2.5
import androidx.wear.compose.material.Typography

val Typography = Typography(
   // M2.5 TextStyle parameters
)
M3
import androidx.wear.compose.material3.Typography

val Typography = Typography(
    // M3 TextStyle parameters
)

<br />

Flex fonts

Flex Fonts allow designers to specify the type width and weight for specific sizes.

Text styles

The following TextStyles are available in M3. These are employed by default by various M3 components.

TypographyTextStyle
DisplaydisplayLarge, displayMedium, displaySmall
TitletitleLarge, titleMedium, titleSmall
LabellabelLarge, labelMedium, labelSmall
BodybodyLarge, bodyMedium, bodySmall, bodyExtraSmall
NumeralnumeralExtraLarge, numeralLarge, numeralMedium, numeralSmall, numeralExtraSmall
ArcarcLarge, arcMedium, arcSmall
Shape

The shape system in M3 is different from M2.5. The number of shape parameters has increased, they're named differently, and they map differently to M3 components. The following shape sizes are available:

  • Extra-small

  • Small

  • Medium

  • Large

  • Extra-large

In Compose, this applies to the M2.5 Shapes class and the M3 Shapes class:

M2.5
import androidx.wear.compose.material.Shapes

val Shapes = Shapes(
   // M2.5 Shapes parameters
)
M3
import androidx.wear.compose.material3.Shapes

val Shapes = Shapes(
    // M3 Shapes parameters
)

<br />

[!NOTE] Note: For shapes, we generally recommend using the default Material 3 Wear shapes which are optimized for round devices.

Use the Shapes parameter mapping from Migrate from Material 2 to Material 3 in Compose as a starting point.

Shape morphing

M3 introduces Shape Morphing: shapes now morph in response to interactions.

Shape Morphing behavior is available as a variation on a number of round buttons, see the following list of buttons that support Shape Morphing:

ButtonsShape morphing function
IconButtonIconButtonDefaults.animatedShapes animates the icon button on press
IconToggleButtonIconToggleButtonDefaults.animatedShapes animates the icon toggle button on press and IconToggleButtonDefaults.variantAnimatedShapes animates the icon toggle button on press and check/uncheck
TextButtonTextButtonDefaults.animatedShapes animates the text button on press
TextToggleButtonTextToggleButtonDefaults.animatedShapes animates the text toggle on press and TextToggleButtonDefaults.variantAnimatedShapes animates the text toggle on press and check/uncheck

Components and Layout

Most components and layouts from M2.5 are available in M3. However, some M3 components and layouts didn't exist in M2.5. Furthermore, some M3 components have more variations than their equivalents in M2.5.

While some components require special considerations, the following function mappings are recommended as a starting point:

Material 2.5Material 3
androidx.wear.compose.material.dialog.Alertandroidx.wear.compose.material3.AlertDialog
androidx.wear.compose.material.Buttonandroidx.wear.compose.material3.IconButton or androidx.wear.compose.material3.TextButton
androidx.wear.compose.material.Cardandroidx.wear.compose.material3.Card
androidx.wear.compose.material.TitleCardandroidx.wear.compose.material3.TitleCard
androidx.wear.compose.material.AppCardandroidx.wear.compose.material3.AppCard
androidx.wear.compose.material.CheckboxNo M3 equivalent, migrate to androidx.wear.compose.material3.CheckboxButton or androidx.wear.compose.material3.SplitCheckboxButton
androidx.wear.compose.material.Chipandroidx.wear.compose.material3.Button or androidx.wear.compose.material3.OutlinedButton or androidx.wear.compose.material3.FilledTonalButton or androidx.wear.compose.material3.ChildButton
androidx.wear.compose.material.CompactChipandroidx.wear.compose.material3.CompactButton
androidx.wear.compose.material.InlineSliderandroidx.wear.compose.material3.Slider
androidx.wear.compose.material.LocalContentAlpha()Has been removed as not used by Text or Icon in Material 3
androidx.wear.compose.material.PositionIndicatorandroidx.wear.compose.material3.ScrollIndicator
androidx.wear.compose.material.RadioButtonNo M3 equivalent, migrate to androidx.wear.compose.material3.RadioButton or androidx.wear.compose.material3.SplitRadioButton
androidx.wear.compose.material.SwipeToRevealCardandroidx.wear.compose.material3.SwipeToReveal
androidx.wear.compose.material.SwipeToRevealChipandroidx.wear.compose.material3.SwipeToReveal
androidx.wear.compose.material.Scaffoldandroidx.wear.compose.material3.AppScaffold and androidx.wear.compose.material3.ScreenScaffold
androidx.wear.compose.material.SplitToggleChipNo M3 equivalent, migrate to androidx.wear.compose.material3.SplitCheckboxButton, androidx.wear.compose.material3.SplitSwitchButton, or androidx.wear.compose.material3.SplitRadioButton
androidx.wear.compose.material.SwitchNo M3 equivalent, migrate to androidx.wear.compose.material3.SwitchButton or androidx.wear.compose.material3.SplitSwitchButton
androidx.wear.compose.material.ToggleButtonandroidx.wear.compose.material3.IconToggleButton or androidx.wear.compose.material3.TextToggleButton
androidx.wear.compose.material.ToggleChipandroidx.wear.compose.material3.CheckboxButton or androidx.wear.compose.material3.RadioButton or androidx.wear.compose.material3.SwitchButton
androidx.wear.compose.material.VignetteRemoved as not included in Material 3 Expressive design for Wear OS

Here is a list of common Material 3 components and their Material 2.5 equivalents:

Material 3Material 2.5 equivalent component (if not new in M3)
androidx.wear.compose.material3.AlertDialogandroidx.wear.compose.material.dialog.Alert
androidx.wear.compose.material3.AnimatedPageNew
androidx.wear.compose.material3.AnimatedTextNew
androidx.wear.compose.material3.AppScaffoldandroidx.wear.compose.material.Scaffold (with androidx.wear.compose.material3.ScreenScaffold )
androidx.wear.compose.material3.Buttonandroidx.wear.compose.material.Chip
androidx.wear.compose.material3.ButtonGroupNew
androidx.wear.compose.material3.Cardandroidx.wear.compose.material.Card
androidx.wear.compose.material3.CheckboxButtonandroidx.wear.compose.material.ToggleChip with a checkbox toggle control
androidx.wear.compose.material3.ChildButtonandroidx.wear.compose.material.Chip (only when no background is required)
androidx.wear.compose.material3.CircularProgressIndicatorandroidx.wear.compose.material.CircularProgressIndicator
androidx.wear.compose.material3.CompactButtonandroidx.wear.compose.material.CompactChip
androidx.wear.compose.material3.ConfirmationDialogandroidx.wear.compose.material.dialog.Confirmation
androidx.wear.compose.material3.curvedTextandroidx.wear.compose.material.curvedText
androidx.wear.compose.material3.DatePickerNew
androidx.wear.compose.material3.Dialogandroidx.wear.compose.material.dialog.Dialog
androidx.wear.compose.material3.EdgeButtonNew
androidx.wear.compose.material3.FadingExpandingLabelNew
androidx.wear.compose.material3.FilledTonalButtonandroidx.wear.compose.material.Chip when a tonal button background is required
androidx.wear.compose.material3.HorizontalPageIndicatorandroidx.wear.compose.material.HorizontalPageIndicator
androidx.wear.compose.material3.HorizontalPagerScaffoldNew
androidx.wear.compose.material3.Iconandroidx.wear.compose.material.Icon
androidx.wear.compose.material3.IconButtonandroidx.wear.compose.material.Button
androidx.wear.compose.material3.IconToggleButtonandroidx.wear.compose.material.ToggleButton
androidx.wear.compose.material3.LevelIndicatorNew
androidx.wear.compose.material3.LinearProgressIndicatorNew
androidx.wear.compose.material3.ListHeaderandroidx.wear.compose.material.ListHeader
androidx.wear.compose.material3.ListSubHeaderNew
androidx.wear.compose.material3.MaterialThemeandroidx.wear.compose.material.MaterialTheme
androidx.wear.compose.material3.OpenOnPhoneDialogNew
androidx.wear.compose.material3.Pickerandroidx.wear.compose.material.Picker
androidx.wear.compose.material3.PickerGroupandroidx.wear.compose.material.PickerGroup
androidx.wear.compose.material3.RadioButtonandroidx.wear.compose.material.ToggleChip with a radio button toggle control
androidx.wear.compose.material3.ScreenScaffoldandroidx.wear.compose.material.Scaffold (with androidx.wear.compose.material3.AppScaffold)
androidx.wear.compose.material3.ScrollIndicatorandroidx.wear.compose.material.PositionIndicator
androidx.wear.compose.material3.scrollAwayandroidx.wear.compose.material.scrollAway
androidx.wear.compose.material3.SegmentedCircularProgressIndicatorNew
androidx.wear.compose.material3.Sliderandroidx.wear.compose.material.InlineSlider
androidx.wear.compose.material3.SplitRadioButtonandroidx.wear.compose.material.SplitToggleChip
androidx.wear.compose.material3.SplitCheckboxButtonandroidx.wear.compose.material.SplitToggleChip
androidx.wear.compose.material3.SplitSwitchButtonandroidx.wear.compose.material.SplitToggleChip
androidx.wear.compose.material3.Stepperandroidx.wear.compose.material.Stepper
androidx.wear.compose.material3.SwipeToDismissBoxandroidx.wear.compose.material.SwipeToDismissBox
androidx.wear.compose.material3.SwipeToRevealandroidx.wear.compose.material.SwipeToRevealCard and androidx.wear.compose.material.SwipeToRevealChip
androidx.wear.compose.material3.SwitchButtonandroidx.wear.compose.material.ToggleChip with a switch toggle control
androidx.wear.compose.material3.Textandroidx.wear.compose.material.Text
androidx.wear.compose.material3.TextButtonandroidx.wear.compose.material.Button
androidx.wear.compose.material3.TextToggleButtonandroidx.wear.compose.material.ToggleButton
androidx.wear.compose.material3.TimeTextandroidx.wear.compose.material.TimeText
androidx.wear.compose.material3.VerticalPagerScaffoldNew

And finally a list of some relevant components from Wear Compose Foundation library:

Wear Compose Foundation 1.8.0-alpha02
androidx.wear.compose.foundation.hierarchicalFocusGroupUsed to annotate composables in an application, to keep track of the active part of the composition and coordinate focus.
androidx.wear.compose.foundation.pager.HorizontalPagerA horizontally scrolling pager, built on the Compose Foundation components with Wear-specific enhancements to improve performance and adherence to Wear OS guidelines.
androidx.wear.compose.foundation.pager.VerticalPagerA vertically scrolling pager, built on the Compose Foundation components with Wear-specific enhancements to improve performance and adherence to Wear OS guidelines.
androidx.wear.compose.foundation.lazy.TransformingLazyColumnCan be used instead of ScalingLazyColumn to add scroll transform effects to each item.
Buttons

Buttons in M3 are different from M2.5. The M2.5 Chip has been replaced by Button. Button implementation provides default values for Text maxLines and textAlign. Those default values can be overridden in the Text element.

M2.5
import androidx.wear.compose.material.Chip

//M2.5 Buttons
Chip(...)
CompactChip(...)
Button(...)
M3
//M3 Buttons
Button(onClick = { }){}
CompactButton(onClick = { }){}
IconButton(onClick = { }){}
TextButton(onClick = { }){}

<br />

M3 also includes new button variations. Check them out on the Compose Material 3 API reference overview.

M3 introduces a new button: EdgeButton. EdgeButton is available in 4 different sizes: extra small, small, medium, and large. EdgeButton implementation provide a default value for maxLines depending on the size which can be customized.

If you are using TransformingLazyColumn or ScalingLazyColumn, pass the EdgeButton into the ScreenScaffold so that it morphs, changing its shape with scrolling, instead of adding an EdgeButton as the final list item. See the following code to check how to use EdgeButton with ScreenScaffold and TransformingLazyColumn.

val state = rememberTransformingLazyColumnState()
ScreenScaffold(
    scrollState = state,
    edgeButton = {
        EdgeButton(
            onClick = { },
            modifier = Modifier.scrollable(
                state,
                orientation = Orientation.Vertical,
                reverseDirection = true,
                // Apply overscroll to the EdgeButton for proper scrolling behavior.
                overscrollEffect = rememberOverscrollEffect(),
            ),
        ) {
            Text(stringResource(R.string.show))
        }
    },
) { contentPadding ->
    TransformingLazyColumn(state = state, contentPadding = contentPadding) {
        // additional code here
        // ...
    }
}

<br />

Scaffold

Scaffold in M3 is different from M2.5. In M3, AppScaffold and the new ScreenScaffold composable have replaced Scaffold. AppScaffold and ScreenScaffold lay out the structure of a screen and coordinate transitions of the ScrollIndicator and TimeText components.

AppScaffold allows static screen elements such as TimeText to remain visible during in-app transitions such as swipe-to-dismiss. It provides a slot for the main application content, which will usually be supplied by a navigation component such as SwipeDismissableNavHost

You declare one AppScaffold for Activity and use a ScreenScaffold for each Screen. AppScaffold adds a default TimeTextcomponent to the screens. You can override it if you want to customize it by using the timeText parameter.

M2.5
import androidx.wear.compose.material.Scaffold

Scaffold {...}
M3
    AppScaffold {
        val navController = rememberSwipeDismissableNavController()
        SwipeDismissableNavHost(
            navController = navController,
            startDestination = "message_list"
        ) {
            composable("message_list") {
                MessageList(onMessageClick = { id ->
                    navController.navigate("message_detail/$id")
                })
            }
            composable("message_detail/{id}") {
                MessageDetail(id = it.arguments?.getString("id")!!)
            }
        }
    }
}

// Implementation of one of the screens in the navigation
@Composable
fun MessageDetail(id: String) {
    // .. Screen level content goes here
    val scrollState = rememberTransformingLazyColumnState()
    val transformationSpec = rememberTransformationSpec()

    ScreenScaffold(
        scrollState = scrollState,
    ) { contentPadding ->
        // Screen content goes here
        // ...

<br />

[!NOTE] Note: AppScaffold and ScreenScaffold from Horologist haven't been migrated to M3. To maintain correct scrolling behavior and TimeText elements, migrate to the AppScaffold and ScreenScaffold from M3.

If you are using a HorizontalPager with HorizontalPageIndicator, you can migrate to HorizontalPagerScaffold. HorizontalPagerScaffold is placed within an AppScaffold. AppScaffold and HorizontalPagerScaffold lay out the structure of a Pager and coordinate transitions of the HorizontalPageIndicator and TimeText components.

HorizontalPagerScaffold displays the HorizontalPageIndicator at the center-end of the screen by default and coordinates showing and hiding TimeText and HorizontalPageIndicator according to whether the Pager is being paged, this is determined by the PagerState.

There's also a new AnimatedPage component, which animates a page within a Pager with a scaling and scrim effect based on its position.

AppScaffold {
    val pagerState = rememberPagerState(pageCount = { 10 })

    HorizontalPagerScaffold(pagerState = pagerState) {
        HorizontalPager(
            state = pagerState,
            flingBehavior =
                PagerScaffoldDefaults.snapWithSpringFlingBehavior(
                    state = pagerState
                ),
        ) { page ->
            AnimatedPage(pageIndex = page, pagerState = pagerState) {
                val columnState = rememberTransformingLazyColumnState()
                val transformationSpec = rememberTransformationSpec()

                ScreenScaffold(
                    scrollState = columnState,
                ) { contentPadding ->
                    TransformingLazyColumn(
                        state = columnState,
                        contentPadding = contentPadding,
                    ) {
                        item {
                            ListHeader(
                                modifier = Modifier
                                    .fillMaxWidth()
                                    .transformedHeight(this, transformationSpec)
                                    .minimumVerticalContentPadding(
                                        ListHeaderDefaults.minimumTopListContentPadding
                                    ),
                                transformation = SurfaceTransformation(transformationSpec),
                            ) {
                                Text(text = "Pager sample")
                            }
                        }
                        item {
                            Card(
                                modifier = Modifier
                                    .fillMaxWidth()
                                    .transformedHeight(this, transformationSpec)
                                    .minimumVerticalContentPadding(
                                        CardDefaults.minimumVerticalListContentPadding
                                    ),
                                transformation = SurfaceTransformation(transformationSpec),
                            ) {
                                if (page == 0) {
                                    Text(text = "Page #$page. Swipe right")
                                } else {
                                    Text(text = "Page #$page. Swipe left and right")
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}

<br />

Finally, M3 introduces a VerticalPagerScaffold which follows the same pattern as the HorizontalPagerScaffold:

@Composable
fun VerticalPagerScaffoldSample() {
    AppScaffold {
        val pagerState = rememberPagerState(pageCount = { 10 })

        VerticalPagerScaffold(pagerState = pagerState) {
            VerticalPager(
                state = pagerState,
                flingBehavior =
                    PagerScaffoldDefaults.snapWithSpringFlingBehavior(
                        state = pagerState
                    ),
            ) { page ->
                AnimatedPage(pageIndex = page, pagerState = pagerState) {
                    ScreenScaffold {
                        Column(
                            modifier = Modifier.fillMaxSize(),
                            horizontalAlignment = Alignment.CenterHorizontally,
                            verticalArrangement = Arrangement.Center,
                        ) {
                            Text(text = "Page #$page")
                            Spacer(modifier = Modifier.height(8.dp))
                            Text(text = "Swipe up and down")
                        }
                    }
                }
            }
        }
    }
}

<br />

Placeholder

There are some API changes between M2.5 and M3. M3 provides two placeholder modifiers:

  • Modifier.placeholder, which is drawn instead of content that is not yet loaded

  • A placeholder shimmer effect Modifier.placeholderShimmer which provides a placeholder shimmer effect which runs in an animation loop while waiting for the data to load.

See the following table for additional changes to the Placeholder component.

M2.5M3
PlaceholderState.startPlaceholderAnimationHas been removed
PlaceholderState.placeholderProgressionHas been removed
PlaceholderState.isShowContentReplaced by PlaceholderState.isVisible (inverted boolean)
PlaceholderState.isWipeOffHas been removed
PlaceholderDefaults.painterWithPlaceholderOverlayBackgroundBrushHas been removed
PlaceholderDefaults.placeholderBackgroundBrushHas been removed
PlaceholderDefaults.placeholderChipColorsHas been removed
SwipeDismissableNavHost

SwipeDismissableNavHost is part of wear.compose.navigation. When this component is used with M3, the M3 MaterialTheme updates the LocalSwipeToDismissBackgroundScrimColor and LocalSwipeToDismissContentScrimColor.

TransformingLazyColumn

TransformingLazyColumn is part of androidx.wear.compose.foundation.lazy and adds support for scaling and morphing animations on list items during scrolling, enhancing the user experience. It is strongly recommended that apps migrate from ScalingLazyColumn to TransformingLazyColumn.

Similarly to ScalingLazyColumn, it provides rememberTransformingLazyColumnState() to create a TransformingLazyColumnState that is remembered across compositions.

For adding scaling and morphing animations, add the following to each list item:

  • Modifier.transformedHeight, which lets you calculate transformed height of the items using a TransformationSpec, you can use rememberTransformationSpec() unless you need further customization.

  • A SurfaceTransformation

To verify that the padding is correct at the top and bottom of the list, use the minimumVerticalContentPadding modifier.

val columnState = rememberTransformingLazyColumnState()
val transformationSpec = rememberTransformationSpec()
ScreenScaffold(
    scrollState = columnState
) { contentPadding ->
    TransformingLazyColumn(
        state = columnState,
        contentPadding = contentPadding
    ) {
        item {
            ListHeader(
                modifier = Modifier
                    .fillMaxWidth()
                    .transformedHeight(this, transformationSpec)
                    .minimumVerticalContentPadding(ListHeaderDefaults.minimumTopListContentPadding),
                transformation = SurfaceTransformation(transformationSpec)
            ) {
                Text(text = "Header")
            }
        }
        // ... other items
        item {
            Button(
                modifier = Modifier
                    .fillMaxWidth()
                    .transformedHeight(this, transformationSpec)
                    .minimumVerticalContentPadding(ButtonDefaults.minimumVerticalListContentPadding),
                transformation = SurfaceTransformation(transformationSpec),
                onClick = { /* ... */ },
                icon = {
                    Icon(
                        imageVector = Icons.Default.Build,
                        contentDescription = "build",
                    )
                },
            ) {
                Text(
                    text = "Build",
                    maxLines = 1,
                    overflow = TextOverflow.Ellipsis,
                )
            }
        }
    }
}

<br />

To learn more about migrating from M2.5 to M3 in Compose, consult the following additional resources.

Samples
API reference and source code
Design

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs network access

Security

No issues found by our static scan· No issues found

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Created by
Google LLC
Publisher
Android (Google) (Official)
Distributed by
Android (Google)
Source
android/skills · wear/wear-compose-m3 · commit bf68e2d
Licence
Apache License 2.0 (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE.txt)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Google LLC or Android (Google).

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download wear-compose-m3.zip