Token导航 LogoToken导航TokenDH.com
开发需要联网github未标认证来源可访问许可证需确认审计通过

syncfusion-react-dialogsyncfusion React dialog 开发

Agent Skill

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

总安装

1,236

周安装

52

GitHub Stars

1

下载量

433
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:syncfusion-react-dialog(syncfusion React dialog 开发)
来源仓库:https://github.com/syncfusion/react-ui-components-skills
仓库路径:skills/syncfusion-react-dialog
安装命令:
npx skills add https://github.com/syncfusion/react-ui-components-skills --skill syncfusion-react-dialog
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/syncfusion/react-ui-components-skills --skill syncfusion-react-dialog

简介

用于辅助 React 前端页面、组件、样式和交互逻辑的开发与维护。

  • 适合生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。
  • 使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。
  • 通过 GitHub 安装,支持 Codex、Claude、Cursor、Gemini CLI 等宿主环境。
  • 需确保项目已集成 Syncfusion React 组件库,否则可能无法正常运行相关功能。

SKILL.md

Implementing React Dialog

The DialogComponent displays content in a floating window with support for modal and modeless modes, custom positioning, dragging, resizing, animations, templating, and comprehensive accessibility features.

Component Overview

DialogComponent Features:

  • Modal/Modeless modes: Control parent interaction blocking
  • 9 preset positions + custom X/Y: Flexible placement
  • Dragging: Header-based drag and drop (allowDragging)
  • Resizing: Diagonal resize grip (enableResize)
  • Templating: Custom header, content, footer
  • Animations: 16 effects (Fade, Zoom, Flip, Slide, FadeZoom, etc.)
  • Buttons: Built-in action buttons with click handlers
  • Events: open, close, beforeOpen, beforeClose, drag, dragStart, dragStop, resize events
  • Keyboard Navigation: Tab, Escape (closeOnEscape), Enter
  • WCAG 2.2 Accessibility: ARIA roles, focus management
  • Localization: 20+ locales via locale property
  • RTL Support: Right-to-left rendering

Documentation & Navigation Guide

Getting Started

📄 Read: references/getting-started.md

  • Installation (@syncfusion/ej2-react-popups)
  • CSS/theme imports (material, bootstrap, tailwind)
  • Basic DialogComponent JSX structure
  • show()/hide() methods and refs
  • Functional component patterns with hooks
  • Initial visibility with visible prop

Modal vs Modeless

📄 Read: references/modal-vs-modeless.md

  • isModal boolean property (true/false)
  • Modal overlay behavior and parent blocking
  • Modeless floating behavior
  • Focus management differences
  • When to choose each mode
  • Side-by-side comparisons

Positioning and Dragging

📄 Read: references/positioning-and-dragging.md

  • position object (X: 'center'|'left'|'right'|number, Y: 'top'|'center'|'bottom'|number)
  • 9 preset position combinations
  • Custom pixel-based positioning
  • allowDragging boolean property
  • enableResize and resizeHandles configuration
  • Target element constraints with target prop

Templates and Content

📄 Read: references/templates-and-content.md

  • content property (string, HTML, JSX function)
  • header property (text or template)
  • footerTemplate (custom footer JSX)
  • Dynamic content updates
  • HTML sanitization (enableHtmlSanitizer)
  • Styling content and edge cases

Buttons and Actions

📄 Read: references/buttons-and-actions.md

  • buttons array with ButtonPropsModel[]
  • ButtonPropsModel structure (buttonModel, click, isFlat, type)
  • buttonModel properties (content, isPrimary, cssClass)
  • Click event handlers
  • Styling buttons with cssClass
  • Button types (Button, Submit, Reset)

Animation Effects

📄 Read: references/animation-effects.md

  • AnimationSettingsModel (effect, duration, delay)
  • 16 animation effects (Fade, FadeZoom, FlipLeftDown, FlipLeftUp, etc.)
  • Duration in milliseconds
  • Delay before animation starts
  • Disable animations (effect: 'None')
  • Performance considerations

Localization and Accessibility

