Compose Material 3

Build Jetpack Compose UIs with Material Design 3 Components, the next evolution of Material Design. Material 3 includes updated theming and components and Material You personalization features like dynamic color, and is designed to be cohesive with the new Android 12 visual style and system UI.
Latest Update Stable Release Release Candidate Beta Release Alpha Release
June 29, 2022 - - - 1.0.0-alpha14

Structure

Compose is combination of 7 Maven Group Ids within androidx. Each Group contains a targeted subset of functionality, each with it's own set of release notes.

This table explains the groups and links to each set of release notes.

GroupDescription
compose.animationBuild animations in their Jetpack Compose applications to enrich the user experience.
compose.compilerTransform @Composable functions and enable optimizations with a Kotlin compiler plugin.
compose.foundationWrite Jetpack Compose applications with ready to use building blocks and extend foundation to build your own design system pieces.
compose.materialBuild Jetpack Compose UIs with ready to use Material Design Components. This is the higher level entry point of Compose, designed to provide components that match those described at www.material.io.
compose.material3Build Jetpack Compose UIs with Material Design 3 Components, the next evolution of Material Design. Material 3 includes updated theming and components and Material You personalization features like dynamic color, and is designed to be cohesive with the new Android 12 visual style and system UI.
compose.runtimeFundamental building blocks of Compose's programming model and state management, and core runtime for the Compose Compiler Plugin to target.
compose.uiFundamental components of compose UI needed to interact with the device, including layout, drawing, and input.

Declaring dependencies

To add a dependency on Compose, you must add the Google Maven repository to your project. Read Google's Maven repository for more information.

Add the dependencies for the artifacts you need in the build.gradle file for your app or module:

Groovy

dependencies {
    implementation "androidx.compose.material3:material3:1.0.0-alpha14"
    implementation "androidx.compose.material3:material3-window-size-class:1.0.0-alpha14"
}

android {
    buildFeatures {
        compose true
    }

    composeOptions {
        kotlinCompilerExtensionVersion = "1.2.0-alpha08"
    }

    kotlinOptions {
        jvmTarget = "1.8"
    }
}

Kotlin

dependencies {
    implementation("androidx.compose.material3:material3:1.0.0-alpha14")
    implementation("androidx.compose.material3:material3-window-size-class:1.0.0-alpha14")
}

android {
    buildFeatures {
        compose = true
    }

    composeOptions {
        kotlinCompilerExtensionVersion = "1.2.0-alpha08"
    }

    kotlinOptions {
        jvmTarget = "1.8"
    }
}

For more information about dependencies, see Add build dependencies.

Feedback

Your feedback helps make Jetpack better. Let us know if you discover new issues or have ideas for improving this library. Please take a look at the existing issues in this library before you create a new one. You can add your vote to an existing issue by clicking the star button.

Create a new issue

See the Issue Tracker documentation for more information.

Version 1.0

Version 1.0.0-alpha14

June 29, 2022

androidx.compose.material3:material3:1.0.0-alpha14 and androidx.compose.material3:material3-window-size-class:1.0.0-alpha14 are released. Version 1.0.0-alpha14 contains these commits.

New Features

  • Added M3 list implementation, see the documentation for sample usage (Id7a20)

API Changes

  • Change parameter name from values to value in RangeSlider (I3b79a)
  • API changes to the InputChip implementation to support a selectable state per the Material Design spec. Additional support at the FilterChip colors for selected disabled state. (I55244, b/235792432)
  • Add BottomAppBar default FAB (Ida4c8)
  • ColorScheme.surfaceColorAtElevation was added (Id41af)
  • Interfaces in compose libraries are now built using jdk8 default interface methods (I5bcf1)
  • WindowWidthSizeClass and WindowHeightSizeClass now implement Comparable, so they can be compared using operators (<, <=, >=, >) and other APIs. (I747d0)

Bug Fixes

  • Update badge sample to provide more meaningful content description. (I10b9d)
  • Adds option to use the system font size to the Material 3 catalog's theme picker. (I10605)
  • Adds sample code for Badge and indeterminate progress indicators. (I8fbe0)

Version 1.0.0-alpha13

June 1, 2022

androidx.compose.material3:material3:1.0.0-alpha13 and androidx.compose.material3:material3-window-size-class:1.0.0-alpha13 are released. Version 1.0.0-alpha13 contains these commits.

API Changes

  • Supports maintaining the top app bar position on configuration change. (I10459, b/216160958)

Version 1.0.0-alpha12

May 18, 2022

