# ASP.NET MVC Responsive Panel Overview

The Telerik UI Responsive Panel HtmlHelper for ASP.NET MVC is a server-side wrapper for the Kendo UI Responsive Panel widget.

The Responsive Panel allows you to hide part of a page content on small screens. The component collapses a content element when a specified `breakpoint` is reached. The collapsed content is then expanded by a button with the `k-rpanel-toggle` class. To set the placement of the expandable content, use the `Orientation` option.

* [Demo page for the Responsive Panel HtmlHelper](https://demos.telerik.com/aspnet-mvc/responsive-panel/index)

## Initializing the Responsive Panel

The following example demonstrates how to define the Responsive Panel.

```Razor HtmlHelper
    @(Html.Kendo().ResponsivePanel()
        .Name("sidebar")
        .Breakpoint(1000)
        .Content("<p>This content will collapse if the width is less than 1000px</p>")
    )
```

## Basic Configuration

The following example demonstrates a basic configuration of the Responsive Panel.

```Razor HtmlHelper
    <div class="dash-head">
        
        <button class="k-rpanel-toggle"><span class="k-icon k-i-menu"></span></button>
    </div>
    
    @(Html.Kendo().ResponsivePanel()
        .Name("sidebar")
        .Breakpoint(1000)
        .Orientation(ResponsivePanelOrientation.Left)
        .Content("<div> <div id='profile' class='widget'> <h3>Profile</h3> <div> <div class='profile-photo'>" +
        " </div> <h4>Lynda Schleifer</h4> <p>Sales Associate</p> </div> </div> <div id='teammates' class='widget'> <h3>Teammates</h3>" +
        " <div> <div class='team-mate'> <img src='./shared/web/panelbar/andrew.jpg' alt='Andrew Fuller'> <h4>Andrew Fuller</h4> <p>Team Lead</p> </div> " +
        " <div class='team-mate'> <img src='./shared/web/panelbar/nancy.jpg' alt='Nancy Leverling'> <h4>Nancy Leverling</h4> <p>Sales Associate</p></div>" +
        " <div class='team-mate'> <img src='./shared/web/panelbar/robert.jpg' alt='Robert King'> <h4>Robert King</h4> <p>Business System Analyst</p> </div> </div> </div>")
    )
```

> The Telerik UI Responsive Panel component accepts any HTML that is passed in the `Content` option. For more advanced scenarios, pass custom HTML of your choice.

## CSP Compliance

The Responsive Panel relies on inline styles to create dynamic media queries. If strict [CSP mode](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/helper-basics/content-security-policy) is enabled for the applicaiton you can use the [`.Nonce`](https://www.telerik.com/aspnet-mvc/documentation/api/kendo.mvc.ui.fluent/responsivepanelbuilder#noncesystemstring) configuration option and specify a nonce attribute that will be set to the inline style injected in the `head` tag, containing the dynamic media query styles.

## Next Steps

* [Getting Started with the Responsive Panel](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/layout/responsivepanel/getting-started)
* [Basic Usage of the Responsive Panel HtmlHelper for ASP.NET MVC (Demo)](https://demos.telerik.com/aspnet-mvc/responsive-panel)

## See Also

* [Server-Side API of the Responsive Panel](https://www.telerik.com/aspnet-mvc/documentation/api/responsivepanel)

* [Knowledge Base Section](https://www.telerik.com/aspnet-mvc/documentation/knowledge-base)
