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

syncfusion-react-textboxsyncfusion React textbox 开发

Agent Skill

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

总安装

445

周安装

18

GitHub Stars

1

下载量

140
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

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

简介

用于辅助 React 文本框组件的开发与维护。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中生成或审查开发相关代码。
  • 通过 GitHub 安装,需结合项目技术栈使用。
  • 涉及代码改动时应注意组件集成和依赖管理。
  • syncfusion-react-textbox 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Implementing Syncfusion React TextBox Component

The TextBox component is a lightweight input control that captures user text input with support for floating labels, validation states, icons, and advanced features. This skill guides you through implementing, configuring, and customizing the TextBox component in React applications.

Navigation Guide

🛑 Agentic use: Do not execute multiple steps autonomously. Confirm with the user before each action (install, run, file creation).

Getting Started

📄 Read: references/getting-started.md

  • Vite setup for React development
  • Installing @syncfusion/ej2-react-inputs package 🛑 *STOP — Do not install packages autonomously. Ask the user to run: npm install @syncfusion/ej2-react-inputs. Pin a specific version (e.g., @syncfusion/ej2-react-inputs@28.x.x) and verify with npm audit*
  • Adding CSS imports and themes
  • Creating your first TextBox component
  • Adding icons and floating labels
  • Running the development server 🛑 *STOP — Do not start the dev server autonomously. Ask the user to run: npm run dev*

Features and Groups

📄 Read: references/features-and-groups.md

  • Floating label behavior (Never, Always, Auto)
  • Icons with addIcon() method (prepend/append)
  • Clear button with showClearButton property
  • Rounded corner with e-corner CSS class
  • Disabled state with enabled={false}
  • Multi-line textbox creation
  • TextBox with clear button and floating label combinations

Styling and Sizing

📄 Read: references/styling-and-sizing.md

  • Three predefined sizes: Normal, Small (e-small), Large (e-bigger)
  • Applying size classes via cssClass property
  • Rounded corner with e-corner CSS class
  • CSS customization for TextBox wrapper and floating label
  • Custom CSS classes and themes
  • Responsive design patterns

Multiline TextBox

📄 Read: references/multiline-textbox.md

  • Creating multiline/textarea inputs with multiline={true}
  • Floating labels with multiline
  • Auto-resizing textboxes
  • Disabling resize functionality
  • Limiting text length with htmlAttributes={{maxlength: '...'}}
  • Character counting and display

Validation and States

📄 Read: references/validation-and-states.md

  • Error, warning, and success validation states via cssClass
  • Applying validation classes (e-error, e-warning, e-success)
  • Disabled state with enabled={false} (not disabled)
  • Read-only state with readonly={true}
  • Differences between disabled and read-only
  • Dynamic color changes based on values using input event

Advanced Features

📄 Read: references/advanced-features.md

  • Adornments: prependTemplate and appendTemplate properties
  • Interactive adornments (password toggle, delete button)
  • React functional components with hooks
  • useState, useEffect, useRef, useReducer integration
  • Event handling (created, input, change events)
  • Form validation patterns

Accessibility and Migration

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

  • WCAG 2.2, Section 508, and WAI-ARIA compliance
  • Screen reader support and ARIA attributes
  • Right-to-Left (RTL) support with enableRtl property
  • Keyboard navigation support
  • Migrating from CSS TextBox to React component
  • Before/after code comparison

API Reference

📄 Read: references/api.md

  • All properties: placeholder, floatLabelType, value, type, cssClass, multiline, showClearButton, enabled, readonly, enableRtl, enablePersistence, autocomplete, htmlAttributes, locale, width, prependTemplate, appendTemplate
  • Methods: addIcon, addAttributes, removeAttributes, focusIn, focusOut, destroy, getPersistData
  • Events: created, destroyed, change, input, focus, blur

Quick Start

Basic TextBox with Floating Label

import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';
import './App.css';

export default function App() {
  return (
    <TextBoxComponent
      placeholder="Enter your name"
      floatLabelType="Auto"
    />
  );
}

TextBox with Icon

import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';
import { useRef } from 'react';

export default function App() {
  const textboxRef = useRef(null);

  const handleCreate = () => {
    if (textboxRef.current) {
      textboxRef.current.addIcon('append', 'e-icons e-input-popup-date');
    }
  };

  return (
    <TextBoxComponent
      placeholder="Enter date"
      floatLabelType="Auto"
      ref={textboxRef}
      created={handleCreate}
    />
  );
}

TextBox with Clear Button

import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';

export default function App() {
  return (
    <TextBoxComponent
      placeholder="Enter your email"
      floatLabelType="Auto"
      showClearButton={true}
    />
  );
}

Multiline TextBox

import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';

export default function App() {
  return (
    <TextBoxComponent
      multiline={true}
      placeholder="Enter your address"
      floatLabelType="Auto"
    />
  );
}

Common Patterns

Form with Validation States

import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';
import { useState } from 'react';