📄 Read: references/localization-and-accessibility.md

  • locale property for culture/language
  • WCAG 2.2 compliance
  • Keyboard navigation (Tab, Enter, Escape)
  • closeOnEscape behavior control
  • ARIA roles and attributes
  • Screen reader support
  • RTL support with enableRtl
  • Focus management patterns

Advanced Patterns

📄 Read: references/advanced-patterns.md

  • Events: open, close, beforeOpen, beforeClose, drag, dragStart, dragStop, resizeStart, resizeStop, resizing
  • Nested and stacked dialogs
  • Forms with validation
  • AJAX content loading
  • Prevent close logic (beforeClose event)
  • Full-screen dialogs
  • HTML sanitization and security
  • CSS classes and z-index management
  • Enable persistence (enablePersistence)
  • Common edge cases and troubleshooting

API Reference (Complete)

📄 Read: references/api-reference.md

  • All 24 DialogModel properties with types and defaults
  • All 11 events with event arguments
  • Methods: show(), hide(), refresh(), destroy()
  • ButtonPropsModel structure (buttonModel, click, isFlat, type)
  • AnimationSettingsModel with all 16 effects
  • Types and enumerations
  • Quick reference patterns

Quick Start Example

Basic Modal Dialog:

import React, { useRef, useState } from 'react';
import { DialogComponent } from '@syncfusion/ej2-react-popups';
import '@syncfusion/ej2-base/styles/material.css';
import '@syncfusion/ej2-buttons/styles/material.css';
import '@syncfusion/ej2-popups/styles/material.css';

export default function App() {
  const dialogRef = useRef(null);
  const [isOpen, setIsOpen] = useState(false);

  const handleOpen = () => {
    dialogRef.current?.show();
    setIsOpen(true);
  };

  const handleClose = () => {
    dialogRef.current?.hide();
    setIsOpen(false);
  };

  const buttons = [
    {
      buttonModel: {
        content: 'OK',
        cssClass: 'e-flat',
        isPrimary: true,
      },
      click: handleClose,
    },
    {
      buttonModel: {
        content: 'Cancel',
        cssClass: 'e-flat',
      },
      click: handleClose,
    },
  ];

  return (
    <div id="dialog-target" style={{ position: 'relative', width: '100%', minHeight: '400px' }}>
      <button onClick={handleOpen} className="e-control e-btn e-primary">
        Open Dialog
      </button>

      <DialogComponent
        ref={dialogRef}
        header="Confirm Action"
        buttons={buttons}
        showCloseIcon={true}
        target="#dialog-target"
        width="400px"
        isModal={true}
        visible={false}
      >
        <p>Are you sure you want to proceed with this action?</p>
      </DialogComponent>
    </div>
  );
}

Common Patterns

Pattern 1: Confirmation Dialog

Delete action with confirmation buttons:

const buttons = [
  {
    buttonModel: { content: 'Delete', cssClass: 'e-flat e-danger', isPrimary: true },
    click: () => { performDelete(); dialogRef.current?.hide(); }
  },
  {
    buttonModel: { content: 'Cancel', cssClass: 'e-flat' },
    click: () => dialogRef.current?.hide()
  }
];

Pattern 2: Form Dialog

Dialog with form inputs and validation:

<DialogComponent header="Edit Profile" buttons={buttons} isModal={true} width="500px">
  <div style={{ padding: '16px' }}>
    <input type="text" placeholder="Name" className="form-control" />
    <input type="email" placeholder="Email" className="form-control" />
    <textarea placeholder="Bio" className="form-control"></textarea>
  </div>
</DialogComponent>

Pattern 3: Centered Dialog

Position dialog in center of screen:

<DialogComponent
  header="Alert"
  position={{ X: 'center', Y: 'center' }}
  isModal={true}
  showCloseIcon={true}
  width="350px"
>
  This dialog is centered on the screen.
</DialogComponent>

Pattern 4: Draggable Floating Panel

Non-modal, draggable properties panel:

<DialogComponent
  header="Properties"
  isModal={false}
  allowDragging={true}
  position={{ X: 200, Y: 150 }}
  width="300px"
  enableResize={true}
  resizeHandles={['All']}
  showCloseIcon={true}
>
  Drag me around! I don't block the page.
</DialogComponent>

