Skip to main content

DxTabBase.TabTemplate Property

Specifies the tab’s template.

Namespace: DevExpress.Blazor.Base

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

[Parameter]
public RenderFragment TabTemplate { get; set; }

Property Value

Type Description
RenderFragment

The tab’s template.

Remarks

The tab template allows you to configure tab appearance. In the following example, tabs have custom appearance and titles. Use the ChildContent property to add content inside your tab page.

<DxTabs>
    <DxTabPage>
        <TabTemplate>
            <div style="padding:10px 20px; text-align:center; border-radius:7px;
                 background-color:rgb(95,54,111); color:white">Custom Tab</div>
        </TabTemplate>
        <ChildContent>
            <div>This is the first tab</div>
        </ChildContent>
    </DxTabPage>
    <DxTabPage>
        <TabTemplate>
            <div style="padding:10px 20px; text-align:center; border-radius:7px;
                 background-color:rgb(237,237,237); color:black">Custom Tab</div>
        </TabTemplate>
        <ChildContent>
            <div>This is the second tab</div>
        </ChildContent>
    </DxTabPage>
</DxTabs>

Custom tab appearance

Run Demo: Tabs

See Also