androidx.compose.material3:material3:1.0.0-alpha12 and androidx.compose.material3:material3-window-size-class:1.0.0-alpha12 are released. Version 1.0.0-alpha12 contains these commits.

Bug Fixes

Version 1.0.0-alpha11

May 11, 2022

androidx.compose.material3:material3:1.0.0-alpha11 and androidx.compose.material3:material3-window-size-class:1.0.0-alpha11 are released. Version 1.0.0-alpha11 contains these commits.

New Features

  • Added RangeSlider to Material 3 (I18e38)
  • Adds Material3 AssistChip and InputChip support (I0d25a)
  • Adds Material3 FilterChip and SuggestionChip support (I9fdf3)

API Changes

  • Renamed TextFieldDefaults.BorderStroke composable that draws a border stroke in OutlinedTextField to TextFieldDefaults.BorderBox. (I5f295)
  • Switch m3 visual changes (Iab30e)
  • Allow passing colors to the standard icon buttons. (Ia2445)

Bug Fixes

  • Add lint check to material3/Scaffold to ensure that the inner padding is used (I72293, b/226951418)

Version 1.0.0-alpha10

April 20, 2022

androidx.compose.material3:material3:1.0.0-alpha10 and androidx.compose.material3:material3-window-size-class:1.0.0-alpha10 are released. Version 1.0.0-alpha10 contains these commits.

New Features

  • material3-window-size-class is a new library that provides support for window size classes: a set of opinionated viewport breakpoints for you to design, develop, and test resizable application layouts against. You can use calculateWindowSizeClass to retrieve a window size class instance, which you can use to determine how your UI should appear, such as showing a navigation rail instead of bottom navigation for larger window sizes. For more information and sample usage see the API reference documentation for WindowSizeClass. For more information on window size class definitions, see the public guidance on supporting different screen sizes.

API Changes

  • Adds default FAB elevation for BottomAppBar, removes trailing lambda from BottomAppBar with FAB. (I92c47)
  • Adds Material3 FilledIconButton, FilledTonalIconButton, and OutlinedIconButton. (Ib2bda)
  • Updates Material 3 Snackbar API to accept color values for the optional action and dismiss-action. (Ibe4b4)
  • Partial consumption (down OR position) has been deprecated in PointerInputChange. You can use consume() to consume the change completely. You can use isConsumed to determine whether or not someone else has previously consumed the change.
  • PointerInputChange::copy() now always makes a shallow copy. It means that copies of PointerInputChange will be consumed once one of the copies is consumed. If you want to create an unbound PointerInputChange, use constructor instead. (Ie6be4, b/225669674)
  • Changes to the Cards API to receive the container and content colors via a CardColors interface, and to support a disabled state for clickable cards. (I927df)
  • The parameter backgroundColor has been renamed containerColor in Material 3 text fields for improved consistency with other components. (I6fbd9)

Bug Fixes

  • Updates to the standard IconButton to align it with the Material3 spec. (I09eab)
  • Move the top bar height of material3 Scaffold into the padding passed to content, allowing the content to render underneath the top app bar. If the PaddingValues are ignored, then the content might be obscured by the top bar. (I83cbc, b/217776202)

Version 1.0.0-alpha09

April 6, 2022

androidx.compose.material3:material3:1.0.0-alpha09 is released. Version 1.0.0-alpha09 contains these commits.

New Features

  • Added Material 3 Switch API (I2c3ad)

API Changes

  • Added support for dropdown menus with text fields (aka 'exposed dropdown menus' or 'combo boxes'.) (I1b832)
  • Added shape parameter to MaterialTheme and Shape sub system. (I37426)
  • Added an expanded parameter to ExtendedFloatingActionButton to control whether the FAB is expanded or collapsed, with animations between each state. Added Extended FAB overload for extended FABs with trailing text for ExtendedFABs without icon. (Iba7f1)

Version 1.0.0-alpha08

March 23, 2022

androidx.compose.material3:material3:1.0.0-alpha08 is released. Version 1.0.0-alpha08 contains these commits.

New Features

API Changes

  • Add default divider for menu (I01374)
  • Added surfaceTint color parameter to ColorScheme class. (I2f558)

Bug Fixes

  • Fix at the Material3 Button to read its default text style value from the MaterialTheme. (Ie62fc)

Version 1.0.0-alpha07

March 9, 2022

androidx.compose.material3:material3:1.0.0-alpha07 is released. Version 1.0.0-alpha07 contains these commits.

