Compose Material 3 Adaptive

  
Use the Material 3 adaptive library to create adaptive UIs that will adapt themselves automatically according to the current window configurations like window size classes or device postures. The library provides both default scaffold implementations and necessary building block composables to create your own custom experiences.
Latest Update Stable Release Release Candidate Beta Release Alpha Release
October 30, 2024 1.0.0 - - 1.1.0-alpha06

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.adaptive:adaptive:1.1.0-alpha06"
    implementation "androidx.compose.material3.adaptive:adaptive-layout:1.1.0-alpha06"
    implementation "androidx.compose.material3.adaptive:adaptive-navigation:1.1.0-alpha06"
}

Kotlin

dependencies {
    implementation("androidx.compose.material3.adaptive:adaptive:1.1.0-alpha06")
    implementation "androidx.compose.material3.adaptive:adaptive-layout:1.1.0-alpha06"
    implementation "androidx.compose.material3.adaptive:adaptive-navigation:1.1.0-alpha06"
}

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.

Compose Material3 Adaptive Version 1.1

Version 1.1.0-alpha06

October 30, 2024

androidx.compose.material3.adaptive:adaptive-*:1.1.0-alpha06 is released. Version 1.1.0-alpha06 contains these commits.

API Changes

  • Add FloatRange to PaneScaffoldTransitionScope.motionProgress. (Iac0dd)
  • Change navigator params' type to generic types in navigable scaffolds. (I1da6e)

Version 1.1.0-alpha05

October 16, 2024

androidx.compose.material3.adaptive:adaptive-*:1.1.0-alpha05 is released. Version 1.1.0-alpha05 contains these commits.

API Changes

  • Introduce animation specs class to ensure more consistent motion behavior and future expandability. (I2d3cc)
  • Provide motion type and rename currentXXXXX in PaneMotionData to originXXXX. (I7c61a)

Version 1.1.0-alpha04

October 2, 2024

androidx.compose.material3.adaptive:adaptive-*:1.1.0-alpha04 is released. Version 1.1.0-alpha04 contains these commits.

New Features

  • Added predictive back support to NavigableListDetailPaneScaffold and NavigableSupportingPaneScaffold. (I4dc21, b/359616816)

API Changes

  • Added ThreePaneScaffoldState to ThreePaneScaffoldNavigator. Navigation methods have been made suspend to support navigation with animation. Added seekBack to support partial navigation states (e.g. predictive back). (I5a651, b/359616816)
  • Added MutableThreePaneScaffoldState to control the transition between scaffold values. The existing ThreePaneScaffoldState has been made read-only. (Idb3c6)
  • Expose default pane motion implementations (I95a7b)
  • Enable setting initial anchor of pane expansion state (Ie41b3, b/362350560)

Bug Fixes

Version 1.1.0-alpha03

September 18, 2024

androidx.compose.material3.adaptive:adaptive-*:1.1.0-alpha03 is released. Version 1.1.0-alpha03 contains these commits.

Version 1.1.0-alpha02

September 4, 2024

androidx.compose.material3.adaptive:adaptive-*:1.1.0-alpha02 is released. Version 1.1.0-alpha02 contains these commits.

New Features

  • Motion customization (I0bf9c), (I80e66) is supported for makers to change the default motions during adaptive scaffold state changes. Makers can choose from a set of default entering and exiting transitions, or implement pure custom transitions with the info provided through new motion scopes.
  • Implement fading animation of pane expansion drag handles (46e3c69)
  • Make remembered PaneExpansionState Saveable (61ff76f)

API Changes

  • Add missing pane expansion APis to scaffolds (Ic5bc0)
  • ThreePaneScaffoldDestinationItem.content renamed to contentKey. rememberListDetailPaneScaffoldNavigator and rememberSupportingPaneScaffoldNavigator default type argument changed from Nothing to Any. (I58749)
  • Mark ThreePaneScaffoldState as stable (I64aec)
  • Make drag handle parameters be scoped (Ic0aa2)

Version 1.1.0-alpha01

August 21, 2024

androidx.compose.material3.adaptive:adaptive-*:1.1.0-alpha01 is released. Version 1.1.0-alpha01 contains these commits.

New Features

  • Introduce pane expansion support of adaptive scaffolds.

