/syncfusion-javascript:syncfusion-javascript-tabfrom Syncfusion JavaScript UI Controls
This skill enables creating and customizing Syncfusion TypeScript Tab components, including tab navigation, tab headers, styling, responsive layouts, dynamic content loading, animations, and multi-panel organization.
Ships in Syncfusion JavaScript UI Controls. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
The Syncfusion TypeScript Tab is a powerful content container that displays multiple contents in a specific space, one at a time. It supports rendering from JSON items or HTML elements, with extensive customization, animation, accessibility, and responsive design capabilities.
animation propertyallowDragAndDroploadOn property (Demand, Dynamic, Init)enablePersistenceenableHtmlSanitizer to prevent XSS attacksswipeMode propertyControls where tab headers are positioned relative to content.
| Value | Placement | Use Case |
|---|---|---|
'Top' | Headers above content (default) | Dashboard, forms, standard tabs |
'Bottom' | Headers below content | Document viewers, bottom navigation |
'Left' | Headers on left side | Admin panels, sidebar navigation |
'Right' | Headers on right side | Specialized layouts |
new Tab({ headerPlacement: 'Top', items: [...] }); // Default
new Tab({ headerPlacement: 'Left', items: [...] }); // Sidebar
new Tab({ headerPlacement: 'Bottom', items: [...] }); // Bottom
new Tab({ headerPlacement: 'Right', items: [...] }); // Right side
Controls how tab content height is calculated.
| Value | Behavior | Usage |
|---|---|---|
'None' | Use explicit height property | Fixed containers |
'Auto' | All tabs match tallest content | Equalizing heights |
'Content' | Each tab matches its own content (default) | Variable-height content |
'Fill' | Content fills parent container | Responsive fills |
new Tab({ height: '400px', heightAdjustMode: 'None', items: [...] });
new Tab({ heightAdjustMode: 'Auto', items: [...] });
new Tab({ heightAdjustMode: 'Content', items: [...] });
new Tab({ height: '100%', heightAdjustMode: 'Fill', items: [...] });
Controls when tab content is loaded into the DOM.
| Value | Loading | DOM | When Used |
|---|---|---|---|
'Demand' (default) | On first selection | Persists | Many tabs, static content |
'Dynamic' | On each selection | Only selected | Dynamic/live data |
'Init' | All upfront | Always in DOM | Few tabs, small content |
new Tab({ loadOn: 'Demand', items: [...] }); // Lazy load (default)
new Tab({ loadOn: 'Dynamic', items: [...] }); // Reload each time
new Tab({ loadOn: 'Init', items: [...] }); // Load all at init
Controls which input methods trigger tab swiping.
| Value | Touch | Mouse | Desktop | Mobile |
|---|---|---|---|---|
'Both' (default) | ✅ | ✅ | All devices | All devices |
'Touch' | ✅ | ❌ | Desktop only | Mobile users |
'Mouse' | ❌ | ✅ | Desktop users | Mouse input only |
'None' | ❌ | ❌ | Swiping disabled | Swiping disabled |
new Tab({ swipeMode: 'Both', items: [...] }); // Both touch and mouse
new Tab({ swipeMode: 'Touch', items: [...] }); // Mobile touch only
new Tab({ swipeMode: 'Mouse', items: [...] }); // Desktop mouse only
new Tab({ swipeMode: 'None', items: [...] }); // Disabled swiping
Getting Started ⭐ START HERE
Complete API Properties Reference 📚 COMPREHENSIVE
Event Handling Reference 📚 COMPREHENSIVE
Complete Methods Reference 📚 COMPREHENSIVE
showCloseButton propertyloadOn property (Demand, Dynamic, Init)addTab() and removeTab() methodsContent Orientation and Header Placement
headerPlacement (Top, Bottom, Left, Right)overflowMode propertyallowDragAndDrop, dragArea)reorderActiveTab propertyanimation property (TabAnimationSettingsModel)swipeMode property (Both, Touch, Mouse, None)enablePersistence propertyenableRtl property (RTL support)locale property (i18n)enableHtmlSanitizer propertyimport { Tab } from '@syncfusion/ej2-navigations';
let tabObj: Tab = new Tab({
items: [
{
header: { 'text': 'Twitter' },
content: 'Twitter is an online social networking service...'
},
{
header: { 'text': 'Facebook' },
content: 'Facebook is an online social networking service...'
},
{
header: { 'text': 'WhatsApp' },
content: 'WhatsApp Messenger is a proprietary cross-platform...'
}
]
});
tabObj.appendTo('#element');
<!DOCTYPE html>
<html lang="en">
<head>
<title>Tab Example</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body>
<div id="element"></div>
</body>
</html>
@import '../../node_modules/@syncfusion/ej2-base/styles/fluent2.css';
@import '../../node_modules/@syncfusion/ej2-buttons/styles/fluent2.css';
@import '../../node_modules/@syncfusion/ej2-popups/styles/fluent2.css';
@import '../../node_modules/@syncfusion/ej2-navigations/styles/fluent2.css';
Use the heightAdjustMode property to control how tab content height is adjusted:
let tabObj: Tab = new Tab({
heightAdjustMode: 'Auto', // 'None', 'Auto', 'Content', 'Fill'
height: '400px', // Set container height when using 'None' or 'Auto'
items: [
{ header: { 'text': 'Tab 1' }, content: 'Short content' },
{ header: { 'text': 'Tab 2' }, content: 'Much longer content with more text...' },
{ header: { 'text': 'Tab 3' }, content: 'Another tab with varying content length' }
]
});
tabObj.appendTo('#element');
Height Modes:
Enable users to close individual tabs by clicking a close button:
let tabObj: Tab = new Tab({
showCloseButton: true,
items: [
{ header: { 'text': 'Home' }, content: 'Home content...' },
{ header: { 'text': 'Editor' }, content: 'Editor content...' },
{ header: { 'text': 'Settings' }, content: 'Settings content...' }
]
});
tabObj.appendTo('#element');
// Optionally handle close button clicks
tabObj.element.addEventListener('close', (e: any) => {
console.log(`Closed tab at index: ${e.index}`);
});
Control how the active tab behaves when tabs overflow into a popup menu:
let tabObj: Tab = new Tab({
overflowMode: 'Popup', // Enable popup mode for overflow tabs
reorderActiveTab: false, // Don't reorder active tab in popup (keep it highlighted)
heightAdjustMode: 'Auto',
items: [
{ header: { 'text': 'India' }, content: 'India content...' },
{ header: { 'text': 'Canada' }, content: 'Canada content...' },
{ header: { 'text': 'Australia' }, content: 'Australia content...' },
// ... many more tabs that trigger popup mode
]
});
tabObj.appendTo('#element');
When reorderActiveTab is true (default), clicking a tab in the popup moves it to the main view. When false, the tab remains highlighted in the popup without being reordered to the main view.
Add tabs programmatically in response to user actions:
let tabObj: Tab = new Tab({
items: [
{ header: { 'text': 'Home' }, content: 'Home content' }
]
});
tabObj.appendTo('#element');
// Add new tab dynamically
document.getElementById('addTabBtn')?.addEventListener('click', () => {
let newTabCount = tabObj.items.length;
let newTab = {
header: { 'text': `Tab ${newTabCount}` },
content: `Content for tab ${newTabCount}`
};
tabObj.addTab([newTab]); // Add at end
// Or insert at specific position: tabObj.addTab([newTab], 1);
});
// Remove tab by index
document.getElementById('removeTabBtn')?.addEventListener('click', () => {
if (tabObj.items.length > 1) {
tabObj.removeTab(tabObj.items.length - 1); // Remove last tab
}
});
Automatically save and restore the selected tab:
let tabObj: Tab = new Tab({
enablePersistence: true, // Enable localStorage-based persistence
items: [
{ header: { 'text': 'Dashboard' }, content: 'Dashboard...' },
{ header: { 'text': 'Analytics' }, content: 'Analytics...' },
{ header: { 'text': 'Settings' }, content: 'Settings...' }
]
});
tabObj.appendTo('#element');
// When user returns to page, the previously selected tab is automatically restored
Use CSS classes to override default styling for selected tabs:
let tabObj: Tab = new Tab({
cssClass: 'e-tab-custom-style', // Add custom CSS class
items: [...]
});
tabObj.appendTo('#element');
Then define custom CSS:
.e-tab.e-tab-custom-style .e-tab-header .e-toolbar-item.e-active {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border-bottom: 3px solid #667eea;
}
.e-tab.e-tab-custom-style .e-tab-header .e-toolbar-item.e-active .e-tab-text {
font-weight: 600;
color: white;
}
Fetch tab content from a server:
import { Tab } from '@syncfusion/ej2-navigations';
import { Ajax } from '@syncfusion/ej2-base';
let ajax: Ajax = new Ajax('./api/tab-content', 'GET', true);
ajax.onSuccess = (data: string): void => {
let tabObj: Tab = new Tab({
items: [
{ header: { 'text': 'Home' }, content: 'Home content' },
{ header: { 'text': 'Remote Content' }, content: data }
]
});
tabObj.appendTo('#element');
};
ajax.send();
// Or using Fetch API
async function loadTabContent() {
try {
let response = await fetch('api/tab-data', { method: 'POST' });
let data = await response.json();
let tabObj = new Tab({
items: data.tabs // Server returns array of tab items
});
tabObj.appendTo('#element');
} catch (error) {
console.error('Failed to load tabs:', error);
}
}
loadTabContent();
Enable users to move tab items within the same tab or to external components:
let tabObj: Tab = new Tab({
allowDragAndDrop: true, // Enable drag-drop
dragArea: '#dragContainer', // Restrict drag area
items: [...],
dragged: (args) => {
console.log(`Item moved from ${args.draggedIndex} to ${args.droppedIndex}`);
}
});
tabObj.appendTo('#element');
// Transfer tabs between two Tab instances
let sourceTab: Tab = new Tab({
allowDragAndDrop: true,
dragArea: '#container',
items: [{ header: { 'text': 'Source 1' }, content: 'Can be moved' }]
});
sourceTab.appendTo('#sourceTab');
let destTab: Tab = new Tab({
allowDragAndDrop: true,
dragArea: '#container',
items: [{ header: { 'text': 'Dest 1' }, content: 'Receives items' }]
});
destTab.appendTo('#destTab');
Control how and when tab content is loaded:
// Mode 1: On-Demand (Lazy Loading) - Default
let tabObj: Tab = new Tab({
// Content loaded only when tab is selected
// Content persists in DOM once loaded
items: [
{ header: { 'text': 'Tab 1' }, content: 'Content loaded on first select' }
]
});
tabObj.appendTo('#element');
// Mode 2: Dynamic - Only selected content in DOM
let dynamicTab: Tab = new Tab({
loadOn: 'Dynamic', // Content reloaded each time tab is selected
items: []
});
dynamicTab.appendTo('#element');
// Mode 3: Initial - All content loaded upfront
let initialTab: Tab = new Tab({
loadOn: 'Init', // All tabs rendered on initialization
items: []
});
initialTab.appendTo('#element');
// Select a tab by index
tabObj.select(1); // Select second tab
// Get currently selected tab index
let activeIndex = tabObj.selectedItem;
// Determine if selection was user interaction or programmatic
tabObj.selecting = (args) => {
if (args.isInteracted) {
console.log('User clicked tab');
} else {
console.log('Tab selected programmatically');
}
};
// Add new tab item dynamically
tabObj.addTab([
{
header: { 'text': 'New Tab' },
content: 'New content here'
}
], 2); // Insert at index 2
let tabObj: Tab = new Tab({
items: [...], // your items
heightAdjustMode: 'Auto',
overflowMode: 'Scrollable' // Enable scrollable mode
});
let tabObj: Tab = new Tab({
items: [
{
header: {
'text': 'Settings',
'iconCss': 'e-icon-settings' // Add icon class
},
content: 'Settings content...'
}
]
});
| Property | Type | Purpose | Common Values |
|---|---|---|---|
items | Array | Tab items collection | Array of item objects |
selectedItem | number | Active tab index | 0, 1, 2, ... |
heightAdjustMode | string | Auto-adjust height | 'Auto', 'Content', 'Scroll' |
overflowMode | string | Handle overflow tabs | 'Scrollable', 'Popup', 'MultiRow' |
animation | object | Animation settings | { previous, next } |
headerPlacement | string | Header placement | 'Top', 'Bottom', 'Left', 'Right' |
enableRtl | boolean | RTL support | true, false |
allowDragAndDrop | boolean | Enable drag-drop | true, false |
enablePersistence | boolean | State persistence | true, false |
Next Steps:
references/accessibility-and-localization.md (opens in a new tab)references/advanced-features.md (opens in a new tab)references/animation-effects.md (opens in a new tab)references/api-properties-reference.md (opens in a new tab)references/content-orientation.md (opens in a new tab)references/customization-and-styling.md (opens in a new tab)references/data-binding.md (opens in a new tab)references/edge-cases-and-troubleshooting.md (opens in a new tab)references/event-handling-reference.md (opens in a new tab)references/getting-started.md (opens in a new tab)references/methods-reference.md (opens in a new tab)references/responsive-adaptive-modes.md (opens in a new tab)references/security-html-sanitization.md (opens in a new tab)references/state-persistence.md (opens in a new tab)references/tab-structure-and-content.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub syncfusion/boldcreate-plugins --plugin syncfusion-javascriptOther plugins' skills for the same job
67 skills in this plugin
/syncfusion-javascript-3d-chartCreate interactive 3D charts in Syncfusion TypeScript and JavaScript. Immediately use this skill when user needs to build 3D visualizations, render 3D column/bar charts, configure 3D rotation and depth, visualize data in three dimensions, customize 3D chart appearance, handle 3D interactions, or implement advanced 3D features. Works with TypeScript (webpack/module-based) and JavaScript (CDN/ES5)./syncfusion-javascript-accordionBuild collapsible navigation panels with the Syncfusion TypeScript Accordion component. Use this skill when implementing vertical accordion menus, expanding/collapsing content panels, multi-step wizards, data-driven panels with dynamic content, tabbed navigation alternatives, or nested hierarchical content structures. Covers initialization, expand modes, animations, icons, templates, styling, data binding, and advanced use cases like form wizards./syncfusion-javascript-accumulation-chartImplements Syncfusion JavaScript accumulation charts (Pie, Doughnut, Funnel, Pyramid) for proportional and percentage-based visualizations. Use when displaying categorical or proportional data. Covers legend and label configuration, interactivity, accessibility, and customization. Works with TypeScript (modules) and JavaScript (CDN/ES5).