New to Telerik UI for Blazor? Download Free 30-day trial
Menu - Adaptive
- EXAMPLE
- VIEW SOURCE
- EDIT IN TELERIK REPL
- Change Theme
default
- Adaptive.razor
Description
The Telerik Blazor Menu can be combined with the Telerik Blazor MediaQuery component to achieve responsive and adaptive layout. The Telerik Blazor MediaQuery detects the initial dimensions of the viewport of the user's browser and rearranges the layout depending on the configuration within the Media property within the
The demo above shows how the horizontal layout of the Blazor Menu UI component transitions to a vertical hamburger menu that is implemented with the help of the Blazor Drawer component. At width 828px and above (the width at which the menu transitions is 768px, however, the demo container has two paddings of 30px each that are included in the width for the breakpoint of the MediaQuery). At width between 560px and 828px, the Menu is substituted with a Drawer. Below 560px, the Drawer covers all available space. To see the adaptivity in action, either resize your whole browser window or open the dev tools of the browser (Press F12) and use it to modify the available width for the demo.