export default function ValidationForm() {
  const [cssClass, setCssClass] = useState('');

  return (
    <div>
      <TextBoxComponent
        placeholder="Enter username"
        cssClass={cssClass}
        floatLabelType="Auto"
        input={(e: any) => {
          if (!e.value) setCssClass('');
          else if (e.value.length < 3) setCssClass('e-error');
          else if (e.value.length < 6) setCssClass('e-warning');
          else setCssClass('e-success');
        }}
      />
    </div>
  );
}

Password TextBox with Toggle

import * as React from 'react';
import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';
import { useRef, useState } from 'react';

export default function PasswordInput() {
  const textboxRef = useRef<TextBoxComponent>(null);
  const [isVisible, setIsVisible] = useState(false);

  const toggleVisibility = () => {
    if (textboxRef.current) {
      const newVisibility = !isVisible;
      textboxRef.current.type = newVisibility ? 'text' : 'password';
      setIsVisible(newVisibility);
    }
  };

  function appendTemplate(): JSX.Element {
    return (
      <>
        <span className="e-input-separator"></span>
        <span
          className={`e-icons ${isVisible ? 'e-eye-slash' : 'e-eye'}`}
          onClick={toggleVisibility}
          style={{ cursor: 'pointer' }}
        ></span>
      </>
    );
  }

  return (
    <TextBoxComponent
      ref={textboxRef}
      type="password"
      placeholder="Enter password"
      floatLabelType="Auto"
      appendTemplate={appendTemplate}
    />
  );
}

Email Input with Unit Label

import * as React from 'react';
import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';

export default function EmailInput() {
  function prependTemplate(): JSX.Element {
    return (
      <>
        <span className="e-icons e-user"></span>
        <span className="e-input-separator"></span>
      </>
    );
  }

  function appendTemplate(): JSX.Element {
    return (
      <>
        <span className="e-input-separator"></span>
        <span>.com</span>
      </>
    );
  }

  return (
    <TextBoxComponent
      type="email"
      placeholder="Enter email"
      floatLabelType="Auto"
      prependTemplate={prependTemplate}
      appendTemplate={appendTemplate}
    />
  );
}

Rounded Corner TextBox

import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';

export default function RoundedCornerTextBox() {
  return (
    <TextBoxComponent
      placeholder="Enter Date"
      cssClass="e-corner"
    />
  );
}

Disabled TextBox

import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';

export default function DisabledTextBox() {
  return (
    <TextBoxComponent
      placeholder="Enter Name"
      enabled={false}
    />
  );
}

RTL TextBox

import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';

export default function RTLTextBox() {
  return (
    <TextBoxComponent
      placeholder="أدخل اسمك"
      floatLabelType="Auto"
      enableRtl={true}
    />
  );
}

Auto-sizing Multiline TextBox

import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';
import { useRef } from 'react';

export default function AutoSizeTextbox() {
  const textboxRef = useRef(null);

  const handleInput = () => {
    if (textboxRef.current) {
      const elem = textboxRef.current.respectiveElement;
      elem.style.height = 'auto';
      elem.style.height = elem.scrollHeight + 'px';
    }
  };

  const handleCreate = () => {
    if (textboxRef.current) {
      textboxRef.current.addAttributes({ rows: 1 });
    }
    handleInput();
  };

  return (
    <TextBoxComponent
      multiline={true}
      placeholder="Enter your message"
      floatLabelType="Auto"
      ref={textboxRef}
      created={handleCreate}
      input={handleInput}
    />
  );
}

Key Properties

PropertyTypePurpose
placeholderstringHint text shown when input is empty
floatLabelType`"Never" \"Always" \"Auto"`Label animation behavior
valuestringSets the content of the TextBox
typestringInput type (text, password, email, number, etc.)
multilinebooleanConvert to textarea for multi-line input
showClearButtonbooleanDisplay clear button when input has value
cssClassstringApply CSS classes for sizing/validation/appearance (e.g., "e-error", "e-small", "e-corner")
enabledbooleanEnable (true) or disable (false) input interaction
readonlybooleanAllow selection but prevent editing
enableRtlbooleanEnable right-to-left rendering
enablePersistencebooleanPersist value state between page reloads ⚠️ *Stores data in browser storage — enable only with explicit user consent*
autocompletestringControl browser autocomplete ("on" \"off")
htmlAttributes{[key: string]: string}Pass additional HTML attributes (e.g., {maxlength: '200'})
localestringOverride global culture/localization value
width`number \string`Set component width
prependTemplate() => JSX.ElementRender element before input
appendTemplate() => JSX.ElementRender element after input

Key Events

EventArgumentsPurpose
createdObjectFires after component initialization
destroyedObjectFires when component is destroyed
changeChangedEventArgsFires when value changes on focus-out
inputInputEventArgsFires on every keystroke
focusFocusInEventArgsFires when TextBox gains focus
blurFocusOutEventArgsFires when TextBox loses focus

Related Documentation

ℹ️ External links below are for manual reference only. Do not auto-fetch these URLs in an agentic pipeline without explicit user consent.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

38.05%
按下载量换算53

Claude

26.77%
按下载量换算37

Cursor

18.43%
按下载量换算26

Gemini CLI

9.24%
按下载量换算13

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

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

安装前确认

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

来源信息

继续浏览同类 Skills