m3-web-android
Material Design 3 — Android / Jetpack Compose
Overview
Jetpack Compose has the most complete M3 implementation, including M3 Expressive components. Full dynamic color (Material You) support on Android 12+.
Keywords: Material Design 3, M3, Android, Jetpack Compose, Material You, dynamic color, Kotlin, Material 3 Compose, M3 Expressive
When to Use
- Native Android development
- When you need the most complete M3 implementation
- Projects targeting Android 12+ that want dynamic color (Material You)
- When M3 Expressive components are needed (Android 16+)
Install
// build.gradle
implementation("androidx.compose.material3:material3:1.4.0")
Theme Setup
@Composable
fun MyAppTheme(
darkTheme: Boolean = isSystemInDarkTheme(),
dynamicColor: Boolean = true,
content: @Composable () -> Unit
) {
val colorScheme = when {
dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> {
val context = LocalContext.current
if (darkTheme) dynamicDarkColorScheme(context)
else dynamicLightColorScheme(context)
}
darkTheme -> darkColorScheme(
primary = Color(0xFFD0BCFF),
secondary = Color(0xFFCCC2DC),
tertiary = Color(0xFFEFB8C8),
)
else -> lightColorScheme(
primary = Color(0xFF6750A4),
secondary = Color(0xFF625B71),
tertiary = Color(0xFF7D5260),
)
}
MaterialTheme(
colorScheme = colorScheme,
typography = Typography,
shapes = Shapes,
content = content,
)
}
Component Examples
Buttons
Button(onClick = { }) { Text("Filled") }
OutlinedButton(onClick = { }) { Text("Outlined") }
TextButton(onClick = { }) { Text("Text") }
FilledTonalButton(onClick = { }) { Text("Tonal") }
ElevatedButton(onClick = { }) { Text("Elevated") }
Cards
Card(
modifier = Modifier.fillMaxWidth(),
elevation = CardDefaults.cardElevation(defaultElevation = 1.dp),
) {
Column(modifier = Modifier.padding(16.dp)) {
Text("Title", style = MaterialTheme.typography.titleMedium)
Text("Content", style = MaterialTheme.typography.bodyMedium)
}
}
Text Fields
OutlinedTextField(
value = text,
onValueChange = { text = it },
label = { Text("Email") },
)
TextField(
value = text,
onValueChange = { text = it },
label = { Text("Name") },
)
Navigation
NavigationBar {
NavigationBarItem(
icon = { Icon(Icons.Filled.Home, contentDescription = "Home") },
label = { Text("Home") },
selected = selectedItem == 0,
onClick = { selectedItem = 0 },
)
NavigationBarItem(
icon = { Icon(Icons.Filled.Search, contentDescription = "Search") },
label = { Text("Search") },
selected = selectedItem == 1,
onClick = { selectedItem = 1 },
)
}
FAB
FloatingActionButton(onClick = { }) {
Icon(Icons.Filled.Add, contentDescription = "Add")
}
ExtendedFloatingActionButton(
onClick = { },
icon = { Icon(Icons.Filled.Add, contentDescription = "Add") },
text = { Text("Create") },
)
M3 Expressive Components (Android 16+)
// Available in material3 1.4.0+
ExpressiveButton(onClick = { }) { Text("Expressive") }
SplitButton(onClick = { }, menuItems = { /* ... */ }) { Text("Split") }
FloatingToolbar { /* toolbar items */ }
FABMenu { /* FAB menu items */ }
Checklist
-
MaterialThemewrapping applied at app root - Dynamic color used on Android 12+ with fallback color scheme
- Both light and dark color schemes defined
- Typography uses
MaterialTheme.typographyaccessors - Shapes use
MaterialTheme.shapesorShapesclass - Components use Material 3 Compose variants
- M3 Expressive components used where appropriate (Android 16+)
Resources
- Guide: https://developer.android.com/develop/ui/compose/designsystems/material3
- M3 Compose: https://m3.material.io/develop/android/jetpack-compose
- Compose Material 3 releases: https://developer.android.com/jetpack/androidx/releases/compose-material3
- Codelab: https://developer.android.com/codelabs/jetpack-compose-theming
More from shelbeely/shelbeely-agent-skills
material-design-3-guide
Master guide for Material Design 3 — covering the full specification from Material You foundations through M3 Expressive. Explains when to use each Material Design 3 skill subset (color, motion, typography, shape, layout, components, icons). Use this when starting a Material Design 3 project, when you need to understand which M3 skill to apply, or when the user asks about Material Design 3 in general.
28material-design-3-components
Comprehensive guide to Material Design 3 components — from baseline Material You through M3 Expressive. Covers action, containment, communication, navigation, selection, and text input components with specifications, states, and implementation guidelines. Use this when building or styling UI components following Material Design 3 guidelines.
27material-design-3-typography
Applies Material Design 3 Expressive typography principles including variable fonts, type scales, and hierarchy. Use this when working on text styling, type hierarchy, readable interfaces, or when the user asks to apply Material Design 3 typography guidelines.
21material-design-3-layout
Applies Material Design 3 Expressive layout, spacing, and size hierarchy principles including grid systems, responsive design, and elevation. Use this when working on page layouts, spacing, grids, responsive design, or when the user asks to apply Material Design 3 layout guidelines.
20material-design-3-motion
Applies Material Design 3 Expressive motion and animation principles to create natural, intuitive, and engaging user experiences. Use this when implementing animations, transitions, micro-interactions, or when the user asks to apply Material Design 3 motion guidelines.
17material-design-3-color
Applies Material Design 3 Expressive dynamic color and theming principles to user interfaces. Use this when working on color palettes, themes, dynamic color systems, accessibility, or when the user asks to apply Material Design 3 color guidelines to a design or application.
16