API Changes

  • Introduce pane expansion APIs to public (I301d6)
  • Introduced ThreePaneScaffoldState to control pane value transitions. Added overloads of ListDetailPaneScaffold and SupportingPaneScaffold which accept this state. (I5db3b)
  • Introduce pane expansion key and key provider interface (Id621f)

Bug Fixes

  • Fix wrong partition calculation when excluded hinge presents. (9dfd483)

Compose Material3 Adaptive Version 1.0

Version 1.0.0

September 4, 2024

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

Major features of 1.0.0

Version 1.0.0-rc01

August 21, 2024

androidx.compose.material3.adaptive:adaptive-*:1.0.0-rc01 is released. Version 1.0.0-rc01 contains these commits.

Bug Fixes

  • Fix wrong partition calculation when excluded hinge presents. (9dfd483)

Version 1.0.0-beta04

June 26, 2024

androidx.compose.material3.adaptive:adaptive-*:1.0.0-beta04 is released. Version 1.0.0-beta04 contains these commits.

Bug Fixes

  • Fixes the issue that when hinge bounds get updated, the layout is not updated accordingly. (71e9cf1)

Version 1.0.0-beta03

June 12, 2024

androidx.compose.material3.adaptive:adaptive-*:1.0.0-beta03 is released. Version 1.0.0-beta03 contains these commits.

Bug Fixes

  • Fixes crashes caused by incorrect dependency resolution in beta02.

Version 1.0.0-beta02

May 29, 2024

androidx.compose.material3.adaptive:adaptive-*:1.0.0-beta02 is released. Version 1.0.0-beta02 contains these commits.

Version 1.0.0-beta01

May 14, 2024

androidx.compose.material3.adaptive:adaptive-*:1.0.0-beta01 is released. Version 1.0.0-beta01 contains these commits.

Version 1.0.0-alpha12

May 1, 2024

androidx.compose.material3.adaptive:adaptive-*:1.0.0-alpha12 is released. Version 1.0.0-alpha12 contains these commits.

API Changes

  • Add isFlat info to HingeInfo (Ie0516, b/333784198)
  • Make adaptive APIs non-experimental (I1d038)
  • Make adaptive layout APIs non-experimental (Id23df)
  • Changed BackNavigationBehavior from an enum to a value class (Id8757)

Bug Fixes

  • Change transition fraction to a lambda (I6f5a9)
  • Fix the initial state issue of SizeTracker (18326a9)
  • Include hinge list in Posture equality check (6687137)

Version 1.0.0-alpha11

April 17, 2024

androidx.compose.material3.adaptive:adaptive-*:1.0.0-alpha11 is released. Version 1.0.0-alpha11 contains these commits.

API Changes

  • Make scope interfaces sealed. (Iefa57)
  • Introduce AnimatedPaneScope. (I62d73, b/332750742)
  • Make AdaptStrategy sealed and stable. (Ia28b2)
  • Introduce a copy method of PaneScaffoldDirective. (I9291f)
  • Mark ThreePaneScaffoldScope as experimental. (I9d527)
  • Provide easy-to-use scaffold APIs that supports navigation. (I263f0, b/321010778)

Version 1.0.0-alpha10

April 3, 2024

androidx.compose.material3.adaptive:adaptive-*:1.0.0-alpha10 is released. Version 1.0.0-alpha10 contains these commits.

API Changes

  • Make default preferred width adaptive and customizable. (Ic3abc)
  • Rename scaffold directive calculation functions. (I10855)
  • Remove paddings and insets from scaffold APIs. (I786f8)
  • Add navigator remember methods without generic types. (I607c3)

Version 1.0.0-alpha09

March 20, 2024

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

API Changes

  • Add state transition fields to ThreePaneScaffoldScope. (I3d917)
  • Reorder scaffold parameters. (I4dff5)
  • Provide default value of AnimatedPane modifier parameter. (I77dd7)

Bug Fixes

  • Include spacer size into pane motions. (a3174ca)

Version 1.0.0-alpha08

March 6, 2024

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

New Features

  • Implement delayed sliding in when switching panes. (I1a38e)

API Changes

  • Removed the ThreePaneScaffoldState interface. (I63f23)

Version 1.0.0-alpha07

February 21, 2024