API Changes

  • Updates to Material 3 Surface API that brings back the overloaded functions for clickable Surfaces, as well as adding a function to support selectable and toggleable Surfaces. (I4bf18)
  • LazyVerticalGrid and LazyHorizontalGrid are now stable. (I307c0)
  • LazyVerticalGrid/LazyHorizontalGrid and all related apis were moved into .grid subpackage. Please update your imports from androidx.compose.foundation.lazy to androidx.compose.foundation.lazy.grid. (I2d446)
  • Reverted previous change of relying solely on a View for WindowInsetsControllerCompat, and again require a Window which is required for managing some window flags. Deprecated ViewCompat.getWindowInsetsController in favor of WindowCompat.getInsetsController to ensure that the correct Window is used (such as if the View is in a dialog). (I660ae, b/219572936)
  • Added a new LazyVerticalGrid API to define cross axis sizes (I17723)

Bug Fixes

  • Updates to the Card API to follow changes at the Surface API (I3c8b9)

Version 1.0.0-alpha06

February 23, 2022

androidx.compose.material3:material3:1.0.0-alpha06 is released. Version 1.0.0-alpha06 contains these commits.

API Changes

  • NavigationDrawerItem is added that represents a single destination within the drawers (Ic396f, b/218286829)
  • PermanentNavigationDrawer and DismissibleNavigationDrawer have been added as experimental APIs. Those are the drawers suitable well for large screen devices. (I5f8ab, b/218286829)
  • Adds Material 3 bottom app bar support (Ic432a)
  • NavigationDrawer has been renamed to ModalNavigationDrawer (I1807d, b/218286829)
  • Added Material 3 Slider class and tokens (I1ccee)
  • Added Tab implementation, see the documentation for sample usage (Ie0146)

Bug Fixes

  • Fixed an issue where the TalkBack screen reader linear navigation selected an empty top app bar title. (Id4690)
  • Added IconSize to FloatingActionButtonDefaults. (Ia71cf)
  • Bug fix for hidden AlertDialog buttons when a long text is added with a LazyColumn. (Ib2cc9, b/216663029)

Version 1.0.0-alpha05

February 9, 2022

androidx.compose.material3:material3:1.0.0-alpha05 is released. Version 1.0.0-alpha05 contains these commits.

New Features

Added Material Design 3 components

API Changes

  • Deprecated Surface function that takes an onClick callback. Clickable surfaces should be created with an InteractionSource and a Modifier.clickable(). (I211c6)
  • Added pressed and focused elevation support for FAB. (Ibb584)
  • Changed the Surface API to receive an InteractionSource which allows controlling its appearance in different states. (Iafbc8)

Bug Fixes

Version 1.0.0-alpha04

January 26, 2022

androidx.compose.material3:material3:1.0.0-alpha04 is released. Version 1.0.0-alpha04 contains these commits.

API Changes

  • Added NonRestartableComposable to methods that are overloads of existing methods without complex logic. This reduces compiler generated memoization checks (equals) for all parameters which are repeated in the inner function that is called. (I90490)
  • Added Material 3 divider. (Ica5fc)
  • Mark the Checkbox and RadioButton with an experimental API annotation. (Ie44bb)
  • Added support for Material 3 progress indicators. (Iff232, b/205023841)

Bug Fixes

  • Update a disabled TextButton's container color to be transparent (I6b248, b/213339737)

Version 1.0.0-alpha03

January 12, 2022

androidx.compose.material3:material3:1.0.0-alpha03 is released. Version 1.0.0-alpha03 contains these commits.

Bug Fixes

Dependency Updates

  • Now depends on Kotlin 1.6.10.

Version 1.0.0-alpha02

December 1, 2021

androidx.compose.material3:material3:1.0.0-alpha02 is released. Version 1.0.0-alpha02 contains these commits.

New Features

  • Add support for checkbox and radiobutton.
  • Updated to be compatible with Kotlin 1.6.0

API Changes

  • Remove drawer from Material 3's scaffold. (I04f51)
  • Adds Material 3 Checkbox support. (Id5542)
  • Adds Material 3 RadioButton support. (I20334)

Bug Fixes

  • Reduce IconButton ripple radius from 40dp to 20dp. (I68bbe, b/206674345)
  • Port string fast path for Text changes from compose.material (I30b03)
  • Fixed but that hardcoded button to always be enabled. (Iea832, b/205335456)

Version 1.0.0-alpha01

October 27, 2021

androidx.compose.material3:material3:1.0.0-alpha01 is released. Version 1.0.0-alpha01 contains these commits.

New Features

Material Design 3 theming and Material You dynamic color

Material Design 3 components

For more information, check out the Material Design 3 and Material You section in the Material Theming in Compose guide.