# ExpansionPanel Templates

The Telerik ExpansionPanel component for Blazor exposes templates for more flexible content customization. This article lists the available templates and describes how to use them.

* [`TitleTemplate`](https://www.telerik.com/blazor-ui/documentation/components/expansionpanel/templates#cardbodytemplate)
* [`SubTitleTemplate`](https://www.telerik.com/blazor-ui/documentation/components/expansionpanel/templates#cardtemplate)

When using ExpansionPanel templates, wrap the component content in a `<Content>` child tag. Othewise, the `<Content>` tag is optional and you can insert the ExpansionPanel content directly between the opening and closing `TelerikExpansionPanel` tags.

## TitleTemplate

The ExpansionPanel `TitleTemplate` renders at the place of the plain-text title.

Do not use `Title` and `TitleTemplate` at the same time. If the app defines both, the ExpansionPanel will use the `TitleTemplate`.

> caption Using ExpansionPanel TitleTemplate

```RAZOR.skip-repl
<TelerikExpansionPanel>
    <TitleTemplate>
        Expansion Panel Title Template
    </TitleTemplate>
    <Content>
        Expansion Panel Content
    </Content>
</TelerikTaskBoard>
```

Also see the [runnable example below](https://www.telerik.com/blazor-ui/documentation/components/expansionpanel/templates#example).

## SubTitleTemplate

The ExpansionPanel `SubTitleTemplate` renders at the place of the plain-text sub-title.

Do not use `SubTitle` and `SubTitleTemplate` at the same time. If the app defines both, the ExpansionPanel will use the `SubTitleTemplate`.

> caption Using ExpansionPanel SubTitleTemplate

```RAZOR.skip-repl
<TelerikExpansionPanel>
    <SubTitleTemplate>
        Expansion Panel SubTitle Template
    </SubTitleTemplate>
    <Content>
        Expansion Panel Content
    </Content>
</TelerikTaskBoard>
```

## Example

> caption Using ExpansionPanel templates

<demo metaUrl="client/expansionpanel/templates/templates-1/" height="420"></demo>

## Next Steps

* [Handle ExpansionPanel events](https://www.telerik.com/blazor-ui/documentation/components/expansionpanel/events)

## See Also

* [Live Demo: ExpansionPanel](https://demos.telerik.com/blazor-ui/expansionpanel/overview)
* [ExpansionPanel API Reference](https://www.telerik.com/blazor-ui/documentation/api/telerik.blazor.components.telerikexpansionpanel)
