Wear Compose M3
Organizationandroid
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.
Overview
- Repository
- android/skills
- Publisher
- android
- Stars
- 10.5K
- Forks
- 695
- Bundled files
- 52
- License
- Apache-2.0
- Updated
- Nov 11, 2026
Installation
tmp=$(mktemp -d)
git clone --depth 1 https://github.com/android/skills.git "$tmp"
mkdir -p ~/.claude/skills
cp -R "$tmp/wear/wear-compose-m3" ~/.claude/skills/wear-compose-m3
rm -rf "$tmp"tmp=$(mktemp -d)
git clone --depth 1 https://github.com/android/skills.git "$tmp"
mkdir -p ~/.codex/skills
cp -R "$tmp/wear/wear-compose-m3" ~/.codex/skills/wear-compose-m3
rm -rf "$tmp"Install the Wear Compose M3 agent skill from https://github.com/android/skills/tree/main/wear/wear-compose-m3 into this project's skills folder.Instructions
Prerequisites and compatibility
- Current Wear OS Compose version in-use: To find the installed library version, read
gradle/libs.versions.tomlorbuild.gradle.ktsdirectly. Don't run./gradlew dependenciesor other shell commands to resolve versions. - Wear OS Compose Material3 version: If an internal tool is available to establish the latest stable version
{VERSION}ofandroidx.wear.compose:compose-material3, use that tool.- Otherwise, fetch the official Maven metadata XML to identify
{VERSION}(highest number, ignoring-alpha,-beta, or-rc).
- Otherwise, fetch the official Maven metadata XML to identify
- 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.
- Kotlin & Compose compiler: Use Kotlin 2.0.0+ with the
org.jetbrains.kotlin.plugin.composeGradle plugin. - Min SDK: Ensure
minSdkis at least 25. - Compile SDK & AGP: Ensure
compileSdkand AGP meet the library's AAR metadata floors (compileSdk >= 35andAGP >= 8.6.0for1.6.x;compileSdk >= 37andAGP >= 9.1.0for1.7.x).
Gotchas
- Mandatory sync and validation: After updating versions in
libs.versions.tomlorbuild.gradle.kts, perform a Gradle sync (or./gradlew assembleDebug) before refactoring, and run./gradlew assembleDebugafter refactoring to verify the build. - 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.
- 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). - When migrating from Material 2.5 or Horologist, read the migration guide and use its official component mappings.
- Before refactoring any component (for example,
Chip->Button), check the parameter names, slot types, and "Expressive" design tokens. - Do not use the Horologist Composables, Compose Layout, or Compose Material libraries; replace Horologist components with Wear Compose M3 equivalents (
AppScaffold-> M3AppScaffold,ScreenScaffold-> M3ScreenScaffold,ScalingLazyColumn->TransformingLazyColumn,ResponsiveListHeader->ListHeader,PagerScreen->HorizontalPagerScaffold,Chip->Button,Confirmation->ConfirmationDialog). - Always check against the component guidance in Capability 3.
- 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.*
Foundation components in androidx.wear.compose.foundation.*
Navigation 3 components in androidx.wear.compose.navigation3.*
| Component / Symbol | Reference Samples |
|---|---|
rememberSwipeDismissableSceneStrategy |
SwipeDismissableSceneStrategySample |
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.
AppScaffoldandScreenScaffold- [ ] Use
AppScaffoldas the outer container, withScreenScaffoldchildren. - [ ] Use only ONE
AppScaffoldand any number ofScreenScaffold.
- [ ] Use
ScalingLazyColumn- UseTransformingLazyColumninstead.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.transformedHeightCanonical 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, ) } } } }- [ ] Use
TransformingLazyColumninstead ofScalingLazyColumn. - [ ] You must pass the
contentPaddingparameter fromScreenScaffoldto theTransformingLazyColumn. - [ ] Use the
minimumVerticalContentPaddingmodifier 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.
- This expects a value from defaults, such as
- [ ] Ensure items morph and scale (apply to components within
TransformingLazyColumn, not the list itself):- [ ] Use
Modifier.transformedHeight(this, transformationSpec). - [ ] Use
transformation = SurfaceTransformation(transformationSpec).
- [ ] Use
- [ ] If configuring a list for snapping, use
flingBehaviorandrotaryScrollableBehaviortogether:
val columnState = rememberTransformingLazyColumnState() ScreenScaffold(scrollState = columnState) { contentPadding -> TransformingLazyColumn( state = columnState, flingBehavior = TransformingLazyColumnDefaults.snapFlingBehavior(columnState), rotaryScrollableBehavior = RotaryScrollableDefaults.snapBehavior(columnState) ) { // ... // ... } }
- [ ] Use
ScreenScaffold- [ ] Guard the
scrollIndicatorwith!LocalScrollCaptureInProgress.current(androidx.compose.ui.platform).
- [ ] Guard the
EdgeButton- [ ] Do NOT use as the final item within a
TransformingLazyColumn. Instead, use the slot inScreenScaffold. - [ ] 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, ) { // ... // ... } }
- [ ] Do NOT use as the final item within a
Column- [ ] USE as a direct child of
ScreenScaffoldif the screen will never scroll, even with the largest system font. - [ ] Use
TransformingLazyColumninstead for all other cases.
- [ ] USE as a direct child of
Styles
- [ ] Do NOT hard-code text sizes, use
typographyfromMaterialTheme. - [ ] Do NOT hard-code colors, use
colorSchemefromMaterialTheme.
- [ ] Do NOT hard-code text sizes, use
Use component defaults:
- [ ] Components such as
Buttonhave a correspondingButtonDefaultsobject. - [ ] Check for and use the
*Defaultsobject for any component when working with padding and styling values, in preference to hard-coded values.
- [ ] Components such as
Use Wear-specific preview annotations (
androidx.wear.compose.ui.tooling.preview):- [ ]
@WearPreviewDevices - [ ]
@WearPreviewFontScales - [ ] Ensure the
androidx.wear.compose:compose-ui-toolingdependency is included.
- [ ]
Ambient mode
- [ ] Use
LocalAmbientModeManager(provided byCompositionLocalProviderandrememberAmbientModeManager()) instead ofAmbientLifecycleObserver.
- [ ] Use
Navigation
- [ ] When adding navigation fresh, use Navigation3 (
androidx.wear.compose:compose-navigation3). - [ ] Use
rememberSwipeDismissableSceneStrategy()/SwipeDismissableSceneStrategy(androidx.wear.compose.navigation3).
- [ ] When adding navigation fresh, use Navigation3 (
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.
HorizontalPagerorVerticalPager- [ ] Use the Composable hierarchy in this order:
AppScaffold,HorizontalPagerScaffold,HorizontalPager,AnimatedPage,ScreenScaffold. Or similarly forVerticalPager.
- [ ] Use the Composable hierarchy in this order:
Bundled files
references/android/training/wearables/compose/migrate-to-material3.md90 KBreferences/foundation/AmbientModeSample.kt.md6 KBreferences/foundation/CurvedWorldSample.kt.md15 KBreferences/foundation/ExpandableSample.kt.md4 KBreferences/foundation/HierarchicalFocusSample.kt.md6 KBreferences/foundation/PagerSamples.kt.md3 KBreferences/foundation/RotarySamples.kt.md7 KBreferences/foundation/SwipeToDismissBoxSample.kt.md8 KBreferences/foundation/TransformingLazyColumnSample.kt.md16 KBreferences/material3/AlertDialogSample.kt.md16 KBreferences/material3/AnimatedTextSample.kt.md7 KBreferences/material3/ButtonGroupSample.kt.md4 KBreferences/material3/ButtonSample.kt.md18 KBreferences/material3/CardSample.kt.md16 KBreferences/material3/CheckboxButtonSample.kt.md3 KBreferences/material3/ConfirmationDialogSample.kt.md6 KBreferences/material3/CurvedTextSamples.kt.md3 KBreferences/material3/DatePickerSample.kt.md5 KBreferences/material3/DynamicColorSchemeSample.kt.md4 KBreferences/material3/EdgeButtonSample.kt.md3 KBreferences/material3/FadingExpandingLabelSample.kt.md3 KBreferences/material3/IconButtonSample.kt.md4 KBreferences/material3/IconToggleButtonSample.kt.md4 KBreferences/material3/LevelIndicatorSample.kt.md3 KBreferences/material3/LinearProgressIndicatorSample.kt.md2 KBreferences/material3/ListHeaderSample.kt.md8 KBreferences/material3/OneHandedGestureSamples.kt.md34 KBreferences/material3/OpenOnPhoneDialogSample.kt.md2 KBreferences/material3/PageIndicatorSample.kt.md5 KBreferences/material3/PagerScaffoldSample.kt.md9 KBreferences/material3/PickerGroupSample.kt.md6 KBreferences/material3/PickerSample.kt.md4 KBreferences/material3/PlaceholderSample.kt.md7 KBreferences/material3/ProgressIndicatorSample.kt.md9 KBreferences/material3/RadioButtonSample.kt.md5 KBreferences/material3/ScaffoldSample.kt.md7 KBreferences/material3/ScrollAwaySample.kt.md4 KBreferences/material3/ScrollIndicatorSample.kt.md3 KBreferences/material3/SliderSample.kt.md3 KBreferences/material3/StepperSample.kt.md6 KBreferences/material3/SurfaceTransformationSample.kt.md7 KBreferences/material3/SwipeToDismissBoxSample.kt.md8 KBreferences/material3/SwipeToRevealSample.kt.md14 KBreferences/material3/SwitchButtonSample.kt.md3 KBreferences/material3/TextButtonSample.kt.md3 KBreferences/material3/TextToggleButtonSample.kt.md3 KBreferences/material3/TimePickerSample.kt.md6 KBreferences/material3/TimeTextSample.kt.md3 KBreferences/material3/TransformationSpecSample.kt.md10 KBreferences/material3/TransformingLazyColumnNotificationsSample.kt.md4 KBreferences/material3/TransformingLazyColumnSample.kt.md14 KBreferences/navigation3/SwipeDismissableSceneStrategySample.kt.md9 KB
FAQ
What does Wear Compose M3 do?
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.
Who made Wear Compose M3?
android (an organization) publishes it in the android/skills repository on GitHub.
Is Wear Compose M3 free?
Yes. Wear Compose M3 is open source, published by android under the Apache-2.0 license.
What comes with Wear Compose M3?
Its instructions and 52 files the agent reads only when a task needs them, such as references, examples or scripts.
Which agents can use Wear Compose M3?
Any coding agent that reads SKILL.md files, including Claude Code, Codex, Cursor, GitHub Copilot and Gemini CLI. The agent loads the skill when a task matches its description.
What are agent skills?
An agent skill is a folder with a SKILL.md file: instructions that teach a coding agent how to do one kind of task, and optionally files it can read while it works. The agent keeps only the skill's name and description in mind and reads the rest when a task calls for it.
How are agent skills different from MCP servers?
An MCP server gives an agent new tools to call, code that runs somewhere and returns results. A skill gives it knowledge: how to approach a task with the tools it already has. Many agents use both.
How can my agent test my Android app?
Robomori lets coding agents create, start and control Android emulators and devices from one command, so they can install your app, take screenshots and check dark mode, font sizes and languages.