Token导航 LogoToken导航

Agent Skill · 开发

syncfusion-react-popups(syncfusion React popups 开发)

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

syncfusion-react-popups 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在开发类的 21,746 个 Skill 里排第 15,051。

总安装 635周安装 27GitHub Stars 1下载 222核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

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

命令行安装

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

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

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

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

通过 GitHub 安装,支持 Codex、Claude、Cursor、Gemini CLI 等宿主环境。需确保项目已集成 Syncfusion React 组件库,否则可能无法正常运行相关功能。

来源仓库内路径:skills/syncfusion-react-popups

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/syncfusion/react-ui-components-skills --skill…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

syncfusion-react-popups 怎么安装?

在终端执行 npx skills add https://github.com/syncfusion/react-ui-components-skills --skill syncfusion…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

syncfusion-react-popups 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

syncfusion-react-popups 需要什么权限?

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

syncfusion-react-popups 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

syncfusion-react-popups 用的人多吗?

公开数据是累计安装 635 次,近一周安装 27 次,下载 222 次,GitHub 1 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

syncfusion-react-popups 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
syncfusion-react-popups

syncfusion React popups 开发 · 本页

6351需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Syncfusion React Popups Component

Implementing Syncfusion React Dialog Component

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

⚠️ Dependency Alignment: All @syncfusion/ej2-* packages must be on the same major version to avoid peer-dependency conflicts and supply-chain mismatches. Install them together: `` npm install @syncfusion/ej2-react-popups @syncfusion/ej2-base @syncfusion/ej2-buttons @syncfusion/ej2-popups ``

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.

Implementing Syncfusion React Predefined Dialog Component

Table of Contents

Key Concept

Syncfusion Predefined Dialogs are not component-based (<ejs-dialog>). They are opened imperatively via the DialogUtility utility class:

Dialog TypeMethod
AlertDialogUtility.alert({...})
ConfirmDialogUtility.confirm({...})
Prompt (input)DialogUtility.confirm({content: '<input.../>',...})

Import: import {DialogUtility} from '@syncfusion/ej2-react-popups';


Quick Start

import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import { DialogUtility } from '@syncfusion/ej2-react-popups';
import * as React from 'react';

function App() {
  function showAlert() {
    DialogUtility.alert({
      title: 'Low Battery',
      width: '250px',
      content: '10% of battery remaining',
    });
  }
  return <ButtonComponent cssClass="e-danger" onClick={showAlert}>Alert</ButtonComponent>;
}
export default App;

Documentation Guide

Getting Started

📄 Read: references/getting-started.md

  • Installation (@syncfusion/ej2-react-popups)
  • CSS imports
  • Alert, Confirm, and Prompt minimal examples
  • Functional and class component patterns
Animation

📄 Read: references/animation.md

  • animationSettings property with effect, duration, delay
  • Alert / Confirm / Prompt animation examples
Draggable

📄 Read: references/draggable.md

  • isDraggable boolean property
  • Alert / Confirm / Prompt drag examples
Position

📄 Read: references/position.md

  • position property: {X, Y} — left|center|right / top|center|bottom or numeric offset
  • Alert / Confirm / Prompt position examples
Dimension

📄 Read: references/dimension.md

  • width and height properties
  • cssClass for max-width / min-width constraints
  • Alert / Confirm / Prompt dimension examples
Customization

📄 Read: references/customization.md

  • okButton / cancelButton — custom text, icon, click handler
  • showCloseIcon and closeOnEscape
  • Custom content for prompt dialogs
API Reference

📄 Read: references/api.md

  • Full DialogUtility.alert() / confirm() option properties
  • All supported fields: title, content, width, height, position, animationSettings, isDraggable, okButton, cancelButton, showCloseIcon, closeOnEscape, cssClass

Common Patterns

Alert with OK callback:

const dialogObj = DialogUtility.alert({
  title: 'Info',
  content: 'Operation complete.',
  okButton: { click: () => { dialogObj.hide(); } }
});

