Bottom sheets show secondary content anchored to the bottom of the screen. There are two variants of bottom sheets.

Note: Images use various dynamic color schemes.
Modal bottom sheets are above a scrim while standard bottom sheets don’t have a scrim. Besides this, both types of bottom sheets have the same specs.

More details on anatomy items in the component guidelines.
| Element | Attribute | Related method(s) | Default value |
|---|---|---|---|
| Color | app:backgroundTint |
N/A | ?attr/colorSurfaceContainerLow |
| Shape | app:shapeAppearance |
N/A | ?attr/shapeAppearanceCornerExtraLarge |
| Elevation | android:elevation |
N/A | 1dp |
| Max width | android:maxWidth |
setMaxWidthgetMaxWidth |
640dp |
| Max height | android:maxHeight |
setMaxHeightgetMaxHeight |
N/A |
More information about these attributes and how to use them in the setting behavior section.
| Behavior | Related method(s) | Default value |
|---|---|---|
app:behavior_peekHeight |
setPeekHeightgetPeekHeight |
auto |
app:behavior_hideable |
setHideableisHideable |
false for standardtrue for modal |
app:behavior_skipCollapsed |
setSkipCollapsedgetSkipCollapsed |
false |
app:behavior_fitToContents |
setFitToContentsisFitToContents |
true |
app:behavior_draggable |
setDraggableisDraggable |
true |
app:behavior_draggableOnNestedScroll |
setDraggableOnNestedScrollisDraggableOnNestedScroll |
true |
app:behavior_halfExpandedRatio |
setHalfExpandedRatiogetHalfExpandedRatio |
0.5 |
app:behavior_expandedOffset |
setExpandedOffsetgetExpandedOffset |
0dp |
app:behavior_significantVelocityThreshold |
setSignificantVelocityThreshold getSignificantVelocityThreshold |
500 pixels/s |
app:behavior_multipleScrollingChildrenSupported |
N/A | false |
To save behavior on configuration change:
| Attribute | Related method(s) | Default value |
|---|---|---|
app:behavior_saveFlags |
setSaveFlagsgetSaveFlags |
SAVE_NONE |
| Element | Default value | Theme attribute |
|---|---|---|
| Default style (modal) | @style/Widget.Material3.BottomSheet.Modal |
?attr/bottomSheetStyle |
Note: The ?attr/bottomSheetStyle default style theme attribute is for
modal bottom sheets only. There is no default style theme attribute for standard
bottom sheets, because BottomSheetBehaviors don’t have a designated associated
View.
| Element | Theme overlay | Attribute |
|---|---|---|
| Default theme overlay | ThemeOverlay.Material3.BottomSheetDialog |
?attr/bottomSheetDialogTheme |
For the full list, see styles, attrs, and themes and theme overlays.
Standard bottom sheets co-exist with the screen’s main UI region and allow for simultaneously viewing and interacting with both regions. They are commonly used to keep a feature or secondary content visible on screen when content in the main UI region is frequently scrolled or panned.
BottomSheetBehavior
is applied to a child of
CoordinatorLayout
to make that child a persistent bottom sheet, which is a view that comes up
from the bottom of the screen, elevated over the main content. It can be dragged
vertically to expose more or less content.
API and source code:
BottomSheetBehavior
The following example shows a standard bottom sheet in its collapsed and expanded states:
| Collapsed <div style="width:400px"></div> | Expanded <div style="width:400px"></div> |
|---|---|
![]() |
![]() |
BottomSheetBehavior works in tandem with CoordinatorLayout to let you
display content on a bottom sheet, perform enter/exit animations, respond to
dragging/swiping gestures, etc.
Apply the BottomSheetBehavior to a direct child View of CoordinatorLayout:
<androidx.coordinatorlayout.widget.CoordinatorLayout
...>
<FrameLayout
android:id="@+id/standard_bottom_sheet"
style="@style/Widget.Material3.BottomSheet"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">
<!-- Drag handle for accessibility -->
<com.google.android.material.bottomsheet.BottomSheetDragHandleView
android:id="@+id/drag_handle"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<!-- Bottom sheet contents. -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/title"
.../>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/supporting_text"
.../>
<Button
android:id="@+id/bottomsheet_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/action"
.../>
<com.google.android.material.switchmaterial.SwitchMaterial
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/switch_label"/>
</FrameLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
In this example, the bottom sheet is the FrameLayout.
You can use the BottomSheetBehavior to set attributes like so:
val standardBottomSheet = findViewById<FrameLayout>(R.id.standard_bottom_sheet)
val standardBottomSheetBehavior = BottomSheetBehavior.from(standardBottomSheet)
// Use this to programmatically apply behavior attributes; eg.
// standardBottomSheetBehavior.setState(STATE_EXPANDED);
More information about using the behavior to set attributes is in the setting behavior section.
Modal bottom sheets present a set of choices while blocking interaction with the rest of the screen. They are an alternative to inline menus and simple dialogs on mobile devices, providing additional room for content, iconography, and actions.
BottomSheetDialogFragment
is a thin layer on top of the regular support library Fragment that renders your
fragment as a modal bottom sheet, fundamentally acting as a dialog.
Modal bottom sheets render a shadow on the content below them, to indicate that they are modal. If the content outside of the dialog is tapped, the bottom sheet is dismissed. Modal bottom sheets can be dragged vertically and dismissed by sliding them down completely.
API and source code:
BottomSheetDialogFragment
The following example shows a modal bottom sheet in its collapsed and expanded states:
| Collapsed <div style="width:400px"></div> | Expanded <div style="width:400px"></div> |
|---|---|
![]() |
![]() |
First, subclass BottomSheetDialogFragment and overwrite onCreateView to
provide a layout for the contents of the sheet (in this example, it’s
modal_bottom_sheet_content.xml):
class ModalBottomSheet : BottomSheetDialogFragment() {
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View? = inflater.inflate(R.layout.modal_bottom_sheet_content, container, false)
companion object {
const val TAG = "ModalBottomSheet"
}
}
Then, inside an AppCompatActivity, to show the bottom sheet:
val modalBottomSheet = ModalBottomSheet()
modalBottomSheet.show(supportFragmentManager, ModalBottomSheet.TAG)
BottomSheetDialogFragment is a subclass of AppCompatFragment, which means
you need to use Activity.getSupportFragmentManager().
Note: Don’t call setOnCancelListener or setOnDismissListener on a
BottomSheetDialogFragment. You can override onCancel(DialogInterface) or
onDismiss(DialogInterface) if necessary.
BottomSheetDialogFragment wraps the view in a BottomSheetDialog, which has
its own BottomSheetBehavior. You can define your own BottomSheetBehavior
through overriding onCreateDialog.
Note: If overriding onCreateDialog, you should not override
onCreateView.
import android.view.View
import com.google.android.material.bottomsheet.BottomSheetBehavior
class ModalBottomSheet : BottomSheetDialogFragment() {
override fun onCreateDialog(
savedInstanceState: Bundle?,
): Dialog {
val bottomSheetDialog: BottomSheetDialog =
BottomSheetDialog(
getContext(), R.style.ThemeOverlay_Catalog_BottomSheetDialog_Scrollable
)
bottomSheetDialog.setContentView(R.layout.bottom_sheet_content)
// Set behavior attributes
bottomSheetDialog.getBehavior().setPeekHeight(123)
return bottomSheetDialog
}
}
Before you can use Material bottom sheets, you need to add a dependency to the Material components for Android library. For more information, see the Getting started page.
Bottom sheets support the customization of color and shape.
API and source code:
BottomSheetBehavior
BottomSheetDialogFragment
The following example shows a bottom sheet with Material theming, in its collapsed and expanded states.

