syncfusion-blazor-tabs — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited syncfusion-blazor-tabs (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Use the Syncfusion Blazor Tabs component when you need to:
The Syncfusion Blazor Tabs component (SfTab) provides a flexible, accessible, and feature-rich tabbed navigation interface with support for:
SelectedItem propertyContentTemplate and HeaderTemplate// Install via Package Manager Console
Install-Package Syncfusion.Blazor.Navigations
Install-Package Syncfusion.Blazor.ThemesOr via .NET CLI:
dotnet add package Syncfusion.Blazor.Navigations
dotnet add package Syncfusion.Blazor.ThemesIn Program.cs:
using Syncfusion.Blazor;
var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add<App>("#app");
builder.Services.AddSyncfusionBlazor();
await builder.Build().RunAsync();In _Imports.razor:
@using Syncfusion.Blazor
@using Syncfusion.Blazor.NavigationsIn index.html (in <head> section):
<link href="_content/Syncfusion.Blazor.Themes/bootstrap5.css" rel="stylesheet" />
<script src="_content/Syncfusion.Blazor.Core/scripts/syncfusion-blazor.min.js" type="text/javascript"></script>@using Syncfusion.Blazor.Navigations
<SfTab>
<TabItems>
<TabItem>
<ChildContent>
<TabHeader Text="Tab 1"></TabHeader>
</ChildContent>
<ContentTemplate>
<div>Content for Tab 1</div>
</ContentTemplate>
</TabItem>
<TabItem>
<ChildContent>
<TabHeader Text="Tab 2"></TabHeader>
</ChildContent>
<ContentTemplate>
<div>Content for Tab 2</div>
</ContentTemplate>
</TabItem>
<TabItem>
<ChildContent>
<TabHeader Text="Tab 3"></TabHeader>
</ChildContent>
<ContentTemplate>
<div>Content for Tab 3</div>
</ContentTemplate>
</TabItem>
</TabItems>
</SfTab>| Property | Type | Default | Description | Example | |
|---|---|---|---|---|---|
AllowDragAndDrop | bool | false | Enables drag-and-drop reordering of tabs | AllowDragAndDrop="true" | |
CssClass | string | null | CSS class applied to the Tab container | CssClass="e-fill" | |
DragArea | string | null | Sets the area to move the draggable element; dragging is restricted outside this area | DragArea="body" | |
EnablePersistence | bool | false | Enables state persistence in browser cookies | EnablePersistence="true" | |
Height | string | null | Height of the Tab component | Height="250px" | |
HeaderPlacement | HeaderPosition | Top | Position of tab headers (Top, Bottom, Left, Right) | HeaderPlacement="HeaderPosition.Left" | |
ID | string | null | Unique identifier for the component (required for persistence) | ID="myTabs" | |
LoadOn | ContentLoad | Dynamic | Content rendering mode (Dynamic, Demand, Init) | LoadOn="ContentLoad.Demand" | |
OverflowMode | OverflowMode | Scrollable | Behavior for overflowed tabs (Scrollable, Popup) | OverflowMode="OverflowMode.Popup" | |
ReorderActiveTab | bool | true | Reorders active tab when clicking from popup | ReorderActiveTab="false" | |
ScrollStep | int | 0 | Number of pixels to scroll when clicking navigation arrows | ScrollStep="150" | |
SelectedItem | int | 0 | Index of currently selected tab (supports two-way binding) | @bind-SelectedItem="tabIndex" | |
ShowCloseButton | bool | false | Shows close button on tab headers | ShowCloseButton="true" | |
SwipeMode | TabSwipeMode | TabSwipeMode.Touch \ | TabSwipeMode.Mouse | Enables swipe gestures for tab navigation | SwipeMode="TabSwipeMode.Touch" |
Width | string | null | Width of the Tab component | Width="500px" | |
Locale | string | "en-US" | Sets the locale for localization support | Locale="fr-FR" | |
ShouldReinitialize | bool | false | Gets or sets a value that indicates whether to re-initialize the tab content on every TabItem initialization | ShouldReinitialize="true" |
#### Property Examples
Setting HeaderPlacement to create vertical tabs:
<SfTab HeaderPlacement="HeaderPosition.Left" Height="250px" Width="500px">
<TabItems>
<!-- Tab items -->
</TabItems>
</SfTab>Enabling drag-and-drop for tab reordering:
<SfTab AllowDragAndDrop="true">
<TabItems>
<!-- Tab items -->
</TabItems>
</SfTab>Restricting drag area with DragArea property:
<div id="dragContainer" style="border: 2px solid blue; padding: 10px;">
<SfTab AllowDragAndDrop="true" DragArea="#dragContainer">
<TabItems>
<TabItem>
<ChildContent>
<TabHeader Text="Tab 1"></TabHeader>
</ChildContent>
<ContentTemplate>Tab 1 content</ContentTemplate>
</TabItem>
<TabItem>
<ChildContent>
<TabHeader Text="Tab 2"></TabHeader>
</ChildContent>
<ContentTemplate>Tab 2 content</ContentTemplate>
</TabItem>
<TabItem>
<ChildContent>
<TabHeader Text="Tab 3"></TabHeader>
</ChildContent>
<ContentTemplate>Tab 3 content</ContentTemplate>
</TabItem>
</TabItems>
</SfTab>
</div>Two-way binding with SelectedItem:
<SfNumericTextBox @bind-Value="SelectedTabIndex" Min="0" Max="4"></SfNumericTextBox>
<SfTab @bind-SelectedItem="SelectedTabIndex">
<TabItems>
<!-- Tab items -->
</TabItems>
</SfTab>
@code {
private int SelectedTabIndex = 0;
}Enabling state persistence:
<SfTab ID="PersistentTabs" EnablePersistence="true">
<TabItems>
<!-- Tab items -->
</TabItems>
</SfTab>Customizing scroll step for scrollable mode:
<SfTab Width="400px" OverflowMode="OverflowMode.Scrollable" ScrollStep="150">
<TabItems>
<!-- Tab items -->
</TabItems>
</SfTab>Disabling swipe gestures:
<SfTab SwipeMode="~TabSwipeMode.Touch & ~TabSwipeMode.Mouse">
<TabItems>
<!-- Tab items -->
</TabItems>
</SfTab>Setting locale for localization:
<SfTab Locale="fr-FR">
<TabItems>
<TabItem Content="Onglet 1">
<ChildContent>
<TabHeader Text="Tab 1"></TabHeader>
</ChildContent>
</TabItem>
</TabItems>
</SfTab>Using ShouldReinitialize to re-initialize tab content on every TabItem initialization:
@using Syncfusion.Blazor.Navigations
@using Syncfusion.Blazor.Buttons
<SfButton @onclick="ToggleReinitialize">Toggle Re-initialization</SfButton>
<p>Re-initialize: @shouldReinitialize</p>
<SfTab ShouldReinitialize="@shouldReinitialize">
<TabItems>
<TabItem>
<ChildContent>
<TabHeader Text="Tab 1"></TabHeader>
</ChildContent>
<ContentTemplate>
<div>
<p>Content loaded at: @DateTime.Now.ToString("HH:mm:ss.fff")</p>
<p>This content reloads every time ShouldReinitialize is triggered</p>
</div>
</ContentTemplate>
</TabItem>
<TabItem>
<ChildContent>
<TabHeader Text="Tab 2"></TabHeader>
</ChildContent>
<ContentTemplate>
<div>
<p>Content loaded at: @DateTime.Now.ToString("HH:mm:ss.fff")</p>
<p>This content reloads every time ShouldReinitialize is triggered</p>
</div>
</ContentTemplate>
</TabItem>
</TabItems>
</SfTab>
@code {
private bool shouldReinitialize = false;
private async Task ToggleReinitialize()
{
shouldReinitialize = !shouldReinitialize;
await Task.Delay(500);
shouldReinitialize = !shouldReinitialize;
}
}| Property | Type | Default | Description | Example |
|---|---|---|---|---|
Items | List<TabItem> | Empty | Gets or sets the list of tab items to be rendered in the tab panel | Items="@tabItems" |
#### TabItems Property Examples
Using Items property to bind tab items from a list:
@using Syncfusion.Blazor.Navigations
<SfButton @onclick="AddTab">Add Tab</SfButton>
<SfButton @onclick="RemoveTab">Remove Tab</SfButton>
<SfTab>
<TabItems Items="@TabItems">
</TabItems>
</SfTab>
@code {
private List<TabItem> TabItems = new List<TabItem>();
protected override void OnInitialized()
{
TabItems = new List<TabItem>
{
new TabItem
{
Header = new TabHeader { Text = "HTML" },
Content = "HTML is the standard markup language"
},
new TabItem
{
Header = new TabHeader { Text = "CSS" },
Content = "CSS is used for styling web pages"
},
new TabItem
{
Header = new TabHeader { Text = "JavaScript" },
Content = "JavaScript is a programming language"
}
};
}
private void AddTab()
{
TabItems.Add(new TabItem
{
Header = new TabHeader { Text = $"New Tab {TabItems.Count + 1}" },
Content = "New tab content"
});
}
private void RemoveTab()
{
if (TabItems.Count > 0)
TabItems.RemoveAt(TabItems.Count - 1);
}
}| Property | Type | Default | Description | Example |
|---|---|---|---|---|
Content | string | null | Simple string content for the tab | Content="Tab content text" |
ContentTemplate | RenderFragment | null | Template for rendering complex content | <ContentTemplate>...</ContentTemplate> |
Disabled | bool | false | Disables the tab item and prevents selection | Disabled="true" |
HeaderTemplate | RenderFragment | null | Template for custom header rendering | <HeaderTemplate>...</HeaderTemplate> |
TabIndex | int | -1 | Tab order for keyboard navigation | TabIndex="0" |
Visible | bool | true | Shows or hides the tab item | Visible="true" |
#### Property Examples
Disabling specific tab items:
<SfTab>
<TabItems>
<TabItem Content="Available tab">
<ChildContent>
<TabHeader Text="Tab 1"></TabHeader>
</ChildContent>
</TabItem>
<TabItem Disabled="true" Content="Unavailable tab">
<ChildContent>
<TabHeader Text="Tab 2 (Disabled)"></TabHeader>
</ChildContent>
</TabItem>
</TabItems>
</SfTab>Toggling tab visibility:
<SfButton @onclick="ToggleVisibility">Toggle Tab Visibility</SfButton>
<SfTab>
<TabItems>
<TabItem Visible="@isTabVisible" Content="Visible/Hidden Tab">
<ChildContent>
<TabHeader Text="Toggle Tab"></TabHeader>
</ChildContent>
</TabItem>
</TabItems>
</SfTab>
@code {
private bool isTabVisible = true;
private void ToggleVisibility()
{
isTabVisible = !isTabVisible;
}
}Enabling Tab key navigation:
<SfTab>
<TabItems>
<TabItem TabIndex="0">
<ChildContent>
<TabHeader Text="Tab 1"></TabHeader>
</ChildContent>
<ContentTemplate>Content 1</ContentTemplate>
</TabItem>
<TabItem TabIndex="0">
<ChildContent>
<TabHeader Text="Tab 2"></TabHeader>
</ChildContent>
<ContentTemplate>Content 2</ContentTemplate>
</TabItem>
</TabItems>
</SfTab>| Property | Type | Default | Description | Example |
|---|---|---|---|---|
IconCss | string | null | CSS class for tab header icon | IconCss="e-twitter" |
IconPosition | IconPosition | Left | Icon position relative to text (Left, Right, Top, Bottom) | IconPosition="IconPosition.Top" |
Text | string | null | Header text display | Text="Tab Title" |
#### Property Examples
Adding icons to tab headers:
<SfTab>
<TabItems>
<TabItem>
<ChildContent>
<TabHeader Text="Twitter" IconCss="e-twitter" IconPosition="IconPosition.Left"></TabHeader>
</ChildContent>
<ContentTemplate>Twitter content...</ContentTemplate>
</TabItem>
<TabItem>
<ChildContent>
<TabHeader Text="Facebook" IconCss="e-facebook" IconPosition="IconPosition.Top"></TabHeader>
</ChildContent>
<ContentTemplate>Facebook content...</ContentTemplate>
</TabItem>
</TabItems>
</SfTab>| Method | Parameters | Return Type | Description | Example |
|---|---|---|---|---|
AddTab | List<TabItem> items, int index | Task | Adds new tab items at specified index | await Tab.AddTab(newItems, 1) |
EnableTabAsync | int index, bool enable | Task | Enables or disables a tab item | await Tab.EnableTabAsync(0, false) |
RemoveTab | int index | void | Removes tab item at specified index | Tab.RemoveTab(0) |
Select | int index | void | Selects a tab by index (non-async) | Tab.Select(1) |
SelectAsync | int index | Task | Asynchronously selects a tab by index | await Tab.SelectAsync(1) |
#### Method Examples
Dynamically adding tabs:
<SfButton @onclick="AddNewTab">Add Tab</SfButton>
<SfTab @ref="TabControl">
<TabItems>
<!-- Initial tabs -->
</TabItems>
</SfTab>
@code {
private SfTab TabControl;
private async Task AddNewTab()
{
var newTab = new TabItem
{
Header = new TabHeader { Text = "New Tab" },
Content = "New tab content"
};
await TabControl.AddTab(new List<TabItem> { newTab }, TabControl.Items.Count);
}
}Removing tabs:
<SfButton @onclick="RemoveFirstTab">Remove First Tab</SfButton>
<SfTab @ref="TabControl">
<TabItems>
<!-- tabs -->
</TabItems>
</SfTab>
@code {
private SfTab TabControl;
private void RemoveFirstTab()
{
if (TabControl.Items.Count > 0)
{
TabControl.RemoveTab(0);
}
}
}Programmatically selecting tabs:
<SfButton @onclick="SelectTab">Select Tab 2</SfButton>
<SfTab @ref="TabControl">
<TabItems>
<!-- tabs -->
</TabItems>
</SfTab>
@code {
private SfTab TabControl;
private async Task SelectTab()
{
await TabControl.SelectAsync(1);
}
}Enabling/disabling tabs conditionally:
<SfButton @onclick="DisableSecondTab">Disable Tab 2</SfButton>
<SfTab @ref="TabControl" ID="ConditionTab">
<TabItems>
<!-- tabs -->
</TabItems>
</SfTab>
@code {
private SfTab TabControl;
private async Task DisableSecondTab()
{
await TabControl.EnableTabAsync(1, false);
}
}| Event | Handler Type | EventArgs | Description | Fires When |
|---|---|---|---|---|
Created | EventCallback | CreatedEventArgs | Fires after component is created and rendered | Component initialization completes |
Dragged | EventCallback | DragEventArgs | Fires when drag-drop action completes | Tab item drop action completes |
OnDragStart | EventCallback | DragStartEventArgs | Fires before tab drag starts | User initiates drag on tab |
Selecting | EventCallback | SelectingEventArgs | Fires before tab selection changes | User clicks or Select() is called |
Selected | EventCallback | SelectEventArgs | Fires after tab selection changes | New tab becomes active |
#### Event Arguments
SelectingEventArgs:
Cancel (bool): Set to true to prevent tab selectionPreviousIndex (int): Index of previously selected tabIndex (int): Index of tab being selectedSelectEventArgs:
Index (int): Index of newly selected tabPreviousIndex (int): Index of previously selected tabIsInteracted (bool): true if user clicked; false if programmatically selectedDragStartEventArgs:
Cancel (bool): Set to true to prevent drag operationDraggedItem (TabItem): The tab item being draggedEvent (MouseEventArgs): Browser mouse event detailsDragEventArgs:
DraggedItem (TabItem): The tab item that was draggedDropIndex (int): New position index after dropEvent (MouseEventArgs): Browser mouse event details#### Event Examples
Detecting user interaction vs programmatic selection:
@using Syncfusion.Blazor.Navigations
<div>Last action: @lastAction</div>
<SfTab @bind-SelectedItem="SelectedTab">
<TabEvents Selected="OnSelected"></TabEvents>
<TabItems>
<TabItem Content="Tab 1 content">
<ChildContent>
<TabHeader Text="Tab 1"></TabHeader>
</ChildContent>
</TabItem>
<TabItem Content="Tab 2 content">
<ChildContent>
<TabHeader Text="Tab 2"></TabHeader>
</ChildContent>
</TabItem>
</TabItems>
</SfTab>
@code {
private int SelectedTab = 0;
private string lastAction = "None";
private void OnSelected(SelectEventArgs args)
{
if (args.IsInteracted)
{
lastAction = $"User clicked Tab {args.Index + 1}";
}
else
{
lastAction = $"Tab {args.Index + 1} selected programmatically";
}
}
}Preventing tab selection with validation:
<SfTab @ref="TabControl">
<TabEvents Selecting="OnSelecting"></TabEvents>
<TabItems>
<TabItem Content="Form content">
<ChildContent>
<TabHeader Text="Form"></TabHeader>
</ChildContent>
</TabItem>
<TabItem Content="Confirmation">
<ChildContent>
<TabHeader Text="Confirm"></TabHeader>
</ChildContent>
</TabItem>
</TabItems>
</SfTab>
@code {
private SfTab TabControl;
private void OnSelecting(SelectingEventArgs args)
{
// Prevent moving to confirmation tab if form is invalid
if (args.Index == 1 && !isFormValid)
{
args.Cancel = true;
}
}
private bool isFormValid = false;
}Handling drag and drop events:
<SfTab AllowDragAndDrop="true">
<TabEvents OnDragStart="OnDragStart" Dragged="OnDragged"></TabEvents>
<TabItems>
<!-- Tab items -->
</TabItems>
</SfTab>
@code {
private void OnDragStart(DragStartEventArgs args)
{
Console.WriteLine($"Dragging tab: {args.DraggedItem.Header?.Text}");
}
private void OnDragged(DragEventArgs args)
{
Console.WriteLine($"Tab dropped at position: {args.DropIndex}");
}
}This section provides focused examples for key features. For complete property examples, see the Core API Reference section above.
<SfTab>
<TabItems>
<TabItem>
<ChildContent>
<TabHeader Text="USA"></TabHeader>
</ChildContent>
<ContentTemplate>
<SfTab>
<TabItems>
<TabItem Content="New York description">
<ChildContent>
<TabHeader Text="New York"></TabHeader>
</ChildContent>
</TabItem>
<TabItem Content="Los Angeles description">
<ChildContent>
<TabHeader Text="Los Angeles"></TabHeader>
</ChildContent>
</TabItem>
</TabItems>
</SfTab>
</ContentTemplate>
</TabItem>
<TabItem>
<ChildContent>
<TabHeader Text="France"></TabHeader>
</ChildContent>
<ContentTemplate>
<SfTab>
<TabItems>
<TabItem Content="Paris description">
<ChildContent>
<TabHeader Text="Paris"></TabHeader>
</ChildContent>
</TabItem>
<TabItem Content="Marseille description">
<ChildContent>
<TabHeader Text="Marseille"></TabHeader>
</ChildContent>
</TabItem>
</TabItems>
</SfTab>
</ContentTemplate>
</TabItem>
</TabItems>
</SfTab>@using Syncfusion.Blazor.Navigations
<SfTab>
<TabAnimationSettings>
<TabAnimationPrevious Effect="AnimationEffect.SlideLeftIn" Duration="500"></TabAnimationPrevious>
<TabAnimationNext Effect="AnimationEffect.SlideRightIn" Duration="500"></TabAnimationNext>
</TabAnimationSettings>
<TabItems>
<TabItem Content="Tab 1 content">
<ChildContent>
<TabHeader Text="Tab 1"></TabHeader>
</ChildContent>
</TabItem>
<TabItem Content="Tab 2 content">
<ChildContent>
<TabHeader Text="Tab 2"></TabHeader>
</ChildContent>
</TabItem>
</TabItems>
</SfTab>Available animation effects: SlideLeftIn, SlideRightIn, FadeIn, FadeOut, FadeZoomIn, FadeZoomOut, ZoomIn, ZoomOut, None
@using Syncfusion.Blazor.Navigations
@using Syncfusion.Blazor.Buttons
<SfButton @onclick="AddItemClick">Add Tab</SfButton>
<SfButton @onclick="RemoveItemClick">Remove Tab</SfButton>
<SfTab @ref="Tab" ShowCloseButton="true">
<TabItems>
@foreach (var item in TabItems)
{
<TabItem>
<ChildContent>
<TabHeader Text="@item.Title"></TabHeader>
</ChildContent>
<ContentTemplate>
<div>@item.Content</div>
</ContentTemplate>
</TabItem>
}
</TabItems>
</SfTab>
@code {
private SfTab Tab;
private List<TabItemData> TabItems = new List<TabItemData>();
protected override void OnInitialized()
{
TabItems = new List<TabItemData>
{
new TabItemData { Title = "ASP.NET", Content = "ASP.NET is a web framework..." },
new TabItemData { Title = "ASP.NET MVC", Content = "ASP.NET MVC implements the MVC pattern..." }
};
}
private void AddItemClick()
{
TabItems.Add(new TabItemData { Title = "New Tab", Content = "New content..." });
}
private void RemoveItemClick()
{
if (TabItems.Count > 0) TabItems.RemoveAt(0);
}
public class TabItemData
{
public string Title { get; set; }
public string Content { get; set; }
}
}📄 Read: references/getting-started.md
📄 Read: references/tab-selection-and-navigation.md
📄 Read: references/tab-item-management.md
📄 Read: references/orientation-and-header-placement.md
📄 Read: references/content-render-modes.md
📄 Read: references/animations.md
📄 Read: references/styling-and-theming.md
📄 Read: references/accessibility-and-localization.md
📄 Read: references/advanced-features-and-customization.md
Before finalizing your tab implementation:
Syncfusion.Blazor.Navigations NuGet package installedSyncfusion.Blazor.Themes NuGet package installedNext Steps:
Related Resources:
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.