# ExpansionPanel Overview

The Telerik UI ExpansionPanel TagHelper and HtmlHelper for ASP.NET Core are server-side wrappers for the Kendo UI ExpansionPanel widget.

The ExpansionPanel is a layout component that allows the user to expand and collapse a content area within the application.

* [Demo page for the ExpansionPanel HtmlHelper](https://demos.telerik.com/aspnet-core/expansionpanel/index)

* [Demo page for the ExpansionPanel TagHelper](https://demos.telerik.com/aspnet-core/expansionpanel/tag-helper)

## Initializing the ExpansionPanel

The following example demonstrates how to define the ExpansionPanel.

```Razor HtmlHelper
    @(Html.Kendo().ExpansionPanel()
        .Name("brazil")
        .Title("Brazil")
        .SubTitle("South America")
        .Expanded(true)
        .Content("The word 'Brazil' likely comes from the Portuguese word for brazilwood, a tree that once grew plentifully along the Brazilian coast. In Portuguese, brazilwood is called pau-brasil, with the word brasil commonly given the etymology 'red like an ember', formed from brasa ('ember') and the suffix -il (from -iculum or -ilium). As brazilwood produces a deep red dye, it was highly valued by the European textile industry and was the earliest commercially exploited product from Brazil.")
     )
```

```Razor TagHelper
	<kendo-expansionpanel name="brazil" title="Brazil" sub-title="South America" expanded="true">
        <content>
            The word 'Brazil' likely comes from the Portuguese word for brazilwood, a tree that once grew plentifully along the Brazilian coast. In Portuguese, brazilwood is called pau-brasil, with the word brasil commonly given the etymology 'red like an ember', formed from brasa ('ember') and the suffix -il (from -iculum or -ilium). As brazilwood produces a deep red dye, it was highly valued by the European textile industry and was the earliest commercially exploited product from Brazil.
        </content>
    </kendo-expansionpanel>
```

## Basic Configuration

The following example showcases a basic configuration of the ExpansionPanel with specified visual animations used when the user expands or collapses the component.

```Razor HtmlHelper
    @(Html.Kendo().ExpansionPanel()
        .Name("brazil")
        .Title("Brazil")
        .SubTitle("South America")
        .Expanded(true)
        .Animation(animation =>
        {
            animation.Expand(expand => expand.Effects("expandVertical fadeIn").Duration(500));
            animation.Collapse(collapse => collapse.Effects("fadeOut").Duration(1000));
        })
        .Content("The word 'Brazil' likely comes from the Portuguese word for brazilwood, a tree that once grew plentifully along the Brazilian coast. In Portuguese, brazilwood is called pau-brasil, with the word brasil commonly given the etymology 'red like an ember', formed from brasa ('ember') and the suffix -il (from -iculum or -ilium). As brazilwood produces a deep red dye, it was highly valued by the European textile industry and was the earliest commercially exploited product from Brazil.")
     )
```

```Razor TagHelper
	<kendo-expansionpanel name="brazil" title="Brazil" sub-title="South America" expanded="true">
        <animation>
            <collapse enabled="true" effects="fadeOut" duration="1000"/>
            <expand enabled="true" effects="expandVertical fadeIn" duration="500"/>
        </animation>
        <content>
            The word 'Brazil' likely comes from the Portuguese word for brazilwood, a tree that once grew plentifully along the Brazilian coast. In Portuguese, brazilwood is called pau-brasil, with the word brasil commonly given the etymology 'red like an ember', formed from brasa ('ember') and the suffix -il (from -iculum or -ilium). As brazilwood produces a deep red dye, it was highly valued by the European textile industry and was the earliest commercially exploited product from Brazil.
        </content>
    </kendo-expansionpanel>
```

## Functionality and Features

* [Default State](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/layout/expansionpanel/state)—The ExpansionPanel supports various states.
* [Events](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/layout/expansionpanel/events)—The component exposes the `Expand()`, `Collapse()` and `Complete()` events that allow you to control its behavior.
* [Keyboard Navigation](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/layout/expansionpanel/accessibility/keyboard-navigation)—You can navigate through the ExpansionPanel elements with the keyboard.

## Next Steps

* [Getting Started with the ExpansionPanel](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/layout/expansionpanel/getting-started)

* [Basic Usage of the ExpansionPanel HtmlHelper for ASP.NET Core (Demo)](https://demos.telerik.com/aspnet-core/expansionpanel/index)

* [Basic Usage of the ExpansionPanel TagHelper for ASP.NET Core (Demo)](https://demos.telerik.com/aspnet-core/expansionpanel/tag-helper)

## See Also

* [Using the API of the ExpansionPanel for ASP.NET Core (Demo)](https://demos.telerik.com/aspnet-core/expansionpanel/api)
* [Knowledge Base Section](https://www.telerik.com/aspnet-core-ui/documentation/knowledge-base)