Setting the theme attribute bottomSheetDialogTheme to your custom
ThemeOverlay will affect all bottom sheets.
In res/values/themes.xml:
<style name="Theme.App" parent="Theme.Material3.*">
...
<item name="bottomSheetDialogTheme">@style/ThemeOverlay.App.BottomSheetDialog</item>
</style>
<style name="ThemeOverlay.App.BottomSheetDialog" parent="ThemeOverlay.Material3.BottomSheetDialog">
<item name="bottomSheetStyle">@style/ModalBottomSheetDialog</item>
</style>
In res/values/styles.xml:
<style name="ModalBottomSheetDialog" parent="Widget.Material3.BottomSheet.Modal">
<item name="backgroundTint">@color/shrine_pink_light</item>
<item name="shapeAppearance">@style/ShapeAppearance.App.LargeComponent</item>
</style>
<style name="ShapeAppearance.App.LargeComponent" parent="ShapeAppearance.Material3.LargeComponent">
<item name="cornerFamily">cut</item>
<item name="cornerSize">24dp</item>
</style>
Note: The benefit of using a custom ThemeOverlay is that any changes to
your main theme, such as updated colors, will be reflected in the bottom sheet,
as long as they’re not overridden in your custom theme overlay. If you use a
custom Theme instead, by extending from one of the
Theme.Material3.*.BottomSheetDialog variants, you will have more control over
exactly what attributes are included in each, but it also means you’ll have to
duplicate any changes that you’ve made in your main theme into your custom
theme.