Plugin.Maui.BottomSheet
0.0.2-alpha
See the version list below for details.
dotnet add package Plugin.Maui.BottomSheet --version 0.0.2-alpha
NuGet\Install-Package Plugin.Maui.BottomSheet -Version 0.0.2-alpha
<PackageReference Include="Plugin.Maui.BottomSheet" Version="0.0.2-alpha" />
<PackageVersion Include="Plugin.Maui.BottomSheet" Version="0.0.2-alpha" />
<PackageReference Include="Plugin.Maui.BottomSheet" />
paket add Plugin.Maui.BottomSheet --version 0.0.2-alpha
#r "nuget: Plugin.Maui.BottomSheet, 0.0.2-alpha"
#:package Plugin.Maui.BottomSheet@0.0.2-alpha
#addin nuget:?package=Plugin.Maui.BottomSheet&version=0.0.2-alpha&prerelease
#tool nuget:?package=Plugin.Maui.BottomSheet&version=0.0.2-alpha&prerelease
Plugin.Maui.BottomSheet
Show native BottomSheets with .NET MAUI!
This library comes with a built-in NavigationService to make navigation between BottomSheets und Pages easy!
<img src="screenshots/welcome.png?raw=true" height="400"/> <img src="screenshots/demo.gif" height="400" /> <img src="screenshots/navigation.gif" height="400" />
Samples
<strong>Check out the sample project to explore all features!</strong>.
Prerequisites
iOS at least iOS 15
Android at least API 21
Setup
Enable this plugin by calling UseBottomSheet() in your MauiProgram.cs
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.UseMauiBottomSheet()
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
})
.RegisterPages()
.RegisterViewModels()
.PlatformServices();
#if DEBUG
builder.Logging.AddDebug();
#endif
return builder.Build();
Bottom Sheet Control
Properties
All properties expect ContentTemplate, TitleViewTemplate and Peek.PeekViewDataTemplate are BindableProperties
IsOpen Open or close the BottomSheet
ContentTemplate Content of the BottomSheet.
Peek Peek settings
| Setting | Decription |
| -------- | ------- |
| IgnoreSafeArea | Bottom safe area will either be ignored or not |
| PeekHeight | Static value for the peek height |
| PeekViewDataTemplate | If set the view will be placed above the ContentTemplate and it's height will be set as peek height |
Appearance
IsDraggable Disable/Enable dragging(especially usefull if drawing gestures are made inside the bottom sheet)
HasHandle Display a drag handle at the top of the BottomSheet
Header
ShowHeader Display a header at the top of the BottomSheet
TopLeftButtonText Text of top left button
TopRightButtonText Text of top right button
TitleText BottomSheet title
TitleViewTemplate Custom title view.
HeaderAppearance Define the look of the header
| BottomSheetHeaderAppearanceMode | Decription |
| -------- | ------- |
| None | Do not show a button |
| LeftAndRightButton | Show a button at the top lef and at the top right |
| LeftButton | Show a button at the top left |
| RightButton | Show a button at the top right |
States
SheetStates Allowed states of the BottomSheet
| BottomSheetState | Decription |
| -------- | ------- |
| Unknown | BottomSheet can be all available states |
| Peek | Only BottomSheet.Peek is visible. Expanding not allowed |
| Medium | BottomSheet height will be half of the sceen. Expanding/collapsing not allowed |
| Large | BottomSheet will be display in full screen. Expanding/collapsing not allowed |
| All | BottomSheet can be all available states |
SelectedSheetState Change the current Sheet state. Sheet will be expanded/collapsed if the selected state is allowed.
Interaction
Commands
TopRightButtonCommand TopRightButtonCommandParameter
TopLeftButtonCommand TopLeftButtonCommandParameter
ClosingCommand ClosingCommandParameter
ClosedCommand ClosedCommandParameter
OpeningCommand OpeningCommandParameter
OpenedCommand OpenedCommandParameter
Events
Closing
Closed
Opening
Opened
XAML usage
In order to make use of the sheet within XAML you can use this namespace:
'xmlns:bottomsheet="clr-namespace:Maui.BottomSheet;assembly=Maui.BottomSheet"'
The BottomSheet is a View and can be added in any layout or control which accepts View.
To open/close a BottomSheet simply set the IsOpen property to true/false. You can have <strong>multiple</strong> BottomSheets on one page.
<bottomsheet:BottomSheet IsOpen="True">
<bottomsheet:BottomSheet.ContentTemplate>
<DataTemplate>
<VerticalStackLayout>
<Label Text="I'm a simple BottomSheet!/>
</VerticalStackLayout>
</DataTemplate>
</bottomsheet:BottomSheet.ContentTemplate>
</bottomsheet:BottomSheet>
Navigation
The IBottomSheetNavigationService is be registered automatically and can be resolved by DI.
private readonly IBottomSheetNavigationService _bottomSheetNavigationService;
public MainViewModel(IBottomSheetNavigationService bottomSheetNavigationService)
{
_bottomSheetNavigationService = bottomSheetNavigationService;
}
To navigate to a BottomSheet you have to register the BottomSheets and ViewModels
builder.Services.AddTransient<BottomSheetVMViewModel>();
builder.Services.AddTransient<BottomSheetGoBackViewModel>();
builder.Services.AddTransient<IBottomSheet, BottomSheetNoVM>();
builder.Services.AddTransient<IBottomSheet, BottomSheetVM>();
builder.Services.AddTransient<IBottomSheet, BottomSheetGoBack>();
Navigate to a BottomSheet and wire it automatically to the specified ViewModel or navigate to a BottomSheet without a ViewModel
_bottomSheetNavigationService.NavigateTo<BottomSheetNoVM>();
_bottomSheetNavigationService.NavigateTo<BottomSheetVM, BottomSheetVMViewModel>();
To close a BottomSheet simply call GoBack or ClearBottomSheetStack(if you have multiple sheets open and want to close all of them)
You can pass parameters on each navigation(this follows the principle of shell navigation)
Pass an instance of the BottomSheetNavigationParameters to the navigation and if the target ViewModel implements IQueryAttributable the parameters will be applied.
<img src="screenshots/navigation.gif" height="400" />
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0-android34.0 is compatible. net8.0-ios17.0 is compatible. net9.0-android was computed. net9.0-ios was computed. net10.0-android was computed. net10.0-ios was computed. |
-
net8.0-android34.0
- Microsoft.Maui.Controls (>= 8.0.3)
-
net8.0-ios17.0
- Microsoft.Maui.Controls (>= 8.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on Plugin.Maui.BottomSheet:
| Repository | Stars |
|---|---|
|
securefolderfs-community/SecureFolderFS
Powerful, secure, modern way to keep your files protected.
|
| Version | Downloads | Last Updated |
|---|---|---|
| 9.1.9 | 6,983 | 7/13/2025 |
| 9.1.8 | 1,539 | 6/19/2025 |
| 9.1.7 | 581 | 6/9/2025 |
| 9.1.6 | 3,409 | 5/25/2025 |
| 9.1.5 | 1,474 | 4/19/2025 |
| 9.1.4 | 2,908 | 4/2/2025 |
| 9.1.3 | 539 | 3/15/2025 |
| 9.1.2 | 1,546 | 2/21/2025 |
| 9.1.1 | 239 | 2/20/2025 |
| 9.1.0 | 2,517 | 2/9/2025 |
| 9.0.0 | 225 | 2/2/2025 |
| 1.0.2 | 2,168 | 9/30/2024 |
| 1.0.1 | 162 | 9/29/2024 |
| 1.0.0 | 984 | 12/10/2023 |