Confirm with Yes / No:

const dialogObj = DialogUtility.confirm({
  title: 'Delete?',
  content: 'Are you sure?',
  width: '300px',
  okButton: { text: 'Yes', click: () => { dialogObj.hide(); /* do delete */ } },
  cancelButton: { text: 'No', click: () => { dialogObj.hide(); } }
});

Prompt (input capture):

const dialogObj = DialogUtility.confirm({
  title: 'Enter Name',
  content: '<p>Your name:</p><input id="nameInput" class="e-input" placeholder="Type here..." />',
  width: '300px',
  okButton: {
    text: 'Submit',
    click: () => {
      const val = (document.getElementById('nameInput') as HTMLInputElement).value;
      dialogObj.hide();
    }
  },
  cancelButton: { click: () => dialogObj.hide() }
});

Implementing Syncfusion React Tooltip

A comprehensive skill for implementing the Syncfusion React TooltipComponent — covering setup, content strategies, positioning, open modes, animation, customization, accessibility, and advanced how-to patterns.

Package: @syncfusion/ej2-react-popups Import: import {TooltipComponent} from '@syncfusion/ej2-react-popups';

Quick Start

npm install @syncfusion/ej2-react-popups --save
/* src/App.css */
@import "../node_modules/@syncfusion/ej2-base/styles/tailwind3.css";
@import "../node_modules/@syncfusion/ej2-react-popups/styles/tailwind3.css";
import * as React from 'react';
import { TooltipComponent } from '@syncfusion/ej2-react-popups';
import './App.css';

function App() {
  return (
    <TooltipComponent content="Tooltip Content" position="TopCenter">
      <button className="e-btn">Show Tooltip</button>
    </TooltipComponent>
  );
}
export default App;

Navigation Guide

Getting Started & Setup

📄 Read: references/getting-started.md

  • Installation and CSS imports
  • Basic tooltip on a single element
  • Tooltip on multiple targets within a container (target prop)
  • Using title attribute as fallback content
  • Running the application

Content

📄 Read: references/content.md

  • Plain string content
  • Template content (JSX function)
  • Dynamic content loaded via Fetch/Ajax (beforeRender event)
  • HTML content (iframe, embedded elements)
  • Updating content programmatically with dataBind()

Positioning

📄 Read: references/position.md

  • 12 static positions (TopLeft, TopCenter, TopRight, BottomLeft, BottomCenter, BottomRight, LeftTop, LeftCenter, LeftBottom, RightTop, RightCenter, RightBottom)
  • Tip pointer show/hide (showTipPointer) and positioning (tipPointerPosition: Auto, Start, Middle, End)
  • Dynamic positioning with refresh() method (draggable targets)
  • Mouse trailing (mouseTrail)
  • Offset values (offsetX, offsetY)
  • Collision handling (auto-flip behavior, windowCollision)

Open Modes

📄 Read: references/open-mode.md

  • Auto, Hover, Click, Focus, Custom modes via opensOn
  • Combining multiple modes (opensOn="Hover Click")
  • Sticky mode (isSticky) — close button appears
  • Open/close delay (openDelay, closeDelay)
  • Custom open mode with open() and close() methods
  • Mobile behavior (tap-and-hold)

Animation

📄 Read: references/animation.md

  • animation property (open/close AnimationModel)
  • All 15 available animation effects (FadeIn, ZoomIn, FlipX/Y, etc.)
  • Custom duration and delay
  • Animating via open() and close() methods programmatically
  • Transition effect using beforeRender + CSS transitions

Customization

📄 Read: references/customization.md

  • cssClass for custom themes and styles
  • Tip pointer size, background, and border customization
  • Full tooltip appearance (background, opacity, font)
  • Curved tip and bubble tip arrow patterns
  • Dimension control (width, height) and scroll mode
  • RTL support (enableRtl)

How-To Patterns

