Accompanist is a group of libraries that aim to supplement Jetpack Compose Accompanist with features that are commonly required by developers but not yet officially supported in Jetpack Compose Android X libraries.
Jetpack Compose Accompanist
Jetpack Compose Accompanist is a labs-like environment for new Compose APIs. We use it to help fill known gaps in the Compose toolkit, experiment with new APIs and to gather insight into the development experience of developing a Compose library. The goal of Jetpack Compose Accompanist is to not exist. We want to upstream the libraries into the official toolkit, at which point they will be deprecated and removed from Jetpack Compose Accompanist.
Currently in Jetpack Compose Accompanist you can find libraries for Flow Layouts, Pager, Navigation Transitions, Swipe Refresh and more.
We frequently get asked a lot of questions about this library and so thought we could write a post to answer some of the most asked Jetpack Compose Accompanist questions.
A major reason for Accompanist’s existence is the fact that AndroidX does not allow experimental API usage across different modules. There were features we knew we could develop that wouldn’t be allowed in AndroidX. For example, navigation transitions require some experimental animation APIs so cannot be built within navigation-compose but can be built in Jetpack Compose Accompanist.
For standalone features, you might think, why not just mark the APIs as Experimental in AndroidX? When we add an experimental API to AndroidX, we are confident that the feature will exist in some form but possibly the API will change shape. We also try to have them out of Experimental as fast as possible, we know this doesn’t always happen but that is the goal. When we need them to be longer lasting as experimental or aren’t sure the feature makes sense, Jetpack Compose Accompanist is where they live.
This table summarizes the different rules that apply to different API locations. These rules are further detailed later in the post as well – F Droid