syncfusion-angular-sidebar
Guide for implementing Syncfusion Angular Sidebar component for navigation, collapsible menus, and dynamic content. Use this when creating sidebars with multiple positioning options, animations, gestures, docking, responsive behavior, TreeView/ListView content, and backdrop overlays. This skill covers sidebar navigation, toggle menus, responsive navigation panels, collapsible layouts, and expanding/collapsing navigation elements.
What this skill does
# Implementing Syncfusion Angular Sidebar Component
The **Sidebar** is an expandable and collapsible navigation component that acts as a side container for primary or secondary content alongside main content. It supports flexible show/hide behavior, multiple positioning modes (left, right, top, bottom), various expand types (Push, Slide, Over, Auto), docking for compact states, touch gestures, animations, responsive behavior, and rich content including TreeView and ListView.
## When to Use This Skill
- Implementing collapsible navigation menus or sidebars
- Creating responsive navigation that adapts to screen size
- Building expandable panels with icon-only docked states
- Adding gesture-based sidebar toggle on touch devices
- Positioning sidebars in various directions (left, right, top, bottom)
- Implementing backdrop overlays to focus on sidebar content
- Creating multi-level navigation with TreeView or ListView
- Managing sidebar visibility with auto-close behavior
- Building toggle buttons with show(), hide(), toggle() methods
- Applying animations and RTL support to sidebars
## Documentation and Navigation Guide
### Getting Started
๐ **Read:** [references/getting-started.md](references/getting-started.md)
- Angular CLI setup and project initialization (Recommended)
- Installing Syncfusion packages (Ivy and ngcc versions)
- Importing modules and CSS styles
- Creating basic sidebar component
- ViewChild setup and initialization
### SystemJS Setup (Alternative)
๐ **Read:** [references/systemjs-setup.md](references/systemjs-setup.md)
- SystemJS configuration and installation
- systemjs.config.js setup with Syncfusion mappings
- UMD bundle configuration
- Creating Sidebar with SystemJS
- Development server and running the application
- SystemJS vs Angular CLI comparison
### Sidebar Positioning and Behavior
๐ **Read:** [references/sidebar-positioning.md](references/sidebar-positioning.md)
- Sidebar types: Push, Slide, Over, Auto
- Positioning: Left, Right, Top, Bottom
- Fixed positioning for static sidebars
- Docking with enableDock and dockSize properties
- Multiple sidebars on same page
- dataBind() for dynamic property updates
### Sidebar Interactions and Control
๐ **Read:** [references/sidebar-interactions.md](references/sidebar-interactions.md)
- Control methods: show(), hide(), toggle()
- Auto-close with mediaQuery for responsive behavior
- closeOnDocumentClick for external click handling
- Backdrop overlay with showBackdrop
- Touch gesture support with enableGestures
- Open and close event handling
### Sidebar Content and Components
๐ **Read:** [references/sidebar-content.md](references/sidebar-content.md)
- ListView integration for list-based content
- TreeView integration for hierarchical menus
- Custom HTML content and menu items
- Target element configuration
- Content structure and layout patterns
### Animations and Styling
๐ **Read:** [references/animations-and-styles.md](references/animations-and-styles.md)
- Animation control with animate property
- Animation types and variations
- CSS theming with Material3 and other themes
- RTL (right-to-left) support with enableRtl
- Responsive design patterns
- CRG (Custom Resource Generator) usage
### Advanced Features and Patterns
๐ **Read:** [references/advanced-features.md](references/advanced-features.md)
- Persistence with enablePersistence
- RTL implementation details
- Accessibility features
- Hiding sidebars with routing
- Performance optimization
- Edge cases and troubleshooting
## Quick Start Example
```typescript
import { SidebarModule } from '@syncfusion/ej2-angular-navigations';
import { Component, ViewChild } from '@angular/core';
import { SidebarComponent } from '@syncfusion/ej2-angular-navigations';
@Component({
imports: [SidebarModule],
standalone: true,
selector: 'app-root',
template: `<ejs-sidebar #sidebar id="default-sidebar">
<div class="title">Sidebar Content</div>
</ejs-sidebar>
<div>
<div class="title">Main Content</div>
<button (click)="toggleSidebar()">Toggle Sidebar</button>
</div>`,
styles: [`
.title { padding: 20px; font-weight: bold; }
`]
})
export class AppComponent {
@ViewChild('sidebar') sidebar?: SidebarComponent;
toggleSidebar() {
this.sidebar?.toggle();
}
}
```
## Target Property Behavior
The sidebar's `target` property controls which element is affected when the sidebar expands/collapses. There are **two distinct modes**:
### Implicit Targeting (Recommended - Default Behavior)
**No `target` property is specified.** The sidebar automatically targets the **next sibling `<div>`** element:
```typescript
<ejs-sidebar id="sidebar" type="Push"></ejs-sidebar>
<div> <!-- Automatically becomes target - no wrapper needed -->
<div class="content">Main Content</div>
</div>
```
โ
**Advantages:**
- Simple and clean code
- No wrapper element needed
- Perfect for straightforward layouts
- **Use this for most applications**
---
### Explicit Targeting (Advanced - When You Need Control)
Use the **`[target]="'#selector'"`** property to explicitly specify which element to affect:
```typescript
<ejs-sidebar [target]="'#content-area'" type="Push"></ejs-sidebar>
<div id="content-area"> <!-- Explicit target -->
<div> <!-- โ ๏ธ REQUIRED: Inner wrapper -->
<div class="content">Main Content</div>
</div>
</div>
```
โ ๏ธ **IMPORTANT:** When using explicit `target`, you **MUST include an inner wrapper `<div>`** inside the target container for CSS transforms to work correctly.
**Use explicit targeting when:**
- You want to exclude certain elements (header, footer) from sidebar effects
- You have complex layouts with multiple sections
- You need fine-grained control over transformation
---
### When to Use Each Mode
| Mode | When to Use | Complexity | Wrapper Needed |
|------|-------------|-----------|-----------------|
| **Implicit** (No target) | Default for most layouts | Simple | โ No |
| **Explicit** (With target) | Complex layouts, selective targeting | Advanced | โ
Yes (inner) |
**See detailed examples in [references/sidebar-positioning.md](references/sidebar-positioning.md#target-property---when-and-how-to-use)**
---
## API Properties Reference
The Sidebar component exposes the following properties to control its behavior and appearance:
### animate
**Type:** `boolean` | **Default:** `true`
Enable or disable animation transitions when expanding or collapsing the sidebar.
```typescript
// Example: Disable animations for instant toggle
<ejs-sidebar [animate]="false"></ejs-sidebar>
// Example: Enable animations (default)
<ejs-sidebar [animate]="true"></ejs-sidebar>
```
---
### closeOnDocumentClick
**Type:** `boolean` | **Default:** `false`
Specifies whether the sidebar closes when clicking outside of it on the main content area.
```typescript
// Example: Auto-close sidebar on document click
<ejs-sidebar [closeOnDocumentClick]="true"></ejs-sidebar>
// Example: In component
this.closeOnClick = true;
```
---
### dockSize
**Type:** `string | number` | **Default:** `'auto'`
Specifies the width of the sidebar when in dock state (collapsed but still visible with icons).
```typescript
// Example: Set dock size to 72 pixels
<ejs-sidebar [dockSize]="'72px'" [enableDock]="true"></ejs-sidebar>
// Example: Set as number
<ejs-sidebar [dockSize]="72" [enableDock]="true"></ejs-sidebar>
// Example: In component
public dockSize: string = '72px';
```
---
### enableDock
**Type:** `boolean` | **Default:** `false`
Enables the docking state where sidebar shows icons only and expands on hover or click.
```typescript
// Example: Enable docking for icon-only sidebar
<ejs-sidebar [enableDock]="true" [dockSize]="'72px'">
<div class="sidebar-item" title="Home">
<i class="e-icons e-home"></i>
</div>
<div class="sidebar-item" title="Settings">
<i class="e-icons e-settings"></i>
</div>
</ejs-siRelated in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context โ no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes โ information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development โ guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.