Pattern 5: Animated Dialog

Dialog with Zoom animation:

<DialogComponent
  header="Welcome"
  animationSettings={{ effect: 'Zoom', duration: 400, delay: 0 }}
  isModal={true}
  position={{ X: 'center', Y: 'center' }}
  width="400px"
>
  This dialog zooms in smoothly!
</DialogComponent>

Pattern 6: Custom Footer Template

Custom footer instead of buttons:

<DialogComponent
  header="Custom Footer"
  isModal={true}
  footerTemplate={
    <div style={{ padding: '12px', textAlign: 'right' }}>
      <button className="e-control e-btn e-primary" style={{ marginRight: '8px' }}>
        Save
      </button>
      <button className="e-control e-btn">Cancel</button>
    </div>
  }
>
  Dialog content with custom footer.
</DialogComponent>

Pattern 7: Nested Dialogs

Parent dialog containing child dialog:

const childDialogRef = useRef(null);

<DialogComponent header="Parent" isModal={true} width="400px">
  <button onClick={() => childDialogRef.current?.show()} className="e-control e-btn">
    Open Child Dialog
  </button>

  <DialogComponent
    ref={childDialogRef}
    header="Child"
    isModal={true}
    width="300px"
    visible={false}
  >
    Nested dialog content
  </DialogComponent>
</DialogComponent>

Key Props (DialogModel)

PropTypeDescriptionDefaultWhen to Use
isModalbooleanEnable modal mode (blocks parent interaction)falseConfirmations, alerts, critical actions
visiblebooleanInitial visibility statefalseControl initial dialog display
headerstring \JSXDialog header/title-Every dialog needs a title
contentstring \HTML \JSXDialog body content-Main dialog information
buttonsButtonPropsModel[]Action buttons in footer-For OK/Cancel, action confirmations
footerTemplateJSXCustom footer content-When buttons prop doesn't fit
showCloseIconbooleanShow close button in headerfalseAllow users to dismiss
positionPositionDataX/Y positioning (center, top, etc.){X: 'center', Y: 'center'}Custom placement
allowDraggingbooleanEnable drag functionalityfalseMovable dialogs, floating panels
enableResizebooleanEnable resize with gripfalseResizable dialogs
resizeHandlesResizeDirections[]Which edges/corners resize['All']Control resize behavior
widthstring \numberDialog width'330px'Control dialog size
heightstring \numberDialog height'auto'Control dialog size
minHeightstring \numberMinimum height-Prevent too-small resize
animationSettingsAnimationSettingsModelAnimation effect/duration/delay-Smooth open/close transitions
closeOnEscapebooleanClose on Escape key presstrueKeyboard navigation
targetstring (selector)Container elementdocument.bodyModal positioning
enableHtmlSanitizerbooleanSanitize HTML contenttrueSecurity (prevent XSS)
cssClassstringCustom CSS classes-Styling and theming
enableRtlbooleanRight-to-left renderingfalseRTL languages
localestringCulture/language code'en-US'Localization
zIndexnumberStack order-Manage overlapping dialogs
enablePersistencebooleanPersist state on reloadfalseRemember size/position

Common Use Cases

  1. Confirmation Dialogs - Confirm delete, submit, or critical actions before proceeding
  2. Alert/Info Popups - Display system messages, warnings, or notifications
  3. Form Dialogs - Edit profiles, settings, or create new records in modal forms
  4. Input Prompts - Collect user input for specific actions (e.g., "Enter file name")
  5. Properties Panels - Draggable, non-modal panels for settings or properties
  6. Multi-Step Workflows - Nested dialogs for step-by-step processes
  7. Loading/Processing - Show progress indicators or loading states
  8. Help/Documentation - Contextual help, tips, or tutorial overlays
  9. Image Galleries - Lightbox dialogs for images or media previews
  10. Settings/Preferences - Organize application settings in tabbed dialogs

Next: Choose a reference based on what you need to implement. All references include working code examples, best practices, and troubleshooting guidance.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.7%
按下载量换算163

Claude

28.5%
按下载量换算123

Cursor

20.49%
按下载量换算89

Gemini CLI

9.04%
按下载量换算39

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills