Compose Material 3
Latest Update | Stable Release | Release Candidate | Beta Release | Alpha Release |
---|---|---|---|---|
August 10, 2022 | - | - | - | 1.0.0-alpha16 |
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.
Group | Description |
---|---|
compose.animation | Build animations in their Jetpack Compose applications to enrich the user experience. |
compose.compiler | Transform @Composable functions and enable optimizations with a Kotlin compiler plugin. |
compose.foundation | Write Jetpack Compose applications with ready to use building blocks and extend foundation to build your own design system pieces. |
compose.material | Build 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.material3 | 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. |
compose.runtime | Fundamental building blocks of Compose's programming model and state management, and core runtime for the Compose Compiler Plugin to target. |
compose.ui | Fundamental 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-alpha16" implementation "androidx.compose.material3:material3-window-size-class:1.0.0-alpha16" } android { buildFeatures { compose true } composeOptions { kotlinCompilerExtensionVersion = "1.2.0-alpha08" } kotlinOptions { jvmTarget = "1.8" } }
Kotlin
dependencies { implementation("androidx.compose.material3:material3:1.0.0-alpha16") implementation("androidx.compose.material3:material3-window-size-class:1.0.0-alpha16") } 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.
See the Issue Tracker documentation for more information.
Version 1.0
Version 1.0.0-alpha16
August 10, 2022
androidx.compose.material3:material3:1.0.0-alpha16
and androidx.compose.material3:material3-window-size-class:1.0.0-alpha16
are released. Version 1.0.0-alpha16 contains these commits.
New Features
- Support specifying a custom width on a navigation drawer. (Ia7f10)
API Changes
- Reorder Tab and Leading icon tab parameters to maintain consistency within the API (Ie2637)
- Marked
BadgeDefaults
as experimental. (I98ef3) - Remove deprecated navigation drawer function. (I4f2db)
- Reorder Slider parameters in Material 3 to maintain consistency within the API (I0aee7)
- Reorder
NavigationBar
andNavigationRail
parameters to maintain consistency within the API (I51cda) - Reorder parameters in Material 3 to maintain consistency across the API. (If4ae1)
- Reorder Slider parameters in Material 3 to maintain consistency within the API (I62673)
- Renamed icons parameter to actions to be consistent with top app bar (Id75be)
- Mark
Badge
andBadgedBox
as experimental because the anchor alignment is still influx. (I1712e, b/236524516) - Change
@ExperimentalMaterial3Api
annotations on icon button variants to@OptIn
(I070b5) - Separated a navigation drawer's content to its own composable to support specifying a custom width on it. (Ia7f10)
- Removes
Divider
fromMenuDefaults
andTabDefaults
(I4e33c)
Version 1.0.0-alpha15
July 27, 2022
androidx.compose.material3:material3:1.0.0-alpha15
and androidx.compose.material3:material3-window-size-class:1.0.0-alpha15
are released. Version 1.0.0-alpha15 contains these commits.
New Features
- Allow dragging the top app bar from the bar itself. (I65c00, b/205873416)
API Changes
- Updates to the
FilterChip
andElevatedFilterChip
APIs to remove theselectedIcon
slot and promote reusing theleadingIcon
for displaying a selected state. (Ie5dc2) - Add scrim and outline variant color roles. (Id6d54)
- Fix naming conventions for composable defaults. (I62b27)
- Mark
ListItemDefaults
andListItemColors
as experimental. (I1f3ec) - Changes to the top app bar API to better reflect the meaning of its state properties. Also, mark the top app bar API as experimental. (Ic0ad8)
- Text selection colors have now been added to
TextFieldColors
for better discoverability. (Iba1b8) - Adding
ButtonDefault.ButtonWithIconContentPadding
to be used with buttons that contain an icon. (I2bf9c) - Text fields have been marked as experimental to allow for more flexibility in future API changes. (I127b5)
- Removed the
@ExperimentalMaterial3Api
annotation from theCheckbox
function. (I5eefc) - Removed the
@ExperimentalMaterial3Api
annotation from theRadioButton
function. (I17e2a) - Removed the
@ExperimentalMaterial3Api
annotation from the non-interactive Cards. (I9bd49) - Updates various component defaults objects to include colors, shapes etc. (I96e11)
Bug Fixes
- Removed non-functioning trailing icons from input chip samples to avoid user confusion in the catalog app. (I9846a)
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 theFilterChip
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
andWindowHeightSizeClass
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
- Slider parent can now have 0 width. (b/231707291)
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
andInputChip
support (I0d25a) - Adds Material3
FilterChip
andSuggestionChip
support (I9fdf3)
API Changes
- Renamed
TextFieldDefaults.BorderStroke
composable that draws a border stroke inOutlinedTextField
toTextFieldDefaults.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 usecalculateWindowSizeClass
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 forWindowSizeClass
. 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 fromBottomAppBar
with FAB. (I92c47) - Adds Material3
FilledIconButton
,FilledTonalIconButton
, andOutlinedIconButton
. (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 useconsume()
to consume the change completely. You can useisConsumed
to determine whether or not someone else has previously consumed the change. PointerInputChange::copy()
now always makes a shallow copy. It means that copies ofPointerInputChange
will be consumed once one of the copies is consumed. If you want to create an unboundPointerInputChange
, 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 renamedcontainerColor
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
- Added support for Material 3 text fields. (I795cc, b/199377790)
API Changes
- Add default divider for menu (I01374)
- Added
surfaceTint
color parameter toColorScheme
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
andLazyHorizontalGrid
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. DeprecatedViewCompat.getWindowInsetsController
in favor ofWindowCompat.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
andDismissibleNavigationDrawer
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 toModalNavigationDrawer
(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
toFloatingActionButtonDefaults
. (Ia71cf) - Bug fix for hidden
AlertDialog
buttons when a long text is added with aLazyColumn
. (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
- Dropdown menu
- Cards
API Changes
- Deprecated
Surface
function that takes an onClick callback. Clickable surfaces should be created with anInteractionSource
and aModifier.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
- Added missing tertiary colors in dynamic color schemes (I456c4, b/214588434)
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
- Add
LocalIndication
to Material 3'sMaterialTheme
. (I7ce4e) - Fix the corner radius that is applied for Checkboxes (I38b03, b/175198975, b/202309440)
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 fromcompose.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
- Buttons
- FAB and extended FAB
- Dialogs
- Navigation bar
- Navigation drawer
- Navigation rail
- Top app bar
- Badge
- Icon
- Text
- Surface
- Layout
- Content color
For more information, check out the Material Design 3 and Material You section in the Material Theming in Compose guide.