# Getting Started with the .NET MAUI BottomSheet

This guide provides the information you need to start using the Telerik UI for .NET MAUI BottomSheet by adding the control to your project.

At the end, you will achieve the following result.

![Telerik UI for .NET MAUI BottomSheet with buttons to open and close a panel containing BottomSheet Content](https://www.telerik.com/maui-ui/documentation/assets/1fb530d7549a16924abab33dac642b11/bottomsheet-getting-started.png)

## Prerequisites

Before adding the BottomSheet, you need to:

1. [Set up your .NET MAUI application](https://www.telerik.com/maui-ui/documentation/get-started/quickstart#prerequisites).

2. [Set Up Telerik Development Environment](https://www.telerik.com/maui-ui/documentation/get-started/quickstart#set-up-telerik-development-environment)

## Define the Control

**1.** When your .NET MAUI application is set up, you are ready to add the BottomSheet control to your page.

```XAML
<telerik:RadBottomSheet x:Name="bottomSheet">
	<telerik:RadBottomSheet.Content>
		<HorizontalStackLayout>
			<telerik:RadTemplatedButton Content="Open BottomSheet Content" 
										Clicked="OnOpenClicked"/>
			<telerik:RadTemplatedButton Content="Close BottomSheet Content" 
										Clicked="OnCloseClicked"/>
		</HorizontalStackLayout>
	</telerik:RadBottomSheet.Content>
	<telerik:RadBottomSheet.BottomSheetContent>
		<Label Text="BottomSheet Content"
			   VerticalOptions="Start"
			   HorizontalOptions="Center" />
	</telerik:RadBottomSheet.BottomSheetContent>
</telerik:RadBottomSheet>
```

```C#
var stack = new HorizontalStackLayout
{
	Spacing = 5,
	VerticalOptions = LayoutOptions.Start
};

var openButton = new RadTemplatedButton
{
	Content = "Open BottomSheet Content",
};

var closeButton = new RadTemplatedButton
{
	Content = "Close BottomSheet Content",
};

openButton.Clicked += OnOpenClicked;
closeButton.Clicked += OnCloseClicked;

stack.Children.Add(openButton);
stack.Children.Add(closeButton);

this.bottomSheet.Content = stack;

var label2 = new Label
{
	Text = "BottomSheet Content",
	VerticalOptions = LayoutOptions.Start,
	HorizontalOptions = LayoutOptions.Center
};

this.bottomSheet.BottomSheetContent = label2;
```

**2.** Add the `telerik` namespace:

```XAML
xmlns:telerik="http://schemas.telerik.com/2022/xaml/maui"
```

```C#
using Telerik.Maui.Controls;
```

**3.** Add the code for opening the BottomSheet view:

```C#
private void OnOpenClicked(object sender, System.EventArgs e)
{
	this.bottomSheet.GoToBottomSheetState(BottomSheetState.PartialStateName);
}
```

**4.** Add the code for closing the BottomSheet view:

```C#
private void OnCloseClicked(object sender, System.EventArgs e)
{
	this.bottomSheet.GoToBottomSheetState(BottomSheetState.HiddenStateName);
}
```

**5.** Register the Telerik controls through the `Telerik.Maui.Controls.Compatibility.UseTelerik` extension method called inside the `CreateMauiApp` method of the `MauiProgram.cs` file of your project:

```C#
using Telerik.Maui.Controls.Compatibility;

public static class MauiProgram
{
	public static MauiApp CreateMauiApp()
	{
		var builder = MauiApp.CreateBuilder();
		builder
			.UseTelerik()
			.UseMauiApp<App>()
			.ConfigureFonts(fonts =>
			{
				fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
			});

		return builder.Build();
	}
}
```

> For a runnable example with the BottomSheet Getting Started scenario, see the [SDKBrowser Demo Application](https://www.telerik.com/maui-ui/documentation/demos-and-sample-apps/sdkbrowser-app) and go to **BottomSheet > Getting Started**.

## Additional Resources

* [.NET MAUI BottomSheet Product Page](https://www.telerik.com/maui-ui/bottomsheet)
* [.NET MAUI BottomSheet Forum Page](https://www.telerik.com/forums/maui?tagId=1763)
* [Telerik .NET MAUI Blogs](https://www.telerik.com/blogs/mobile-net-maui)
* [Telerik .NET MAUI Roadmap](https://www.telerik.com/support/whats-new/maui-ui/roadmap)

## See Also

* [Configure the BottomSheet](https://www.telerik.com/maui-ui/documentation/controls/bottomsheet/configuration)
* [Animation when opening and closing the bottom sheet](https://www.telerik.com/maui-ui/documentation/controls/bottomsheet/animation)
* [Style the BottomSheet](https://www.telerik.com/maui-ui/documentation/controls/bottomsheet/styling)
* [Events](https://www.telerik.com/maui-ui/documentation/controls/bottomsheet/events)
* [Methods](https://www.telerik.com/maui-ui/documentation/controls/bottomsheet/methods)
