MCPInstall

syncfusion-javascript-sidebar

Build responsive sidebar navigation with Syncfusion Sidebar component. Supports multiple expand types (Over, Push, Slide, Auto), docking, animations, and gestures. Triggers when building navigation menus, mobile-friendly sidebars, dockable panels, or sidebars with list/tree views in TypeScript applications.

Installs
60
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/syncfusion/javascript-ui-controls-skills --skill syncfusion-javascript-sidebar
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads syncfusion-javascript-sidebar automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Syncfusion TypeScript Sidebar

The Sidebar is an expandable and collapsible navigation component that acts as a side container alongside main content. It's ideal for building responsive navigation menus, dockable panels, and mobile-friendly layouts in TypeScript applications using Syncfusion Essential JS 2.

Key Features

  • Four Expand Types: Over, Push, Slide, and Auto for flexible content interaction
  • Docking Support: Reserve space for docked icons while maintaining full sidebar functionality
  • Animations & Gestures: Smooth transitions with touch swipe and mobile gesture support
  • Responsive Design: Auto-adjust behavior between desktop (Push) and mobile (Over) modes
  • Custom Targeting: Position sidebar in any HTML container with implicit or explicit targeting
  • Content Integration: Support for list views, tree views, and custom HTML content

Navigation Guide

Read the appropriate reference file based on your task:

Getting Started

📄 Read: references/getting-started.md (~150 lines)

  • Package installation and dependencies
  • Project setup with webpack
  • HTML structure and initialization
  • CSS imports and configuration
  • Running your first sidebar

Target Property Behavior (Critical)

Two distinct modes for controlling which element the sidebar affects:

Implicit Targeting (Recommended - Default):

  • Sidebar automatically targets the next sibling <div>
  • No wrapper element needed
  • Simple, clean code - use for most applications

Explicit Targeting (Advanced):

  • Use [target]="'#selector'" property
  • Requires inner <div> wrapper inside target container for CSS transforms
  • Use when excluding elements (header, footer) or need fine-grained control

📄 Read: references/positioning-and-target.md (~160 lines)

  • Target selectors and HTML structure
  • Implicit vs explicit targeting patterns
  • Fixed positioning and layout considerations
  • Common target configuration scenarios

Sidebar Types and Positions

📄 Read: references/sidebar-types-and-positions.md (~180 lines, with TOC)

  • Four expand types explained: Over, Push, Slide, Auto
  • Position options: Left or Right
  • Type comparison table and when to use each
  • Type switching and responsive behavior

Open and Close Methods & Lifecycle Events

📄 Read: references/open-and-close.md (~250 lines)

  • show(), hide(), toggle() methods
  • State events: open, close, change with EventArgs properties
  • Lifecycle events: created, destroyed
  • Managing sidebar state programmatically
  • Preventing default behavior with args.cancel
  • User interaction detection with args.isInteracted

Auto-Close and Responsive Behavior

📄 Read: references/auto-close-responsive.md (~140 lines)

  • mediaQuery property for responsive breakpoints
  • Auto-close on document click behavior
  • Close button implementation
  • Mobile vs desktop viewport handling

Docking Sidebar

📄 Read: references/docking-sidebar.md (~170 lines, with TOC)

  • enableDock and dockSize properties
  • Showing icons only in docked state
  • CSS for text visibility control
  • Docked state use cases

Animations and Gestures

📄 Read: references/animations-and-gestures.md (~200 lines, with TOC)

  • animate property and timing configuration
  • Gesture support: swipe and touch interactions
  • Mobile interaction patterns
  • Performance optimization for animations

Content Integration

📄 Read: references/content-integration.md (~180 lines, with TOC)

  • Sidebar with list view content
  • Sidebar with tree view content
  • Multiple sidebar instances
  • Multiple sidebars in same position
  • Custom HTML content patterns

Styling and Theming