📄 Read: references/how-to.md

  • Tooltip on multiple targets (dynamic content per target)
  • Tooltip on disabled elements
  • Enabling/disabling tooltip with destroy() and render()
  • Displaying tooltip on SVG and Canvas elements
  • Embedding iframes or HTML elements in tooltip content
  • Custom open modes (double-click, right-click)

Accessibility

📄 Read: references/accessibility.md

  • WCAG 2.2 and Section 508 compliance
  • WAI-ARIA attributes (role="tooltip", aria-describedby, aria-hidden)
  • Keyboard shortcuts (Escape, Tab)
  • Screen reader behavior

API Reference

📄 Read: references/api.md

  • All properties, methods, and events with types and defaults
  • TooltipAnimationSettings, TooltipEventArgs types
  • Position and TipPointerPosition enum values

Common Patterns

Tooltip on a Button

<TooltipComponent content="Submit the form" position="TopCenter">
  <button className="e-btn e-primary">Submit</button>
</TooltipComponent>

Multi-Target Tooltip in a Container

// Single TooltipComponent handles all .e-info targets;
// each uses its own `title` attribute as content
<TooltipComponent target=".e-info" position="RightCenter">
  <form>
    <input className="e-info" type="text" title="Enter your name" />
    <input className="e-info" type="email" title="Enter a valid email" />
  </form>
</TooltipComponent>

Click-Triggered Sticky Tooltip

<TooltipComponent
  content="Click the × to close me"
  opensOn="Click"
  isSticky={true}
  position="BottomCenter"
>
  <button className="e-btn">Click Me</button>
</TooltipComponent>

Programmatic Open/Close

import * as React from 'react';
import { TooltipComponent } from '@syncfusion/ej2-react-popups';

function App() {
  let tooltipRef: TooltipComponent;
  const target = React.useRef<HTMLButtonElement>(null);

  return (
    <TooltipComponent
      ref={t => (tooltipRef = t)}
      content="Tooltip opened programmatically"
      opensOn="Custom"
    >
      <button
        ref={target}
        className="e-btn"
        onClick={() => {
          if (target.current.getAttribute('data-tooltip-id')) {
            tooltipRef.close();
          } else {
            tooltipRef.open(target.current);
          }
        }}
      >
        Toggle Tooltip
      </button>
    </TooltipComponent>
  );
}

Mouse-Trailing Tooltip

<TooltipComponent
  content="Following your mouse!"
  mouseTrail={true}
  showTipPointer={false}
>
  <div style={{ width: '200px', height: '100px', background: '#eee' }}>
    Hover over me
  </div>
</TooltipComponent>

Key Props at a Glance

PropTypeDefaultPurpose
content`string \HTMLElement \Function`—Tooltip text, HTML, or JSX template
targetstring—CSS selector for multi-target mode
positionPosition'TopCenter'12 placement values
opensOnstring'Auto'Hover / Click / Focus / Custom
isStickybooleanfalseKeep visible until user closes
mouseTrailbooleanfalseFollow mouse cursor
showTipPointerbooleantrueShow/hide arrow tip
tipPointerPositionTipPointerPosition'Auto'Auto / Start / Middle / End
openDelaynumber0ms delay before opening
closeDelaynumber0ms delay before closing
offsetX / offsetYnumber0Distance from target (px)
width / height`string \number`'auto'Tooltip dimensions
cssClassstringnullCustom CSS class
animationAnimationModelFadeIn/FadeOut 150msOpen/close animation
enableRtlbooleanfalseRight-to-left rendering
enableHtmlSanitizerbooleantrueSanitize HTML content
container`string \HTMLElement`bodyPopup append target
windowCollisionbooleanfalseCollision vs viewport

平台分布

Codex

33.48%
按下载量换算74

Claude

30.43%
按下载量换算68

Cursor

18.71%
按下载量换算42

Gemini CLI

8.79%
按下载量换算20

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

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

安装前确认

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

继续浏览同类 Skills