Eynnzerr
Eynnzerr

Reputation: 391

Jetpack Compose: BottomSheetLayout for Material3

I'm glad to see compose material3 has updated to beta release of 1.0.0-beta03. Though, I notice they still haven't added the implementation of something like a BottomSheetLayout or BottomSheetScaffold, which I'd like to apply in my material3 project.

Of course I can at least add the original androidx.compose.material library as a dependency, but it's what I hope to avoid since I've already moved to the brand new material3 UI.

I wonder is there any solution or workaround to realize almost the same effect as a BottomSheetLayout in current version of compose material3. Many thanks!

Upvotes: 0

Views: 2769

Answers (2)

Kevin Worth
Kevin Worth

Reputation: 835

At time of writing, the latest version of Compose Material 3 is 1.1.0-beta02, and as of 1.1.0-alpha06 it has a ModalBottomSheet (they dropped the word "Layout").

Hopefully 1.1.0 comes out of beta soon! (and hopefully the standard bottom sheet gets added as well, whereas right now it only has the modal variant)

Upvotes: 0

Marlinski
Marlinski

Reputation: 394

My solution to have BottomSheetScaffold in material3 was to copy paste the implementation into my project and fixing all the dependencies to use material3 instead of material, or copy-pasting them as well if it wasn't possible. You can find my reply to a similar ticket along with the code over there:

https://stackoverflow.com/a/74175096/4373346

Hope it helps.

Upvotes: 0

Related Questions