📄 Read: references/styling-and-theming.md (~200 lines, with TOC)

  • CSS classes and selectors (.e-sidebar, .e-open, .e-close, .e-dock)
  • Customizing sidebars by type and position
  • Backdrop styling and customization
  • Responsive design and mobile styling

Troubleshooting

📄 Read: references/troubleshooting.md (~120 lines)

  • Common issues and solutions
  • Z-index and stacking context problems
  • Performance optimization tips
  • Gesture conflicts and gestures not working
  • Mobile responsiveness debugging

API Methods and Properties Reference

📄 Read: references/api-methods-properties.md (~580 lines, comprehensive API coverage)

  • All sidebar properties with defaults and types: type, position, width, target, showBackdrop, animate, closeOnDocumentClick, enableGestures, enableDock, dockSize, mediaQuery, zIndex, isOpen, enableRtl, enablePersistence
  • All methods with working examples: show(), hide(), toggle(), getRootElement(), destroy(), refresh(), dataBind()
  • Event listener management: addEventListener(), removeEventListener()
  • Responsive configuration examples
  • Persistence and state management
  • RTL and internationalization support

Quick Start Example

Implicit Targeting (Recommended)

import { Sidebar } from '@syncfusion/ej2-navigations';

// Create sidebar - automatically targets next sibling div
let sidebar: Sidebar = new Sidebar({
    type: 'Push',
    width: '280px'
});
sidebar.appendTo('#sidebar');

// Toggle on button click
document.querySelector('#toggle')?.addEventListener('click', () => {
    sidebar.toggle();
});
<!-- HTML Structure - sidebar targets main-content automatically -->
<aside id="sidebar">
    <div class="title">Navigation Menu</div>
    <ul>
        <li>Home</li>
        <li>About</li>
        <li>Contact</li>
    </ul>
</aside>

<!-- Next sibling - automatically becomes target -->
<div id="main-content">
    <button id="toggle">Toggle Sidebar</button>
    <div class="content">Main content here</div>
</div>

Explicit Targeting (With Inner Wrapper)

let sidebar: Sidebar = new Sidebar({
    type: 'Push',
    target: '#content-area',  // Explicit target selector
    width: '280px'
});
sidebar.appendTo('#sidebar');
<!-- Explicit target requires inner wrapper div -->
<aside id="sidebar">
    <div class="title">Navigation</div>
</aside>

<div id="content-area">              <!-- Explicit target -->
    <div>                             <!-- REQUIRED: Inner wrapper -->
        <button id="toggle">Toggle</button>
        <div class="content">Main content</div>
    </div>
</div>

Common Patterns

Pattern 1: Mobile-Responsive Sidebar

let sidebar: Sidebar = new Sidebar({
    type: 'Auto',  // Over on mobile, Push on desktop
    mediaQuery: window.matchMedia('(max-width: 768px)'),
    width: '280px'
});
sidebar.appendTo('#sidebar');

Pattern 2: Docked Icon Sidebar

let sidebar: Sidebar = new Sidebar({
    enableDock: true,
    dockSize: '72px',
    width: '220px'
});
sidebar.appendTo('#sidebar');

// CSS for docked state
// .e-dock.e-close span.e-text { display: none; }
// .e-dock.e-open span.e-text { display: inline-block; }

Pattern 3: Toggle with Events

let sidebar: Sidebar = new Sidebar({
    open: (e) => console.log('Sidebar opened'),
    close: (e) => console.log('Sidebar closed'),
    showBackdrop: true
});
sidebar.appendTo('#sidebar');

// Programmatic control
document.querySelector('#open')?.addEventListener('click', () => sidebar.show());
document.querySelector('#close')?.addEventListener('click', () => sidebar.hide());
document.querySelector('#toggle')?.addEventListener('click', () => sidebar.toggle());

Key Properties Reference

