syncfusion-blazor-tabs
````skill
What this skill does
````skill
---
name: syncfusion-blazor-tabs
description: Implement Syncfusion Blazor Tab component for tabbed navigation interfaces. Use this skill whenever the user needs to create tab navigation, organize content into tabs, handle tab selection, manage tab items, configure tab orientation, customize tab appearance, implement responsive tab modes, or build any tabbed interface in Blazor applications.
metadata:
author: "Syncfusion Inc"
version: "1.0.0"
category: "Navigation"
---
# Implementing Syncfusion Blazor Tabs Component
## When to Use This Skill
Use the Syncfusion Blazor Tabs component when you need to:
- Organize content into multiple sections with tab-based navigation
- Create tabbed interfaces for content organization and switching
- Handle programmatic and user-driven tab selection
- Dynamically add, remove, or manage tab items
- Implement vertical or horizontal tab layouts
- Build responsive tab interfaces that adapt to different screen sizes
- Create nested tab structures for hierarchical content organization
- Customize tab appearance, styling, and animations
- Implement multi-step wizards with conditional navigation
- Enable drag-and-drop for tab reordering
- Persist tab state across page refreshes
## Component Overview
The Syncfusion Blazor Tabs component (`SfTab`) provides a flexible, accessible, and feature-rich tabbed navigation interface with support for:
- Multiple tab items with customizable headers and content
- Dynamic tab management (add/remove items programmatically)
- Multiple header placements (Top, Bottom, Left, Right)
- Responsive overflow modes (Scrollable, Popup)
- Two-way binding with `SelectedItem` property
- Comprehensive event system for user interactions
- Content rendering modes (Dynamic, On-Demand, Initial)
- Rich templating with `ContentTemplate` and `HeaderTemplate`
- Animation support with multiple effects
- State persistence through browser cookies
- Full keyboard and screen reader accessibility
- Drag-and-drop support for tab reordering
### Key Components
- **SfTab**: Main container component managing all tabs
- **TabItems**: Collection container for tab items
- **TabItem**: Individual tab with header and content
- **TabHeader**: Header configuration for tab title, icons, and positioning
- **TabEvents**: Event handlers for tab interactions
- **TabAnimationSettings**: Animation configuration for tab transitions
- **ContentTemplate**: Template for rendering complex content
- **HeaderTemplate**: Template for custom header rendering
---
## Installation and Setup
### Prerequisites
- .NET 6.0 or higher
- Blazor WebAssembly or Blazor Server application
### NuGet Package Installation
```csharp
// Install via Package Manager Console
Install-Package Syncfusion.Blazor.Navigations
Install-Package Syncfusion.Blazor.Themes
```
Or via .NET CLI:
```bash
dotnet add package Syncfusion.Blazor.Navigations
dotnet add package Syncfusion.Blazor.Themes
```
### Register Syncfusion Blazor Service
In **Program.cs**:
```csharp
using Syncfusion.Blazor;
var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add<App>("#app");
builder.Services.AddSyncfusionBlazor();
await builder.Build().RunAsync();
```
### Add Namespaces
In **_Imports.razor**:
```csharp
@using Syncfusion.Blazor
@using Syncfusion.Blazor.Navigations
```
### Add Theme and Script References
In **index.html** (in `<head>` section):
```html
<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>
```
---
## Basic Implementation
### Minimal Blazor Tabs Component Setup
```razor
@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>
```
---
## Core API Reference
### SfTab Component Properties
| 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:**
```razor
<SfTab HeaderPlacement="HeaderPosition.Left" Height="250px" Width="500px">
<TabItems>
<!-- Tab items -->
</TabItems>
</SfTab>
```
**Enabling drag-and-drop for tab reordering:**
```razor
<SfTab AllowDragAndDrop="true">
<TabItems>
<!-- Tab items -->
</TabItems>
</SfTab>
```
**Restricting drag area with DragArea property:**
```razor
<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>
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.