syncfusion-blazor-context-menu
Implement Syncfusion Blazor ContextMenu component for building right-click menus, context-sensitive navigation, or popup menu systems. Use this when you need hierarchical menu structures with nesting support, data binding, or custom templates. This skill covers setup, customization, events, and dynamic menu management.
What this skill does
# Syncfusion Blazor ContextMenu Component
## When to Use This Skill
Use the **Syncfusion Blazor ContextMenu** skill when:
- Building **right-click context menus** for interactive elements
- Creating **popup navigation menus** triggered by user interaction
- Need **hierarchical menu structures** with nesting support
- Implementing **custom menu templates** with shortcuts or icons
- Managing **dynamic menu states** (enable/disable items)
- Requiring **data-driven menus** from custom object collections
- Building **advanced interactions** with dialogs, animations, or scrolling
ContextMenu provides fully customizable, event-driven popup menus perfect for desktop-like interactions in web apps.
---
## Documentation and Navigation Guide
### Getting Started
๐ **Read:** [references/getting-started.md](references/getting-started.md)
- NuGet installation (Navigations + Themes packages)
- Namespace imports and Syncfusion service registration
- Stylesheet and script resource setup
- Basic ContextMenu component markup
- First render and click-to-test validation
- Common import patterns for Blazor projects
### Customization and Nesting
๐ **Read:** [references/customization-and-nesting.md](references/customization-and-nesting.md)
- Custom MenuTemplate for rich UI (shortcuts, badges, icons)
- CssClass property for component-level styling
- Multilevel nesting (2-3 nested levels)
- Nested MenuItem hierarchies
- Best practices for menu depth and UX
### Icons and Navigation
๐ **Read:** [references/icons-and-navigation.md](references/icons-and-navigation.md)
- IconCss property and e-icons class mapping
- Custom icon class support
- Icon positioning in menu items
- Url property for hyperlink navigation
- Navigation target behaviors (_blank, _self, etc.)
### Styling and Appearance
๐ **Read:** [references/styling-and-appearance.md](references/styling-and-appearance.md)
- CSS class override reference (.e-contextmenu-container, .e-menu-item, etc.)
- Focus and selected state styling
- Theme customization with Theme Studio
- Common styling patterns and examples
### Events and Interactions
๐ **Read:** [references/events-and-interactions.md](references/events-and-interactions.md)
- ItemSelected event binding and patterns
- MenuEventArgs data access
- Programmatic Open/Close methods with coordinates
- Manual menu control and triggering
- Event handler best practices
### Data Binding
๐ **Read:** [references/data-binding.md](references/data-binding.md)
- Items collection binding
- MenuFieldSettings property mapping
- Custom object data sources
- Hierarchical data binding with nested collections
- Dynamic menu population
### Menu Item Management
๐ **Read:** [references/menu-item-management.md](references/menu-item-management.md)
- Disabled property for item state management
- Enable/disable logic and workflows
- OnOpen event for conditional disabling
- Separator property usage and styling
- Controlling item availability dynamically
### Advanced Features
๐ **Read:** [references/advanced-features.md](references/advanced-features.md)
- MenuAnimationSettings with effects (FadeIn, SlideDown, ZoomIn, None)
- Dialog integration with ItemSelected events
- EnableScrolling for large menu lists
- ScrollHeight configuration
- Large menu handling strategies
---
## Quick Start Example
```cshtml
@using Syncfusion.Blazor.Navigations
<div id="target">Right click to open menu</div>
<SfContextMenu Target="#target" TValue="MenuItem">
<MenuItems>
<MenuItem Text="Cut"></MenuItem>
<MenuItem Text="Copy"></MenuItem>
<MenuItem Text="Paste"></MenuItem>
</MenuItems>
</SfContextMenu>
<style>
#target {
border: 1px dashed; height: 150px; padding: 10px;
position: relative; text-align: center; color: gray;
}
</style>
```
**Result:** Right-click the gray area to see the context menu with Cut, Copy, Paste options.
---
## Common Patterns
### Pattern 1: Basic Right-Click Menu
```cshtml
<SfContextMenu Target="#myElement" TValue="MenuItem">
<MenuItems>
<MenuItem Text="Edit"></MenuItem>
<MenuItem Text="Delete"></MenuItem>
</MenuItems>
</SfContextMenu>
```
**Use when:** Simple menu with basic actions on target element.
### Pattern 2: Nested Menu (Submenu on Hover)
```cshtml
<SfContextMenu Target="#myElement" TValue="MenuItem">
<MenuItems>
<MenuItem Text="File">
<MenuItems>
<MenuItem Text="Open"></MenuItem>
<MenuItem Text="Save"></MenuItem>
</MenuItems>
</MenuItem>
</MenuItems>
</SfContextMenu>
```
**Use when:** Hierarchical menu structure with grouped actions.
### Pattern 3: Event-Driven Actions
```cshtml
<SfContextMenu Target="#myElement" TValue="MenuItem">
<MenuItems>
<MenuItem Text="Delete"></MenuItem>
</MenuItems>
<MenuEvents TValue="MenuItem" ItemSelected="@OnItemSelected"></MenuEvents>
</SfContextMenu>
@code {
private void OnItemSelected(MenuEventArgs<MenuItem> e) {
// Handle: e.Item.Text
}
}
```
**Use when:** Need to execute custom logic on menu item click.
### Pattern 4: Dynamic Menu from Data
```cshtml
<SfContextMenu Target="#myElement" Items="@menuItems">
<MenuFieldSettings Text="Title"></MenuFieldSettings>
</SfContextMenu>
@code {
private List<MenuOption> menuItems = new();
protected override void OnInitialized() {
menuItems.Add(new MenuOption { Title = "Option 1" });
menuItems.Add(new MenuOption { Title = "Option 2" });
}
private class MenuOption { public string Title { get; set; } }
}
```
**Use when:** Menu items come from database or dynamic source.
---
## Key Properties
| Property | Type | Purpose |
|---|---|---|
| `Target` | string | CSS selector for right-click target element |
| `Items` | List | Data collection for data-binding |
| `TValue` | generic | Type parameter (usually `MenuItem`) |
| `CssClass` | string | Custom CSS class for component styling |
| `ShowItemOnClick` | bool | Enable sub-menu on click instead of hover |
| `EnableScrolling` | bool | Enable scroll for large menu lists |
---
## Common Use Cases
**Use Case 1: File Context Menu**
- Right-click file list item โ Cut, Copy, Paste, Delete, Rename options
- **Reference:** events-and-interactions.md + menu-item-management.md
**Use Case 2: Rich Text Editor**
- Right-click text โ Bold, Italic, Underline, Link options
- Customize template with icons and shortcuts
- **Reference:** customization-and-nesting.md + icons-and-navigation.md
**Use Case 3: Admin Dashboard**
- Right-click user row โ View, Edit, Permissions, Delete
- Enable/disable based on user role
- **Reference:** menu-item-management.md + events-and-interactions.md
**Use Case 4: Navigation Menu**
- Click button โ Open menu โ Navigate to pages
- Nested categories with smooth animation
- **Reference:** icons-and-navigation.md + advanced-features.md
---
## Next Steps
1. **Start:** Read [getting-started.md](references/getting-started.md) to install and setup
2. **Build:** Use [customization-and-nesting.md](references/customization-and-nesting.md) for custom UI
3. **Enhance:** Add icons, events, and interactivity with other reference guides
4. **Explore:** Check [advanced-features.md](references/advanced-features.md) for animations, dialogs, scrolling
Related 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.