PropertyTypeDefaultPurpose
type'Over' | 'Push' | 'Slide' | 'Auto''Auto'Expand behavior
position'Left' | 'Right''Left'Sidebar position
widthstring'100%'Sidebar width
targetstringnullTarget element selector (explicit)
enableDockbooleanfalseEnable dock/collapsed state
dockSizestring'52px'Width when docked
showBackdropbooleanfalseShow overlay backdrop
animatebooleantrueEnable animations
mediaQueryMediaQueryListnullResponsive breakpoint
isOpenbooleanfalseInitial open state

Common Use Cases

  • Navigation Menu: Main app navigation with collapsible menu items
  • Dockable Panel: Icon-based navigation that expands on hover/click
  • Mobile Menu: Touch-friendly sidebar using gestures and Auto type
  • Multi-Level Navigation: Sidebar with list or tree view hierarchy
  • Admin Dashboard: Collapsible sidebar with role-based menu items
  • Content Drawer: Side panel for filters, settings, or additional content

Next Steps: Choose a reference file based on your current task and read the detailed documentation. Start with "Getting Started" if this is your first time using the Sidebar component.

FAQ

What does the syncfusion-javascript-sidebar skill do?

Build responsive sidebar navigation with Syncfusion Sidebar component. Supports multiple expand types (Over, Push, Slide, Auto), docking, animations, and gestures. Triggers when building navigation menus, mobile-friendly sidebars, dockable panels, or sidebars with list/tree views in TypeScript applications.

How do I install syncfusion-javascript-sidebar?

Run npx skills add https://github.com/syncfusion/javascript-ui-controls-skills --skill syncfusion-javascript-sidebar in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/syncfusion-javascript-sidebar/ (personal) or .claude/skills/syncfusion-javascript-sidebar/ (project).

Which AI agents can use syncfusion-javascript-sidebar?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is syncfusion-javascript-sidebar safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains syncfusion-javascript-sidebar?

It is published by syncfusion in syncfusion/javascript-ui-controls-skills. It has 60 recorded installs.

More from syncfusion/javascript-ui-controls-skills

View all →

syncfusion-javascript-grid

syncfusion/javascript-ui-controls-skills

Implements Syncfusion JavaScript Grid component for feature-rich data tables and grids. Use this when working with data display, sorting, filtering, grouping, aggregates, editing, or exporting. This skill covers grid configuration, CRUD operations, virtual scrolling, hierarchy grids, state persistence, and advanced data management features for data-intensive applications.

syncfusion-javascript-common

syncfusion/javascript-ui-controls-skills

Common utilities and features for Syncfusion JavaScript controls. Use this skill when the user needs to implement animations, drag-and-drop, state persistence, RTL support, localization, globalization, security, templates, and advanced features for Syncfusion JavaScript controls.

syncfusion-javascript-dropdowns

syncfusion/javascript-ui-controls-skills

Comprehensive guide for implementing Syncfusion TypeScript dropdown components including AutoComplete, ComboBox, Mention, Dropdownlist, Multiselect, ListBox, and MultiColumn ComboBox. Use this when building selection interfaces, data binding, filtering, cascading dropdowns, dual list transfer, custom templates, and accessible dropdown experiences.

syncfusion-javascript-license

syncfusion/javascript-ui-controls-skills

Open the skill to read its SKILL.md instructions.

syncfusion-javascript-popups

syncfusion/javascript-ui-controls-skills

Open the skill to read its SKILL.md instructions.

syncfusion-javascript-tab

syncfusion/javascript-ui-controls-skills

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.

Popular frontend & design skills

View category →

setup-matt-pocock-skills

mattpocock/skills

Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.

Frontend & Design1.1M installs

frontend-design

anthropics/skills

Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.

OfficialFrontend & Design1M installs

hyperframes-animation

heygen-com/hyperframes

All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.

prototype

mattpocock/skills

Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.

Frontend & Design999.2K installs

hyperframes-core

heygen-com/hyperframes

The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.

Frontend & Design930.5K installs

vercel-react-best-practices

vercel-labs/agent-skills

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

OfficialFrontend & Design843.1K installs