1---
2name: syncfusion-react-inputs
3description: Comprehensive guide for implementing Syncfusion React input components including Uploader, NumericTextBox, TextBox, TextArea, CheckBox, OTP Input, Signature, RangeSlider, ColorPicker, MaskedTextBox, and Rating. Use this when building file upload UIs with async/chunk uploads, drag-and-drop functionality, numeric inputs with validation and formatting, text inputs with floating labels, custom adornments, form integration, accessibility compliance, and styling in React applications.
4metadata:
5 author: "Syncfusion Inc"
6 version: "34.1.29"
7 category: "Inputs"
8---
9
10# Implementing Syncfusion React Inputs
11
12## Uploader
13
14The Syncfusion React **UploaderComponent** provides a rich file upload control with async upload, drag-and-drop, chunk upload with pause/resume/cancel, validation, templates, form integration, and accessibility support.
15
16### Navigation Guide
17
18> 🛑 **Agentic use:** Do not execute multiple steps autonomously. Confirm with the user before each action (install, run, file creation).
19
20#### Getting Started
21📄 **Read:** [references/getting-started.md](references/uploader-getting-started.md)
22- Installing `@syncfusion/ej2-react-inputs` 🛑 *STOP — Do not install packages autonomously. Ask the user to run: `npm install @syncfusion/ej2-react-inputs`. Verify with `npm audit`*
23- License registration
24- Basic `UploaderComponent` usage in JSX/TSX
25- CSS theme imports
26- Drop area configuration
27- Success and failure event handling
28
29#### Asynchronous Upload
30📄 **Read:** [references/async-upload.md](references/uploader-async-upload.md)
31- `asyncSettings` with `saveUrl` and `removeUrl`
32- Multiple vs. single file upload (`multiple`)
33- Auto upload vs. manual upload (`autoUpload`)
34- Sequential upload (`sequentialUpload`)
35- Preloaded files (`files` property)
36- Adding custom HTTP headers via `uploading`/`removing` events
37- Server-side save/remove action examples
38
39#### Chunk Upload
40📄 **Read:** [references/chunk-upload.md](references/uploader-chunk-upload.md)
41- Enabling chunk upload with `asyncSettings.chunkSize`
42- Retry configuration (`retryCount`, `retryAfterDelay`)
43- Pause and resume chunked uploads (`pause`, `resume` methods)
44- Cancel uploads (`cancel` method)
45- `chunkSuccess` and `chunkFailure` events
46- Server-side chunk handling (C#)
47
48#### Validation
49📄 **Read:** [references/validation.md](references/uploader-validation.md)
50- Allowed file extensions (`allowedExtensions`)
51- File size limits (`minFileSize`, `maxFileSize`)
52- Maximum file count using `selected` event
53- Duplicate file prevention
54- Drag-and-drop image validation
55
56#### File Sources
57📄 **Read:** [references/file-source.md](references/uploader-file-source.md)
58- Clipboard paste upload
59- Directory/folder upload (`directoryUpload`)
60- Drag-and-drop with custom drop area (`dropArea`)
61- Customizing drop area appearance
62
63#### Templates and Customization
64📄 **Read:** [references/template-customization.md](references/uploader-template-customization.md)
65- File list `template` property
66- Custom upload UI with `showFileList: false`
67- Customizing action buttons (`buttons` property)
68- Progress bar customization
69- Hiding the default drop area
70- Style and appearance overrides
71
72#### Advanced How-To Scenarios
73📄 **Read:** [references/advanced-how-to.md](references/uploader-advanced-how-to.md)
74- Programmatic file upload (`upload` method, `getFilesData`)
75- Invisible/background upload
76- Image preview before uploading
77- Resize images before upload
78- Sort selected files
79- Check file size / MIME type before upload
80- Confirm dialog before file removal
81- Open/edit uploaded files
82- Trigger file browser from external button
83- Convert uploaded image to binary
84- JWT authentication for secure upload ⚠️ *Never hardcode tokens. Retrieve from a secure session store at runtime. Do not log request headers or token values.*
85- Form support (HTML form, template-driven, reactive)
86- Localization (custom locale strings)
87- Accessibility and keyboard navigation
88
89#### API Reference
90📄 **Read:** [references/api.md](references/uploader-api.md)
91- All properties (`allowedExtensions`, `asyncSettings`, `autoUpload`, `buttons`, `cssClass`, `directoryUpload`, `dropArea`, `dropEffect`, `enabled`, `files`, `htmlAttributes`, `locale`, `maxFileSize`, `minFileSize`, `multiple`, `sequentialUpload`, `showFileList`, `template`, and more)
92- All methods (`upload`, `remove`, `cancel`, `pause`, `resume`, `retry`, `clearAll`, `getFilesData`, `bytesToSize`, `createFileList`, `sortFileList`)
93- All events (`uploading`, `success`, `failure`, `selected`, `removing`, `change`, `progress`, `chunkSuccess`, `chunkFailure`, `chunkUploading`, `actionComplete`, `beforeRemove`, `beforeUpload`, `canceling`, `clearing`, `fileListRendering`, `pausing`, `resuming`, `created`)
94
95### Quick Start Example
96
97```tsx
98import { UploaderComponent } from '@syncfusion/ej2-react-inputs';
99import '@syncfusion/ej2-base/styles/material.css';
100import '@syncfusion/ej2-buttons/styles/material.css';
101import '@syncfusion/ej2-inputs/styles/material.css';
102import '@syncfusion/ej2-popups/styles/material.css';
103import '@syncfusion/ej2-react-inputs/styles/material.css';
104
105function App() {
106 // ⚠️ Replace with your own server-side endpoints.
107 // Never use third-party demo URLs in production — files will be sent to that external server.
108 const asyncSettings = {
109 saveUrl: '/api/upload/save',
110 removeUrl: '/api/upload/remove'
111 };
112
113 const onSuccess = (args: any) => {
114 console.log('Upload operation:', args.operation, 'File:', args.file.name);
115 };
116
117 const onFailure = (args: any) => {
118 console.error('Upload failed:', args.file.name);
119 };
120
121 return (
122 <UploaderComponent
123 asyncSettings={asyncSettings}
124 autoUpload={false}
125 success={onSuccess}
126 failure={onFailure}
127 />
128 );
129}
130```
131
132### Common Patterns
133
134#### Auto Upload with Validation
135```tsx
136<UploaderComponent
137 asyncSettings={{ saveUrl: '/api/upload/save', removeUrl: '/api/upload/remove' }}
138 allowedExtensions=".pdf,.doc,.docx"
139 maxFileSize={5000000}
140 multiple={true}
141/>
142```
143
144#### Manual Upload with Custom Buttons
145```tsx
146<UploaderComponent
147 asyncSettings={{ saveUrl: '/api/upload/save', removeUrl: '/api/upload/remove' }}
148 autoUpload={false}
149 buttons={{ browse: 'Choose File', clear: 'Clear All', upload: 'Upload All' }}
150/>
151```
152
153#### Chunk Upload for Large Files
154```tsx
155<UploaderComponent
156 asyncSettings={{
157 saveUrl: '/api/upload/save',
158 removeUrl: '/api/upload/remove',
159 chunkSize: 500000 // 500 KB chunks
160 }}
161/>
162```
163
164### Key Decision Guide
165
166| Need | Property/Event |
167|---|---|
168| Server URLs | `asyncSettings.saveUrl` + `asyncSettings.removeUrl` |
169| Auto vs manual upload | `autoUpload` (default: `true`) |
170| Large file upload | `asyncSettings.chunkSize` |
171| Restrict file types | `allowedExtensions` |
172| Limit file size | `maxFileSize` / `minFileSize` |
173| Preload files from server | `files` prop |
174| Upload one at a time | `sequentialUpload: true` |
175| Entire folder upload | `directoryUpload: true` |
176| Custom drop target | `dropArea` |
177| Custom file list UI | `template` or `showFileList: false` |
178| Add auth headers | `uploading` event → `args.currentRequest.setRequestHeader()` |
179| Send extra form data | `uploading` event → `args.customFormData` |
180
181## NumericTextBox
182
183The Syncfusion React **NumericTextBoxComponent** is a specialized input control for numeric data entry with support for number formatting (currency, percentage, scientific notation), min/max range validation, spin buttons, decimal precision control, internationalization, RTL languages, and full WCAG 2.2 accessibility compliance.
184
185### Documentation & Navigation Guide
186
187> 🛑 **Agentic use:** Do not execute multiple steps autonomously. Confirm with the user before each action (install, run, file creation).
188
189When the user needs help with NumericTextBox, guide them to the appropriate reference:
190
191#### Getting Started
192📄 **Read:** [references/getting-started.md](references/numerictextbox-getting-started.md)
193- Installation and package setup
194- CSS imports and themes
195- React component import and basic JSX
196- Creating your first NumericTextBox
197- Running the application
198
199#### Formats & Validation
200📄 **Read:** [references/formats-and-validation.md](references/numerictextbox-formats-and-validation.md)
201- Standard format specifiers (currency, percentage, number, scientific)
202- Custom number formats with # and 0 patterns
203- Range validation with min and max properties
204- strictMode for enforcing valid ranges
205- Real-world formatting examples
206
207#### Spin Buttons & Step Control
208📄 **Read:** [references/spin-buttons-and-step.md](references/numerictextbox-spin-buttons-and-step.md)
209- Enabling/disabling spin button arrows
210- Step property for increment values
211- Customizing spin button appearance and behavior
212- Precision with step increments
213- Keyboard shortcuts (Arrow Up/Down)
214
215#### Adornments & Styling
216📄 **Read:** [references/adornments-and-styling.md](references/numerictextbox-adornments-and-styling.md)
217- Prefix and suffix text (units, currency symbols)
218- CSS classes and custom styling
219- Placeholder, disabled, and readonly states
220- Focus and blur event handling
221- Theme customization and appearance options
222
223#### Precision & Decimals
224📄 **Read:** [references/precision-decimals.md](references/numerictextbox-precision-decimals.md)
225- decimals property for controlling decimal places
226- validateDecimalOnType for real-time precision validation
227- Maintaining trailing zeros in display
228- Rounding behavior and edge cases
229- Precision during input vs display
230
231#### Two-Way Binding & Forms
232📄 **Read:** [references/two-way-binding-forms.md](references/numerictextbox-two-way-binding-forms.md)
233- Two-way value binding in React (value prop + onChange)
234- Controlled component patterns
235- React state management
236- React Hook Form integration
237- Form validation with NumericTextBox
238
239#### Globalization & Accessibility
240📄 **Read:** [references/globalization-accessibility.md](references/numerictextbox-globalization-accessibility.md)
241- Internationalization and locale support
242- Right-to-Left (RTL) language support
243- WCAG 2.2 accessibility compliance
244- Keyboard navigation and shortcuts
245- Screen reader support with ARIA attributes
246- Focus management and color contrast
247
248#### API Reference
249📄 **Read:** [references/api.md](references/numerictextbox-api.md)
250- Complete properties reference (value, min, max, step, format, decimals, etc.)
251- Methods reference (increment, decrement, getText, focusIn, focusOut, destroy, etc.)
252- Events reference with full argument types (change, blur, focus, created, destroyed)
253
254### Quick Start Example
255
256Here's a minimal working example to get started:
257
258```jsx
259import React, { useState } from 'react';
260import { NumericTextBoxComponent } from '@syncfusion/ej2-react-inputs';
261import '@syncfusion/ej2-base/styles/material3.css';
262import '@syncfusion/ej2-buttons/styles/material3.css';
263import '@syncfusion/ej2-inputs/styles/material3.css';
264
265export default function App() {
266 const [value, setValue] = useState(10);
267
268 return (
269 <div style={{ padding: '20px' }}>
270 <h3>Enter a Number</h3>
271 <NumericTextBoxComponent
272 value={value}
273 onChange={(e) => setValue(e.value)}
274 min={0}
275 max={100}
276 step={1}
277 />
278 <p>Current Value: {value}</p>
279 </div>
280 );
281}
282```
283
284**Key points:**
285- Import `NumericTextBoxComponent` from `@syncfusion/ej2-react-inputs`
286- Import required CSS themes (material3 in this example)
287- Use `value` prop for the current numeric value
288- Use `onChange` event to update React state
289- Add `min`, `max`, `step` for validation and controls
290
291### Common Patterns
292
293#### 1. Currency Input
294```jsx
295<NumericTextBoxComponent
296 value={99.99}
297 format="c2"
298 min={0}
299 placeholder="Enter amount"
300/>
301```
302
303#### 2. Percentage Input
304```jsx
305<NumericTextBoxComponent
306 value={50}
307 format="p"
308 min={0}
309 max={100}
310/>
311```
312
313#### 3. Integer-Only Input
314```jsx
315<NumericTextBoxComponent
316 value={10}
317 decimals={0}
318 step={1}
319 min={0}
320/>
321```
322
323#### 4. Bounded Range with Validation
324```jsx
325<NumericTextBoxComponent
326 value={25}
327 min={0}
328 max={100}
329 strictMode={true}
330 placeholder="0-100"
331/>
332```
333
334#### 5. Form Field with Label
335```jsx
336<div>
337 <label>Product Quantity:</label>
338 <NumericTextBoxComponent
339 value={qty}
340 onChange={(e) => setQty(e.value)}
341 min={1}
342 step={1}
343 prefix="Units: "
344 />
345</div>
346```
347
348### Key Properties Reference
349
350| Property | Type | Purpose |
351|----------|------|---------|
352| `value` | number | Current numeric value |
353| `min` | number | Minimum allowed value |
354| `max` | number | Maximum allowed value |
355| `step` | number | Increment/decrement step (default: 1) |
356| `decimals` | number | Number of decimal places when focused |
357| `format` | string | Number format (n2, c2, p2, e2, etc.) |
358| `currency` | string | ISO 4217 currency code (e.g., 'USD', 'EUR') |
359| `placeholder` | string | Placeholder text when empty |
360| `floatLabelType` | FloatLabelType | Float label behavior ('Never', 'Always', 'Auto') |
361| `readonly` | boolean | Prevent user input |
362| `enabled` | boolean | Enable or disable the control (default: true) |
363| `strictMode` | boolean | Enforce min/max validation (default: true) |
364| `validateDecimalOnType` | boolean | Restrict decimal length during typing |
365| `showSpinButton` | boolean | Show/hide spinner arrows (default: true) |
366| `showClearButton` | boolean | Show/hide clear icon |
367| `allowMouseWheel` | boolean | Enable mouse wheel increment/decrement (default: true) |
368| `cssClass` | string | Additional CSS classes for custom styling |
369| `width` | number \| string | Width of the component |
370
371### Common Use Cases
372
373**1. Shopping Cart - Quantity Input**
374- Integer-only, min=1, step=1, spinner for easy adjustment
375
376**2. Price Calculator - Currency Field**
377- format="c2", min=0, prefix="$", two decimal places
378
379**3. Rating or Score - 0-100 Range**
380- min=0, max=100, strictMode=true, no decimals
381
382**4. Discount Percentage**
383- format="p", min=0, max=100, two decimal places
384
385**5. Measurement Input**
386- decimals=2, suffix=" cm", min=0, spinner for precision
387
388**6. Financial Form**
389- format="c2", validation, form integration, accessibility
390
391### Next Steps
392
3931. **Package requirement:** The packages `@syncfusion/ej2-react-inputs`, `@syncfusion/ej2-base`, and `@syncfusion/ej2-buttons` must be present in your project's `package.json`. Confirm they are already installed and that your lockfile (e.g., `package-lock.json` or `yarn.lock`) pins their versions for supply-chain integrity. When adding them, use an explicit version range such as `@syncfusion/ej2-react-inputs@^27.x.x` to avoid unpinned dependency risks.
3942. **Getting Started reference:** For installation details and basic setup, see [references/getting-started.md](references/numerictextbox-getting-started.md).
3953. **Choose your reference:** Based on your use case (formatting, validation, forms, etc.), navigate to the relevant reference section above.
3964. **Review examples:** Each reference contains ready-to-use code samples that can be adapted to your requirements.
3975. **Customize:** Modify the examples to fit your specific use case and application needs.
398
399---
400
401For detailed implementation guidance, navigate to the appropriate reference file above.
402
403## TextBox
404
405The 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.
406
407### Navigation Guide
408
409> 🛑 **Agentic use:** Do not execute multiple steps autonomously. Confirm with the user before each action (install, run, file creation).
410
411#### Getting Started
412📄 **Read:** [references/getting-started.md](references/textbox-getting-started.md)
413- Vite setup for React development
414- 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`*
415- Adding CSS imports and themes
416- Creating your first TextBox component
417- Adding icons and floating labels
418- Running the development server 🛑 *STOP — Do not start the dev server autonomously. Ask the user to run: `npm run dev`*
419
420#### Features and Groups
421📄 **Read:** [references/features-and-groups.md](references/textbox-features-and-groups.md)
422- Floating label behavior (Never, Always, Auto)
423- Icons with `addIcon()` method (prepend/append)
424- Clear button with `showClearButton` property
425- Rounded corner with `e-corner` CSS class
426- Disabled state with `enabled={false}`
427- Multi-line textbox creation
428- TextBox with clear button and floating label combinations
429
430#### Styling and Sizing
431📄 **Read:** [references/styling-and-sizing.md](references/textbox-styling-and-sizing.md)
432- Three predefined sizes: Normal, Small (`e-small`), Large (`e-bigger`)
433- Applying size classes via `cssClass` property
434- Rounded corner with `e-corner` CSS class
435- CSS customization for TextBox wrapper and floating label
436- Custom CSS classes and themes
437- Responsive design patterns
438
439#### Multiline TextBox
440📄 **Read:** [references/multiline-textbox.md](references/textbox-multiline-textbox.md)
441- Creating multiline/textarea inputs with `multiline={true}`
442- Floating labels with multiline
443- Auto-resizing textboxes
444- Disabling resize functionality
445- Limiting text length with `htmlAttributes={{ maxlength: '...' }}`
446- Character counting and display
447
448#### Validation and States
449📄 **Read:** [references/validation-and-states.md](references/textbox-validation-and-states.md)
450- Error, warning, and success validation states via `cssClass`
451- Applying validation classes (`e-error`, `e-warning`, `e-success`)
452- Disabled state with `enabled={false}` (not `disabled`)
453- Read-only state with `readonly={true}`
454- Differences between disabled and read-only
455- Dynamic color changes based on values using `input` event
456
457#### Advanced Features
458📄 **Read:** [references/advanced-features.md](references/textbox-advanced-features.md)
459- Adornments: `prependTemplate` and `appendTemplate` properties
460- Interactive adornments (password toggle, delete button)
461- React functional components with hooks
462- `useState`, `useEffect`, `useRef`, `useReducer` integration
463- Event handling (created, input, change events)
464- Form validation patterns
465
466#### Accessibility and Migration
467📄 **Read:** [references/accessibility-and-migration.md](references/textbox-accessibility-and-migration.md)
468- WCAG 2.2, Section 508, and WAI-ARIA compliance
469- Screen reader support and ARIA attributes
470- Right-to-Left (RTL) support with `enableRtl` property
471- Keyboard navigation support
472- Migrating from CSS TextBox to React component
473- Before/after code comparison
474
475#### API Reference
476📄 **Read:** [references/api.md](references/textbox-api.md)
477- All properties: `placeholder`, `floatLabelType`, `value`, `type`, `cssClass`, `multiline`, `showClearButton`, `enabled`, `readonly`, `enableRtl`, `enablePersistence`, `autocomplete`, `htmlAttributes`, `locale`, `width`, `prependTemplate`, `appendTemplate`
478- Methods: `addIcon`, `addAttributes`, `removeAttributes`, `focusIn`, `focusOut`, `destroy`, `getPersistData`
479- Events: `created`, `destroyed`, `change`, `input`, `focus`, `blur`
480
481### Quick Start
482
483#### Basic TextBox with Floating Label
484
485```tsx
486import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';
487import './App.css';
488
489export default function App() {
490 return (
491 <TextBoxComponent
492 placeholder="Enter your name"
493 floatLabelType="Auto"
494 />
495 );
496}
497```
498
499#### TextBox with Icon
500
501```tsx
502import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';
503import { useRef } from 'react';
504
505export default function App() {
506 const textboxRef = useRef(null);
507
508 const handleCreate = () => {
509 if (textboxRef.current) {
510 textboxRef.current.addIcon('append', 'e-icons e-input-popup-date');
511 }
512 };
513
514 return (
515 <TextBoxComponent
516 placeholder="Enter date"
517 floatLabelType="Auto"
518 ref={textboxRef}
519 created={handleCreate}
520 />
521 );
522}
523```
524
525#### TextBox with Clear Button
526
527```tsx
528import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';
529
530export default function App() {
531 return (
532 <TextBoxComponent
533 placeholder="Enter your email"
534 floatLabelType="Auto"
535 showClearButton={true}
536 />
537 );
538}
539```
540
541#### Multiline TextBox
542
543```tsx
544import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';
545
546export default function App() {
547 return (
548 <TextBoxComponent
549 multiline={true}
550 placeholder="Enter your address"
551 floatLabelType="Auto"
552 />
553 );
554}
555```
556
557### Common Patterns
558
559#### Form with Validation States
560
561```tsx
562import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';
563import { useState } from 'react';
564
565export default function ValidationForm() {
566 const [cssClass, setCssClass] = useState('');
567
568 return (
569 <div>
570 <TextBoxComponent
571 placeholder="Enter username"
572 cssClass={cssClass}
573 floatLabelType="Auto"
574 input={(e: any) => {
575 if (!e.value) setCssClass('');
576 else if (e.value.length < 3) setCssClass('e-error');
577 else if (e.value.length < 6) setCssClass('e-warning');
578 else setCssClass('e-success');
579 }}
580 />
581 </div>
582 );
583}
584```
585
586#### Password TextBox with Toggle
587
588```tsx
589import * as React from 'react';
590import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';
591import { useRef, useState } from 'react';
592
593export default function PasswordInput() {
594 const textboxRef = useRef<TextBoxComponent>(null);
595 const [isVisible, setIsVisible] = useState(false);
596
597 const toggleVisibility = () => {
598 if (textboxRef.current) {
599 const newVisibility = !isVisible;
600 textboxRef.current.type = newVisibility ? 'text' : 'password';
601 setIsVisible(newVisibility);
602 }
603 };
604
605 function appendTemplate(): JSX.Element {
606 return (
607 <>
608 <span className="e-input-separator"></span>
609 <span
610 className={`e-icons ${isVisible ? 'e-eye-slash' : 'e-eye'}`}
611 onClick={toggleVisibility}
612 style={{ cursor: 'pointer' }}
613 ></span>
614 </>
615 );
616 }
617
618 return (
619 <TextBoxComponent
620 ref={textboxRef}
621 type="password"
622 placeholder="Enter password"
623 floatLabelType="Auto"
624 appendTemplate={appendTemplate}
625 />
626 );
627}
628```
629
630#### Email Input with Unit Label
631
632```tsx
633import * as React from 'react';
634import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';
635
636export default function EmailInput() {
637 function prependTemplate(): JSX.Element {
638 return (
639 <>
640 <span className="e-icons e-user"></span>
641 <span className="e-input-separator"></span>
642 </>
643 );
644 }
645
646 function appendTemplate(): JSX.Element {
647 return (
648 <>
649 <span className="e-input-separator"></span>
650 <span>.com</span>
651 </>
652 );
653 }
654
655 return (
656 <TextBoxComponent
657 type="email"
658 placeholder="Enter email"
659 floatLabelType="Auto"
660 prependTemplate={prependTemplate}
661 appendTemplate={appendTemplate}
662 />
663 );
664}
665```
666
667#### Rounded Corner TextBox
668
669```tsx
670import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';
671
672export default function RoundedCornerTextBox() {
673 return (
674 <TextBoxComponent
675 placeholder="Enter Date"
676 cssClass="e-corner"
677 />
678 );
679}
680```
681
682#### Disabled TextBox
683
684```tsx
685import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';
686
687export default function DisabledTextBox() {
688 return (
689 <TextBoxComponent
690 placeholder="Enter Name"
691 enabled={false}
692 />
693 );
694}
695```
696
697#### RTL TextBox
698
699```tsx
700import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';
701
702export default function RTLTextBox() {
703 return (
704 <TextBoxComponent
705 placeholder="أدخل اسمك"
706 floatLabelType="Auto"
707 enableRtl={true}
708 />
709 );
710}
711```
712
713#### Auto-sizing Multiline TextBox
714
715```tsx
716import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';
717import { useRef } from 'react';
718
719export default function AutoSizeTextbox() {
720 const textboxRef = useRef(null);
721
722 const handleInput = () => {
723 if (textboxRef.current) {
724 const elem = textboxRef.current.respectiveElement;
725 elem.style.height = 'auto';
726 elem.style.height = elem.scrollHeight + 'px';
727 }
728 };
729
730 const handleCreate = () => {
731 if (textboxRef.current) {
732 textboxRef.current.addAttributes({ rows: 1 });
733 }
734 handleInput();
735 };
736
737 return (
738 <TextBoxComponent
739 multiline={true}
740 placeholder="Enter your message"
741 floatLabelType="Auto"
742 ref={textboxRef}
743 created={handleCreate}
744 input={handleInput}
745 />
746 );
747}
748```
749
750### Key Properties
751
752| Property | Type | Purpose |
753|----------|------|---------|
754| `placeholder` | `string` | Hint text shown when input is empty |
755| `floatLabelType` | `"Never" \| "Always" \| "Auto"` | Label animation behavior |
756| `value` | `string` | Sets the content of the TextBox |
757| `type` | `string` | Input type (`text`, `password`, `email`, `number`, etc.) |
758| `multiline` | `boolean` | Convert to textarea for multi-line input |
759| `showClearButton` | `boolean` | Display clear button when input has value |
760| `cssClass` | `string` | Apply CSS classes for sizing/validation/appearance (e.g., `"e-error"`, `"e-small"`, `"e-corner"`) |
761| `enabled` | `boolean` | Enable (`true`) or disable (`false`) input interaction |
762| `readonly` | `boolean` | Allow selection but prevent editing |
763| `enableRtl` | `boolean` | Enable right-to-left rendering |
764| `enablePersistence` | `boolean` | Persist value state between page reloads ⚠️ *Stores data in browser storage — enable only with explicit user consent* |
765| `autocomplete` | `string` | Control browser autocomplete (`"on"` \| `"off"`) |
766| `htmlAttributes` | `{ [key: string]: string }` | Pass additional HTML attributes (e.g., `{ maxlength: '200' }`) |
767| `locale` | `string` | Override global culture/localization value |
768| `width` | `number \| string` | Set component width |
769| `prependTemplate` | `() => JSX.Element` | Render element before input |
770| `appendTemplate` | `() => JSX.Element` | Render element after input |
771
772### Key Events
773
774| Event | Arguments | Purpose |
775|-------|-----------|---------|
776| `created` | `Object` | Fires after component initialization |
777| `destroyed` | `Object` | Fires when component is destroyed |
778| `change` | `ChangedEventArgs` | Fires when value changes on focus-out |
779| `input` | `InputEventArgs` | Fires on every keystroke |
780| `focus` | `FocusInEventArgs` | Fires when TextBox gains focus |
781| `blur` | `FocusOutEventArgs` | Fires when TextBox loses focus |
782
783### Related Documentation
784
785> **ℹ️ External links below are for manual reference only.** Do not auto-fetch these URLs in an agentic pipeline without explicit user consent.
786
787- [Syncfusion React TextBox Component Demo](https://ej2.syncfusion.com/react/demos/#/tailwind3/textboxes/default) *(external)*
788- [React TextBox API Reference](https://ej2.syncfusion.com/react/documentation/api/textbox/) *(external)*
789- [Syncfusion React Inputs Package](https://www.npmjs.com/package/@syncfusion/ej2-react-inputs) *(external — verify before installing)*
790- [React Functional Components](./references/textbox-advanced-features.md)
791
792## CheckBox
793
794The Syncfusion React `CheckBoxComponent` is a graphical UI element that allows users to select one or more options. It supports **checked**, **unchecked**, and **indeterminate** states, flexible label positioning, size variants, full accessibility compliance, and rich CSS customization.
795
796**Package:** `@syncfusion/ej2-react-buttons`
797
798---
799
800### Navigation Guide
801
802> 🛑 **Agentic use:** Do not execute multiple steps autonomously. Confirm with the user before each action (install, run, file creation).
803
804#### Getting Started
805📄 **Read:** [references/getting-started.md](references/checkbox-getting-started.md)
806- Installing `@syncfusion/ej2-react-buttons` 🛑 *STOP — Do not install packages autonomously. Ask the user to run: `npm install @syncfusion/ej2-react-buttons --save`. Verify with `npm audit`*
807- CSS theme imports for Tailwind3
808- Minimal `CheckBoxComponent` setup
809- Running the Vite/React app 🛑 *STOP — Do not start the dev server autonomously. Ask the user to run: `npm run dev`*
810
811#### States (Checked, Unchecked, Indeterminate, Disabled)
812📄 **Read:** [references/states.md](references/checkbox-states.md)
813- Setting `checked={true}` for checked state
814- Setting `indeterminate={true}` for indeterminate state
815- Setting `disabled={true}` for disabled state
816- Combined state examples
817
818#### Label and Size
819📄 **Read:** [references/label-and-size.md](references/checkbox-label-and-size.md)
820- `label` prop for caption text
821- `labelPosition` (`"Before"` / `"After"`)
822- Small size via `cssClass="e-small"`
823- Default vs. small size examples
824
825#### Style and Appearance
826📄 **Read:** [references/style-and-appearance.md](references/checkbox-style-and-appearance.md)
827- Available CSS classes for overriding checkbox styles
828- Color variant customization (primary, success, warning, danger, info)
829- Custom frame shapes (round checkbox)
830- Custom check icon
831- Theme Studio integration
832
833#### Accessibility and RTL
834📄 **Read:** [references/accessibility.md](references/checkbox-accessibility.md)
835- WCAG 2.2 / Section 508 compliance
836- WAI-ARIA attributes (`aria-disabled`)
837- Keyboard navigation (Space key)
838- Right-to-left (`enableRtl`) support
839- Screen reader support
840
841#### How-To Guides
842📄 **Read:** [references/how-to.md](references/checkbox-how-to.md)
843- Name and value in form submission
844- Enabling right-to-left display
845- Building customized checkbox variants
846
847#### API Reference
848📄 **Read:** [references/api.md](references/checkbox-api.md)
849- All properties: `checked`, `cssClass`, `disabled`, `enableHtmlSanitizer`, `enablePersistence`, `enableRtl`, `htmlAttributes`, `indeterminate`, `label`, `labelPosition`, `locale`, `name`, `value`
850- Methods: `click()`, `destroy()`, `focusIn()`
851- Events: `change`, `created`
852
853---
854
855### Quick Start
856
857```bash
858npm install @syncfusion/ej2-react-buttons --save
859# Then run: npm audit
860```
861
862```css
863/* src/App.css */
864@import "../node_modules/@syncfusion/ej2-base/styles/tailwind3.css";
865@import "../node_modules/@syncfusion/ej2-buttons/styles/tailwind3.css";
866```
867
868```tsx
869import { CheckBoxComponent } from '@syncfusion/ej2-react-buttons';
870import * as React from 'react';
871import './App.css';
872
873function App() {
874 return (
875 <div>
876 <CheckBoxComponent label="Accept Terms" />
877 </div>
878 );
879}
880export default App;
881```
882
883---
884
885### Common Patterns
886
887#### Controlled Checkbox with Change Handler
888```tsx
889import { CheckBoxComponent } from '@syncfusion/ej2-react-buttons';
890import { ChangeEventArgs } from '@syncfusion/ej2-react-buttons';
891import * as React from 'react';
892
893function App() {
894 const [isChecked, setIsChecked] = React.useState(false);
895
896 const handleChange = (args: ChangeEventArgs) => {
897 setIsChecked(args.checked);
898 };
899
900 return (
901 <CheckBoxComponent
902 label="Subscribe to newsletter"
903 checked={isChecked}
904 change={handleChange}
905 />
906 );
907}
908export default App;
909```
910
911#### Parent / Children with Indeterminate State
912```tsx
913import { CheckBoxComponent } from '@syncfusion/ej2-react-buttons';
914import * as React from 'react';
915
916function App() {
917 return (
918 <ul>
919 {/* Parent: indeterminate when some children are selected */}
920 <li><CheckBoxComponent label="Select All" indeterminate={true} /></li>
921 <li><CheckBoxComponent label="Option A" checked={true} /></li>
922 <li><CheckBoxComponent label="Option B" /></li>
923 </ul>
924 );
925}
926export default App;
927```
928
929#### Form Submission with Name and Value
930```tsx
931import { CheckBoxComponent, ButtonComponent } from '@syncfusion/ej2-react-buttons';
932import * as React from 'react';
933
934function App() {
935 return (
936 <form>
937 <CheckBoxComponent name="hobby" value="Reading" label="Reading" checked={true} />
938 <CheckBoxComponent name="hobby" value="Gaming" label="Gaming" />
939 <ButtonComponent isPrimary={true}>Submit</ButtonComponent>
940 </form>
941 );
942}
943export default App;
944```
945
946---
947
948### Key Props at a Glance
949
950| Prop | Type | Default | Purpose |
951|------|------|---------|---------|
952| `label` | `string` | `''` | Caption text next to checkbox |
953| `checked` | `boolean` | `false` | Checked state |
954| `indeterminate` | `boolean` | `false` | Indeterminate (partial) state |
955| `disabled` | `boolean` | `false` | Disabled state |
956| `labelPosition` | `'Before' \| 'After'` | `'After'` | Label placement |
957| `cssClass` | `string` | `''` | Custom CSS class(es) |
958| `name` | `string` | `''` | Form field name |
959| `value` | `string` | `''` | Form field value |
960| `enableRtl` | `boolean` | `false` | Right-to-left rendering |
961| `enablePersistence` | `boolean` | `false` | Persist state across reloads ⚠️ *Stores data in browser storage — enable only with explicit user consent* |
962
963---
964
965## Signature
966
967The Syncfusion React `SignatureComponent` renders a canvas-based signature pad that captures smooth handwritten signatures using variable-width bezier curves. It supports drawing, saving (PNG/JPEG/SVG/base64/blob), loading existing signatures, undo/redo history, customizable stroke and background appearance, and full accessibility compliance.
968
969**Package:** `@syncfusion/ej2-react-inputs`
970
971---
972
973### Navigation Guide
974
975> 🛑 **Agentic use:** Do not execute multiple steps autonomously. Confirm with the user before each action (install, run, file creation).
976
977#### Getting Started
978📄 **Read:** [references/getting-started.md](references/signature-getting-started.md)
979- Installing `@syncfusion/ej2-react-inputs` 🛑 *STOP — Do not install packages autonomously. Ask the user to run: `npm install @syncfusion/ej2-react-inputs --save`. Verify with `npm audit`*
980- CSS theme imports (Tailwind3)
981- Minimal `SignatureComponent` setup
982- Running the application 🛑 *STOP — Do not start the dev server autonomously. Ask the user to run: `npm run dev`*
983
984#### Customization
985📄 **Read:** [references/customization.md](references/signature-customization.md)
986- Stroke width: `maxStrokeWidth`, `minStrokeWidth`, `velocity`
987- Stroke color: `strokeColor`
988- Background color: `backgroundColor`
989- Background image: `backgroundImage`
990
991#### Open and Save
992📄 **Read:** [references/open-save.md](references/signature-open-save.md)
993- Load signature from base64 or URL (`load`)
994- Save as base64 (`getSignature`)
995- Save as Blob (`saveAsBlob`, `getBlob`)
996- Save as image file — PNG, JPEG, SVG (`save`)
997- Save with background (`saveWithBackground`)
998
999#### User Interaction
1000📄 **Read:** [references/user-interaction.md](references/signature-user-interaction.md)
1001- Undo/redo strokes (`undo`, `redo`, `canUndo`, `canRedo`)
1002- Clear the canvas (`clear`, `isEmpty`)
1003- Disabled state (`disabled`)
1004- Read-only mode (`isReadOnly`)
1005- Draw text as signature (`draw`)
1006- Keyboard shortcuts (Ctrl+Z, Ctrl+Y, Ctrl+S, Delete)
1007
1008#### Toolbar Integration
1009📄 **Read:** [references/toolbar-integration.md](references/signature-toolbar-integration.md)
1010- Integrating with Syncfusion `ToolbarComponent`
1011- Wiring undo, redo, clear, and save toolbar buttons
1012- Stroke color picker using `ColorPickerComponent`
1013- Background color picker integration
1014- Stroke width dropdown with `DropDownListComponent`
1015- Enabling/disabling toolbar buttons based on signature state
1016
1017#### Accessibility
1018📄 **Read:** [references/accessibility.md](references/signature-accessibility.md)
1019- WCAG 2.2 / Section 508 compliance
1020- Keyboard interaction (Ctrl+Z, Ctrl+Y, Ctrl+S, Delete)
1021- Screen reader and mobile device support
1022
1023#### API Reference
1024📄 **Read:** [references/api.md](references/signature-api.md)
1025- All properties: `backgroundColor`, `backgroundImage`, `disabled`, `enablePersistence`, `isReadOnly`, `maxStrokeWidth`, `minStrokeWidth`, `saveWithBackground`, `strokeColor`, `velocity`
1026- All methods: `canRedo`, `canUndo`, `clear`, `destroy`, `draw`, `getBlob`, `getSignature`, `isEmpty`, `load`, `redo`, `refresh`, `save`, `saveAsBlob`, `undo`
1027- Events: `beforeSave`, `change`, `created`
1028
1029---
1030
1031### Quick Start
1032
1033```bash
1034npm install @syncfusion/ej2-react-inputs --save
1035# Then run: npm audit
1036```
1037
1038```css
1039/* src/App.css */
1040@import "../node_modules/@syncfusion/ej2-base/styles/tailwind3.css";
1041@import "../node_modules/@syncfusion/ej2-inputs/styles/tailwind3.css";
1042```
1043
1044```tsx
1045import { SignatureComponent } from '@syncfusion/ej2-react-inputs';
1046import * as React from 'react';
1047import './App.css';
1048
1049function App() {
1050 return (
1051 <div>
1052 <SignatureComponent id="signature" />
1053 </div>
1054 );
1055}
1056export default App;
1057```
1058
1059---
1060
1061### Common Patterns
1062
1063#### Signature with Undo/Redo/Clear Controls
1064```tsx
1065import { SignatureComponent, SignatureChangeEventArgs } from '@syncfusion/ej2-react-inputs';
1066import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
1067import * as React from 'react';
1068import { useRef } from 'react';
1069
1070function App() {
1071 const sigRef = React.useRef<SignatureComponent>(null);
1072 const [canUndo, setCanUndo] = React.useState(false);
1073 const [canRedo, setCanRedo] = React.useState(false);
1074 const [isEmpty, setIsEmpty] = React.useState(true);
1075
1076 function handleChange(args: SignatureChangeEventArgs) {
1077 if (sigRef.current) {
1078 setCanUndo(sigRef.current.canUndo());
1079 setCanRedo(sigRef.current.canRedo());
1080 setIsEmpty(sigRef.current.isEmpty());
1081 }
1082 }
1083
1084 return (
1085 <div>
1086 <ButtonComponent disabled={!canUndo} onClick={() => sigRef.current?.undo()}>Undo</ButtonComponent>
1087 <ButtonComponent disabled={!canRedo} onClick={() => sigRef.current?.redo()}>Redo</ButtonComponent>
1088 <ButtonComponent disabled={isEmpty} onClick={() => sigRef.current?.clear()}>Clear</ButtonComponent>
1089 <SignatureComponent id="signature" ref={sigRef} change={handleChange} />
1090 </div>
1091 );
1092}
1093export default App;
1094```
1095
1096#### Save Signature as PNG
1097```tsx
1098import { SignatureComponent } from '@syncfusion/ej2-react-inputs';
1099import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
1100import * as React from 'react';
1101
1102function App() {
1103 const sigRef = React.useRef<SignatureComponent>(null);
1104
1105 function saveSignature() {
1106 sigRef.current?.save('Png', 'MySignature');
1107 }
1108
1109 return (
1110 <div>
1111 <SignatureComponent id="signature" ref={sigRef} />
1112 <ButtonComponent onClick={saveSignature}>Save as PNG</ButtonComponent>
1113 </div>
1114 );
1115}
1116export default App;
1117```
1118
1119---
1120
1121### Key Props at a Glance
1122
1123| Prop | Type | Default | Purpose |
1124|------|------|---------|---------|
1125| `strokeColor` | `string` | `'#000000'` | Pen/stroke color (hex, rgb, or name) |
1126| `backgroundColor` | `string` | `''` | Canvas background color |
1127| `backgroundImage` | `string` | `''` | Canvas background image URL |
1128| `maxStrokeWidth` | `number` | `2` | Maximum stroke thickness |
1129| `minStrokeWidth` | `number` | `0.5` | Minimum stroke thickness |
1130| `velocity` | `number` | `0.7` | Controls stroke width variation |
1131| `disabled` | `boolean` | `false` | Disables the component |
1132| `isReadOnly` | `boolean` | `false` | Prevents drawing, allows focus |
1133| `saveWithBackground` | `boolean` | `true` | Include background when saving |
1134| `enablePersistence` | `boolean` | `false` | Persist state across page reloads ⚠️ *Stores signature data (biometric input) in browser storage — enable only with explicit user consent and applicable privacy disclosures* |
1135
1136---
1137
1138## OTP Input
1139
1140A focused input component for collecting one-time passwords, PINs, and verification codes. Renders a configurable number of individual character input fields with full keyboard navigation, accessibility support, and visual styling modes.
1141
1142### Quick Start
1143
1144```tsx
1145import { OtpInputComponent } from '@syncfusion/ej2-react-inputs';
1146import * as React from 'react';
1147import './App.css';
1148
1149function App() {
1150 return (
1151 <div id="container">
1152 <OtpInputComponent id="otpinput" />
1153 </div>
1154 );
1155}
1156
1157export default App;
1158```
1159
1160**CSS (src/App.css):**
1161```css
1162@import "../node_modules/@syncfusion/ej2-base/styles/tailwind3.css";
1163@import "../node_modules/@syncfusion/ej2-inputs/styles/tailwind3.css";
1164```
1165
1166**Install:**
1167```bash
1168npm install @syncfusion/ej2-react-inputs --save
1169```
1170
1171### Common Patterns
1172
1173#### 6-digit OTP with verification callback
1174
1175```tsx
1176import { OtpInputComponent, OtpChangedEventArgs } from '@syncfusion/ej2-react-inputs';
1177import * as React from 'react';
1178
1179function App() {
1180 const handleValueChanged = (args: OtpChangedEventArgs) => {
1181 console.log('Complete OTP:', args.value);
1182 // Call your API verification here
1183 };
1184
1185 return (
1186 <OtpInputComponent
1187 id="otpinput"
1188 length={6}
1189 autoFocus={true}
1190 valueChanged={handleValueChanged}
1191 />
1192 );
1193}
1194```
1195
1196#### Password-masked OTP with error state
1197
1198```tsx
1199import { OtpInputComponent } from '@syncfusion/ej2-react-inputs';
1200import * as React from 'react';
1201
1202function App() {
1203 return (
1204 <OtpInputComponent
1205 id="otpinput"
1206 type="password"
1207 length={6}
1208 cssClass="e-error"
1209 placeholder="*"
1210 />
1211 );
1212}
1213```
1214
1215#### Alphanumeric OTP with separator
1216
1217```tsx
1218import { OtpInputComponent } from '@syncfusion/ej2-react-inputs';
1219import * as React from 'react';
1220
1221function App() {
1222 return (
1223 <OtpInputComponent
1224 id="otpinput"
1225 type="text"
1226 length={6}
1227 separator="-"
1228 textTransform="uppercase"
1229 stylingMode="filled"
1230 />
1231 );
1232}
1233```
1234
1235### Key Properties
1236
1237| Property | Type | Default | Purpose |
1238|----------|------|---------|---------|
1239| `length` | `number` | `4` | Number of OTP input fields |
1240| `value` | `string \| number` | `''` | Current OTP value |
1241| `type` | `'number' \| 'text' \| 'password'` | `'number'` | Input character type |
1242| `stylingMode` | `'outlined' \| 'filled' \| 'underlined'` | `'outlined'` | Visual style variant |
1243| `placeholder` | `string` | `''` | Hint character(s) per field |
1244| `separator` | `string` | `''` | Character between fields |
1245| `cssClass` | `string` | `''` | Custom/predefined CSS class (`e-success`, `e-warning`, `e-error`) |
1246| `disabled` | `boolean` | `false` | Disables user input |
1247| `autoFocus` | `boolean` | `false` | Auto-focuses on render |
1248| `enableRtl` | `boolean` | `false` | Right-to-left layout |
1249| `textTransform` | `'none' \| 'uppercase' \| 'lowercase'` | `'none'` | Case transformation |
1250| `ariaLabels` | `string[]` | `[]` | Per-field ARIA labels |
1251| `htmlAttributes` | `{ [key: string]: string }` | `{}` | Extra HTML attributes |
1252
1253### Navigation Guide
1254
1255#### Installation, Setup & Basic Usage
1256📄 **Read:** [references/getting-started.md](references/otp-input-getting-started.md)
1257- npm install and Vite project setup
1258- CSS theme imports
1259- Minimal working example
1260- Setting OTP length
1261- Setting a default value
1262- Auto-focus on load
1263- Troubleshooting
1264
1265#### Input Types, Styling & Visual Configuration
1266📄 **Read:** [references/configuration.md](references/otp-input-configuration.md)
1267- Input types: number, text, password
1268- Styling modes: outlined, filled, underlined
1269- Placeholder text (single/per-field)
1270- Separator characters
1271- Disabled state
1272- CSS class customization (`e-success`, `e-warning`, `e-error`)
1273- RTL support
1274- Text transform (uppercase/lowercase)
1275- State persistence
1276
1277#### Events & Interaction Handling
1278📄 **Read:** [references/events.md](references/otp-input-events.md)
1279- `created` event (post-render init)
1280- `focus` and `blur` events with `OtpFocusEventArgs`
1281- `input` event for real-time tracking with `OtpInputEventArgs`
1282- `valueChanged` event for OTP submission with `OtpChangedEventArgs`
1283- Programmatic focus via `focusIn()` / `focusOut()` methods
1284- Patterns: conditional submit button, verification feedback
1285
1286#### Accessibility
1287📄 **Read:** [references/accessibility.md](references/otp-input-accessibility.md)
1288- WCAG 2.2, Section 508 compliance
1289- WAI-ARIA roles and attributes
1290- Keyboard navigation shortcuts
1291- Per-field `ariaLabels` configuration
1292- `htmlAttributes` for custom accessibility metadata
1293- RTL support
1294- Axe-core and accessibility-checker validation
1295
1296#### Full API Reference
1297📄 **Read:** [references/api.md](references/otp-input-api.md)
1298- All properties with types, defaults, and examples
1299- Methods: `destroy()`, `focusIn()`, `focusOut()`
1300- All events and their argument interfaces
1301- Type enumerations: `OtpInputType`, `OtpInputStyle`, `TextTransform`
1302- Event argument interfaces: `OtpFocusEventArgs`, `OtpInputEventArgs`, `OtpChangedEventArgs`
1303
1304### Decision Guide
1305
1306**Which type to use?**
1307- User enters digits only → `type="number"` (default)
1308- User enters letters + digits → `type="text"`
1309- Input should be hidden/masked → `type="password"`
1310
1311**Which event to use?**
1312- Trigger verification when OTP is fully entered → `valueChanged`
1313- Track partial input in real time → `input`
1314- Know when user clicks into/out of a field → `focus` / `blur`
1315
1316**Which styling mode?**
1317- Standard forms → `outlined` (default)
1318- Card/dashboard UI → `filled`
1319- Material Design forms → `underlined`
1320
1321**Visual feedback after verification?**
1322- Correct OTP → set `cssClass="e-success"`
1323- Wrong OTP → set `cssClass="e-error"`
1324- Pending/caution → set `cssClass="e-warning"`
1325
1326## TextArea
1327
1328The TextArea component enables efficient collection of multiline text input in forms and applications. It provides essential features for user feedback, comments, descriptions, and any scenario requiring extended text input.
1329
1330### Navigation Guide
1331
1332#### Getting Started
1333📄 **Read:** [references/getting-started.md](references/textarea-getting-started.md)
1334- Installation and npm setup
1335- Vite/React project configuration
1336- Basic TextArea implementation
1337- CSS imports and theming
1338- Getting and setting values with properties, state, and events
1339
1340#### Core Features & Content
1341📄 **Read:** [references/value-and-content.md](references/textarea-value-and-content.md)
1342- Setting initial values with property and state
1343- Getting current value from textarea
1344- Value binding patterns
1345- Change detection and state management
1346
1347#### Floating Labels & Placeholders
1348📄 **Read:** [references/floating-label.md](references/textarea-floating-label.md)
1349- Floating label types (Auto, Always, Never)
1350- Placeholder behavior during user interaction
1351- Localization with floating labels
1352- Placeholder text translations for different cultures
1353
1354#### Adornments (Custom Elements)
1355📄 **Read:** [references/adornments.md](references/textarea-adornments.md)
1356- Adding icons, buttons, or text before/after textarea
1357- Prepend and append templates
1358- Adornment flow and orientation (horizontal/vertical)
1359- Common use cases: character count, formatting tools, validation icons
1360
1361#### Form Integration
1362📄 **Read:** [references/form-support.md](references/textarea-form-support.md)
1363- HTML form submission with textarea
1364- Name attribute and form data
1365- FormValidator integration for validation rules
1366- Required fields, min/max length constraints
1367- Validation messaging and error states
1368
1369#### Content Constraints
1370📄 **Read:** [references/max-length.md](references/textarea-max-length.md)
1371- Enforcing character limits with maxLength
1372- Preventing user input beyond limit
1373- User feedback on character restrictions
1374- Edge cases and best practices
1375
1376#### Sizing & Dimensions
1377📄 **Read:** [references/rows-columns-sizing.md](references/textarea-rows-columns-sizing.md)
1378- Setting visible height with rows property
1379- Setting visible width with cols property
1380- Responsive sizing strategies
1381- Controlling textarea dimensions
1382
1383#### Resize Behavior
1384📄 **Read:** [references/resize.md](references/textarea-resize.md)
1385- Resize modes: Vertical, Horizontal, Both, None
1386- User-controlled resizing
1387- Width customization
1388- Layout considerations for fixed-size textareas
1389
1390#### Styling & Appearance
1391📄 **Read:** [references/styling-appearance.md](references/textarea-styling-appearance.md)
1392- Size classes (e-small, e-bigger)
1393- Filled and outline appearance modes
1394- Custom CSS with cssClass property
1395- Disabled and read-only states
1396- Validation state styling (success, warning, error)
1397- Clear button configuration
1398- Color customization and rounded corners
1399
1400#### Events & User Interaction
1401📄 **Read:** [references/events.md](references/textarea-events.md)
1402- created: Initialization event
1403- input: Real-time value change detection
1404- change: Value change with focus-out
1405- focus: Focus gained
1406- blur: Focus lost
1407- destroyed: Component cleanup
1408- Event args and usage patterns
1409
1410#### Methods & Programmatic Control
1411📄 **Read:** [references/methods.md](references/textarea-methods.md)
1412- focusIn(): Programmatically set focus
1413- focusOut(): Remove focus
1414- getPersistData(): Retrieve persistence state
1415- addAttributes(): Add HTML attributes dynamically
1416- removeAttributes(): Remove HTML attributes
1417- destroy(): Clean up component
1418
1419#### Complete API Reference
1420📄 **Read:** [references/api.md](references/textarea-api.md)
1421- All properties with descriptions and defaults
1422- All methods with parameters and return types
1423- All events with arg types
1424- Type definitions and enums
1425- Usage examples for each API
1426
1427### Quick Start
1428
1429```typescript
1430import { TextAreaComponent } from '@syncfusion/ej2-react-inputs';
1431import * as React from 'react';
1432import './App.css';
1433
1434function App() {
1435 const [textValue, setTextValue] = React.useState('');
1436
1437 const handleChange = (args) => {
1438 console.log('TextArea value changed:', args.value);
1439 };
1440
1441 return (
1442 <div className='wrap'>
1443 <TextAreaComponent
1444 id='default'
1445 placeholder='Enter your comments'
1446 value={textValue}
1447 change={handleChange}
1448 floatLabelType='Auto'
1449 rows={5}
1450 cols={40}
1451 />
1452 </div>
1453 );
1454}
1455
1456export default App;
1457```
1458
1459### Common Patterns
1460
1461#### Pattern 1: Form with Validation
1462```typescript
1463<TextAreaComponent
1464 name='comments'
1465 placeholder='Your feedback'
1466 floatLabelType='Auto'
1467 required={true}
1468 maxLength={500}
1469 showClearButton={true}
1470/>
1471```
1472
1473#### Pattern 2: Controlled Component with State
1474```typescript
1475const [value, setValue] = React.useState('');
1476
1477<TextAreaComponent
1478 value={value}
1479 input={(args) => setValue(args.value)}
1480/>
1481```
1482
1483#### Pattern 3: Styled with Custom CSS
1484```typescript
1485<TextAreaComponent
1486 placeholder='Enter text'
1487 cssClass='e-outline e-small'
1488 floatLabelType='Auto'
1489/>
1490```
1491
1492#### Pattern 4: Disabled & Read-Only States
1493```typescript
1494<TextAreaComponent placeholder='Disabled' enabled={false} />
1495<TextAreaComponent placeholder='Read-only' readonly={true} />
1496```
1497
1498#### Pattern 5: With Adornments
1499```typescript
1500<TextAreaComponent
1501 placeholder='Message'
1502 prependTemplate={() => <span className='icon'>📝</span>}
1503 appendTemplate={() => <button>Send</button>}
1504/>
1505```
1506
1507### Key Props Summary
1508
1509| Prop | Purpose | Common Values |
1510|------|---------|----------------|
1511| `value` | Set/get textarea content | string |
1512| `placeholder` | Hint text | string |
1513| `rows` | Visible height in lines | 3-10 |
1514| `cols` | Visible width in characters | 30-80 |
1515| `floatLabelType` | Floating behavior | 'Auto', 'Always', 'Never' |
1516| `maxLength` | Character limit | number |
1517| `resizeMode` | User resizing | 'Both', 'Vertical', 'Horizontal', 'None' |
1518| `enabled` | Enable/disable input | boolean |
1519| `readonly` | Read-only mode | boolean |
1520| `cssClass` | Custom styling | 'e-outline', 'e-small', 'e-filled' |
1521| `showClearButton` | Display clear button | boolean |
1522
1523## Slider (RangeSlider)
1524
1525A comprehensive guide for implementing the Syncfusion Essential JS 2 `SliderComponent` in React applications. Supports single-value (`Default`), min-range fill (`MinRange`), and dual-handle range selection (`Range`) with tooltips, ticks, limits, color ranges, custom values, formatting, accessibility, events, and more.
1526
1527**Package:** `@syncfusion/ej2-react-inputs`
1528
1529### Navigation Guide
1530
1531#### Getting Started
1532📄 **Read:** [references/getting-started.md](references/range-slider-getting-started.md)
1533- Installation and package setup
1534- Basic implementation of three slider types
1535- CSS imports and theme setup
1536- Minimal working example
1537- Initial configuration
1538
1539#### Types and Orientation
1540📄 **Read:** [references/types-and-orientation.md](references/range-slider-types-and-orientation.md)
1541- Three slider types: Default, MinRange, Range
1542- Understanding shadow/fill behavior
1543- Horizontal vs vertical orientation
1544- Type selection guide
1545- Code examples for each type
1546
1547#### Tooltips and Ticks
1548📄 **Read:** [references/tooltips-and-ticks.md](references/range-slider-tooltips-and-ticks.md)
1549- Tooltip configuration and placement
1550- Tooltip visibility modes (Always, Focus, Click)
1551- Tick marks and scale display
1552- largeStep and smallStep configuration
1553- Small tick visibility
1554- Combined tooltip + ticks examples
1555
1556#### Formatting and Limits
1557📄 **Read:** [references/formatting-and-limits.md](references/range-slider-formatting-and-limits.md)
1558- Value formatting (currency, percentages, custom formats)
1559- Using the format API
1560- Slider limits and restricted ranges
1561- Handle locking (start/end fixed)
1562- Min/max bounds per handle
1563- Edge cases and constraint handling
1564
1565#### Styling and Customization
1566📄 **Read:** [references/styling.md](references/range-slider-styling.md)
1567- CSS selectors for track, handle, limits, ticks, buttons
1568- Customizing track color and height
1569- Handle styling (color, border, size)
1570- Theme integration and built-in themes
1571- CSS variable customization
1572- Advanced styling patterns
1573
1574#### Accessibility
1575📄 **Read:** [references/accessibility.md](references/range-slider-accessibility.md)
1576- WCAG 2.2 and Section 508 compliance
1577- WAI-ARIA attributes and roles (`role="slider"`, `aria-valuemin`, `aria-valuemax`, `aria-valuenow`, `aria-orientation`)
1578- Keyboard navigation (Arrow keys, Home, End, Page Up/Down)
1579- Screen reader support and `aria-live` regions
1580- Focus management and color contrast requirements
1581- Mobile touch accessibility
1582
1583#### Color Range
1584📄 **Read:** [references/color-range.md](references/range-slider-color-range.md)
1585- `colorRange` property and `ColorRangeDataModel` interface
1586- Three-zone and multi-zone patterns (red/amber/green)
1587- Color range with `Range` type (dual handles)
1588- Dynamic color zones based on runtime data
1589- Real-world: battery, risk, performance, score patterns
1590- Combining `colorRange` with `limits`, `ticks`, and `tooltip`
1591
1592#### Events and Methods
1593📄 **Read:** [references/events-and-methods.md](references/range-slider-events-and-methods.md)
1594- `change` event — continuous value updates while dragging
1595- `changed` event — final committed value on drag release
1596- `created` event — post-render initialization
1597- `renderingTicks` — customize tick label text per tick
1598- `renderedTicks` — post-process tick DOM after all ticks render
1599- `tooltipChange` — customize tooltip display text
1600- `reposition()` method — when and how to call
1601- `destroy()` method — cleanup and removal
1602- React `ref` patterns for programmatic control
1603- Common patterns: API sync, conditional logic, live preview
1604
1605#### API Reference
1606📄 **Read:** [references/api-reference.md](references/range-slider-api-reference.md)
1607- All official `SliderComponent` properties: `value`, `type`, `min`, `max`, `step`, `orientation`, `ticks`, `tooltip`, `limits`, `colorRange`, `customValues`, `showButtons`, `enableAnimation`, `enabled`, `readonly`, `cssClass`, `width`, `enableRtl`, `enablePersistence`, `enableHtmlSanitizer`, `locale`
1608- Official methods: `reposition()`, `destroy()`
1609- All official events with correct argument interfaces: `change`, `changed`, `created`, `renderingTicks`, `renderedTicks`, `tooltipChange`
1610- Interface: `TicksDataModel` — `placement` (`'Before'`/`'After'`/`'Both'`/`'None'`), `largeStep`, `smallStep`, `showSmallTicks`, `format`
1611- Interface: `TooltipDataModel` — `isVisible`, `placement`, `showOn` (`'Always'`/`'Focus'`/`'Click'`), `format`, `cssClass`
1612- Interface: `LimitDataModel` — `enabled`, `minStart`, `minEnd`, `maxStart`, `maxEnd`, `startHandleFixed`, `endHandleFixed`
1613- Interface: `ColorRangeDataModel` — `color`, `start`, `end`
1614- Interface: `SliderChangeEventArgs` — `value`, `previousValue`, `action`, `isInteracted`, `text`
1615- Interface: `SliderTickEventArgs` — `value`, `text`, `tickElement`
1616- Interface: `SliderTickRenderedEventArgs` — `ticksWrapper`, `tickElements`
1617- Interface: `SliderTooltipEventArgs` — `value`, `text`
1618- Enum: `SliderType` (`'Default'` | `'MinRange'` | `'Range'`)
1619- Enum: `SliderOrientation` (`'Horizontal'` | `'Vertical'`)
1620
1621### Quick Start
1622
1623#### Basic Single Value Slider
1624
1625```tsx
1626import React from 'react';
1627import { SliderComponent } from '@syncfusion/ej2-react-inputs';
1628import '@syncfusion/ej2-react-inputs/styles/material.css';
1629
1630function App() {
1631 return (
1632 <div>
1633 <SliderComponent
1634 id="slider"
1635 value={30}
1636 min={0}
1637 max={100}
1638 />
1639 </div>
1640 );
1641}
1642export default App;
1643```
1644
1645#### Range Slider (Two Handles)
1646
1647```tsx
1648import React from 'react';
1649import { SliderComponent } from '@syncfusion/ej2-react-inputs';
1650import '@syncfusion/ej2-react-inputs/styles/material.css';
1651
1652function App() {
1653 const [range, setRange] = React.useState([30, 70]);
1654
1655 return (
1656 <div>
1657 <SliderComponent
1658 id="range-slider"
1659 type="Range"
1660 value={range}
1661 change={(e) => setRange(e.value)}
1662 min={0}
1663 max={100}
1664 />
1665 </div>
1666 );
1667}
1668export default App;
1669```
1670
1671#### Price Range Selector
1672
1673```tsx
1674import React from 'react';
1675import { SliderComponent } from '@syncfusion/ej2-react-inputs';
1676import '@syncfusion/ej2-react-inputs/styles/material.css';
1677
1678function PriceRangeSelector() {
1679 const [priceRange, setPriceRange] = React.useState([100, 500]);
1680
1681 const tooltip = {
1682 placement: 'Before',
1683 isVisible: true,
1684 format: 'C2' // Currency format
1685 };
1686
1687 return (
1688 <div>
1689 <h3>Price Range: ${priceRange[0]} - ${priceRange[1]}</h3>
1690 <SliderComponent
1691 id="price-slider"
1692 type="Range"
1693 value={priceRange}
1694 change={(e) => setPriceRange(e.value)}
1695 min={0}
1696 max={1000}
1697 step={10}
1698 tooltip={tooltip}
1699 />
1700 </div>
1701 );
1702}
1703export default PriceRangeSelector;
1704```
1705
1706### Common Patterns
1707
1708#### Pattern 1: Single Value with Ticks
1709Use Default type for simple numeric selection with visual scale.
1710
1711```tsx
1712<SliderComponent
1713 id="default-slider"
1714 value={40}
1715 min={0}
1716 max={100}
1717 step={5}
1718 ticks={{
1719 placement: 'After',
1720 largeStep: 20,
1721 smallStep: 5,
1722 showSmallTicks: true
1723 }}
1724/>
1725```
1726
1727#### Pattern 2: Range with Fixed Limits
1728Use Range type with limits to restrict handle movement to specific areas.
1729
1730```tsx
1731<SliderComponent
1732 id="limited-range"
1733 type="Range"
1734 value={[25, 75]}
1735 limits={{
1736 enabled: true,
1737 minStart: 10,
1738 minEnd: 40,
1739 maxStart: 60,
1740 maxEnd: 90
1741 }}
1742 tooltip={{ isVisible: true }}
1743/>
1744```
1745
1746#### Pattern 3: Formatted Values (Currency)
1747Display values as currency using format API.
1748
1749```tsx
1750<SliderComponent
1751 id="currency-slider"
1752 type="Range"
1753 value={[1000, 5000]}
1754 min={0}
1755 max={10000}
1756 step={100}
1757 tooltip={{
1758 isVisible: true,
1759 format: 'C0' // Currency without decimals
1760 }}
1761 ticks={{
1762 placement: 'After',
1763 largeStep: 2000,
1764 format: 'C0'
1765 }}
1766/>
1767```
1768
1769#### Pattern 4: Vertical Orientation
1770Display slider vertically for space-constrained layouts.
1771
1772```tsx
1773<div style={{ height: '300px', width: '100px' }}>
1774 <SliderComponent
1775 id="vertical-slider"
1776 value={50}
1777 orientation="Vertical"
1778 tooltip={{ isVisible: true }}
1779 />
1780</div>
1781```
1782
1783#### Pattern 5: With Increment/Decrement Buttons
1784Add buttons to manually adjust slider values.
1785
1786```tsx
1787<SliderComponent
1788 id="button-slider"
1789 type="Range"
1790 value={[30, 70]}
1791 showButtons={true}
1792 tooltip={{ isVisible: true }}
1793/>
1794```
1795
1796#### Pattern 6: Color Range (Zones)
1797Paint distinct color sections on the slider track using `colorRange`.
1798
1799```tsx
1800import { ColorRangeDataModel } from '@syncfusion/ej2-react-inputs';
1801
1802const colorRange: ColorRangeDataModel[] = [
1803 { color: '#ff4040', start: 0, end: 33 }, // Low zone — red
1804 { color: '#ffb300', start: 34, end: 66 }, // Mid zone — amber
1805 { color: '#00c853', start: 67, end: 100 } // High zone — green
1806];
1807
1808<SliderComponent
1809 id="color-slider"
1810 type="MinRange"
1811 value={50}
1812 colorRange={colorRange}
1813 tooltip={{ isVisible: true, showOn: 'Always' }}
1814/>
1815```
1816
1817#### Pattern 7: Custom Value Scale
1818Use non-numeric labels as slider values with `customValues`.
1819
1820```tsx
1821<SliderComponent
1822 id="size-slider"
1823 customValues={['XS', 'S', 'M', 'L', 'XL', 'XXL']}
1824 value="M"
1825 tooltip={{ isVisible: true }}
1826/>
1827```
1828
1829#### Pattern 8: Read-Only Display
1830Show a locked slider for informational display.
1831
1832```tsx
1833<SliderComponent
1834 id="status-slider"
1835 type="MinRange"
1836 value={65}
1837 min={0}
1838 max={100}
1839 readonly={true}
1840 tooltip={{ isVisible: true, showOn: 'Always' }}
1841 ticks={{ placement: 'After', largeStep: 20 }}
1842/>
1843```
1844
1845### Key Properties
1846
1847| Property | Type | Default | Purpose |
1848|----------|------|---------|---------|
1849| `value` | `number \| number[]` | `null` | Single value or `[start, end]` array for Range type |
1850| `type` | `'Default' \| 'MinRange' \| 'Range'` | `'Default'` | Slider mode |
1851| `min` | `number` | `0` | Minimum selectable value |
1852| `max` | `number` | `100` | Maximum selectable value |
1853| `step` | `number` | `1` | Value increment/decrement per step |
1854| `orientation` | `'Horizontal' \| 'Vertical'` | `'Horizontal'` | Slider direction |
1855| `tooltip` | `TooltipDataModel` | `{ isVisible: false }` | Tooltip configuration |
1856| `ticks` | `TicksDataModel` | `{ placement: 'before' }` | Tick marks configuration |
1857| `limits` | `LimitDataModel` | `{ enabled: false }` | Thumb movement restrictions |
1858| `colorRange` | `ColorRangeDataModel[]` | `[]` | Color zones on the track |
1859| `customValues` | `string[] \| number[]` | `null` | Custom value scale (ignores min/max/step) |
1860| `showButtons` | `boolean` | `false` | Show +/- increment/decrement buttons |
1861| `enabled` | `boolean` | `true` | Enable or disable the slider |
1862| `readonly` | `boolean` | `false` | Read-only display mode |
1863| `enableRtl` | `boolean` | `false` | Right-to-left layout |
1864| `width` | `number \| string` | `null` | Slider element width |
1865| `cssClass` | `string` | `''` | Custom CSS classes on root element |
1866
1867### Type Comparison
1868
1869| Type | Handles | Fill Behavior | Use Case |
1870|------|---------|---------------|----------|
1871| **Default** | 1 | No fill | Simple numeric selection |
1872| **MinRange** | 1 | Fill from min | Visual progress/level indicator |
1873| **Range** | 2 | Fill between handles | Min/max range selection |
1874
1875### Common Use Cases
1876
1877#### Budget Range Selector
1878Select min and max budget with step increments and currency formatting.
1879→ Use `type="Range"`, `step={50}`, format `'C0'`, tooltip enabled
1880
1881#### Time Range Picker
1882Select time window (hours, minutes, days).
1883→ Use `type="Range"`, custom formatting via `renderingTicks` event
1884
1885#### Volume/Brightness Control
1886Single handle adjustment with immediate feedback.
1887→ Use `type="Default"`, no ticks, always-visible tooltip
1888
1889#### Score/Rating Range
1890MinRange mode with shadow showing current level.
1891→ Use `type="MinRange"`, `min={0}`, `max={10}`, step-based
1892
1893#### Product Filter
1894Multiple product categories with price ranges.
1895→ Use `type="Range"`, limits for each category, event handlers
1896
1897### Events
1898
1899| Event | Trigger | Usage |
1900|-------|---------|-------|
1901| `created` | Component created and rendered | One-time setup operations |
1902| `change` | Value changing while dragging | Real-time feedback (continuous) |
1903| `changed` | Drag complete (thumb released) | Capture final committed value |
1904| `tooltipChange` | Tooltip about to render | Custom tooltip text formatting |
1905| `renderingTicks` | Each tick being rendered | Custom tick label text |
1906| `renderedTicks` | All ticks rendered | Post-process tick DOM elements |
1907
1908> **⚠️ Note:** The official event for continuous updates while dragging is `change`, not `changing`. The event fired after drag completes is `changed`. Do NOT use `onChange` prop (that is a React native input prop). Use `change` and `changed` directly.
1909
1910### Troubleshooting Quick Links
1911
1912**Component not displaying?** → Check CSS imports and theme in [getting-started.md](references/range-slider-getting-started.md)
1913
1914**Values not updating?** → Use `change` (continuous) or `changed` (on release) events — NOT `onChange`
1915
1916**Formatting not working?** → See format API examples in [formatting-and-limits.md](references/range-slider-formatting-and-limits.md)
1917
1918**Accessibility issues?** → Refer to [accessibility.md](references/range-slider-accessibility.md) for ARIA and keyboard support
1919
1920**Vertical slider not rendering?** → Wrap in a container with explicit `height` (e.g., `style={{ height: '300px' }}`)
1921
1922**Range type with single value?** → Always pass `value={[start, end]}` array for `type="Range"`
1923
1924**Color zones not showing?** → Check `colorRange` array has valid `start`/`end`/`color` properties
1925
1926### Next Steps
1927
19281. Choose your slider type based on use case (`Default`, `MinRange`, or `Range`)
19292. Read [getting-started.md](references/range-slider-getting-started.md) for installation
19303. Navigate to specific reference for your feature needs
19314. Test with examples from reference files
19325. Customize styling using [styling.md](references/range-slider-styling.md)
19336. Ensure accessibility following [accessibility.md](references/range-slider-accessibility.md)
19347. Verify all API usage against [api-reference.md](references/range-slider-api-reference.md)
1935
1936> **⚠️ Critical:** Only use APIs explicitly listed in [references/api-reference.md](references/range-slider-api-reference.md). Do **not** reference `onChange` (use `change`/`changed`), `toggle()`, `open()`, `close()`, or any undocumented methods.
1937
1938## ColorPicker
1939
1940The Syncfusion React ColorPicker lets users pick colors via a visual picker (HSV + opacity) or a palette of swatches. It renders as a SplitButton by default (opens a popup) or inline, and supports RGB, HSV, and Hex color formats.
1941
1942**Package:** `@syncfusion/ej2-react-inputs`
1943**Component:** `<ColorPickerComponent>`
1944
1945### Navigation Guide
1946
1947#### Getting Started
1948📄 **Read:** [references/getting-started.md](references/colorpicker-getting-started.md)
1949- Installation with Vite or Create React App
1950- npm package setup
1951- CSS theme imports
1952- Minimal working example
1953- Running the application
1954
1955#### Modes and Color Value
1956📄 **Read:** [references/modes-and-value.md](references/colorpicker-modes-and-value.md)
1957- Inline rendering vs popup (SplitButton)
1958- Picker mode vs Palette mode
1959- Setting initial color value (hex codes)
1960- Opacity support
1961- Rendering palette alone (locking mode)
1962
1963#### Palette Features
1964📄 **Read:** [references/palette-features.md](references/colorpicker-palette-features.md)
1965- Custom color palettes (`presetColors`)
1966- Custom palette tile rendering (`beforeTileRender`)
1967- No-color / clear color support (`noColor`)
1968- Custom no-color option
1969- Recent colors display (`showRecentColors`)
1970- Palette column count (`columns`)
1971
1972#### UI Customization
1973📄 **Read:** [references/ui-customization.md](references/colorpicker-ui-customization.md)
1974- Hide the input value area
1975- Custom picker handle
1976- Custom primary button with icon
1977- Display hex code in input element
1978- Hide control buttons (Apply/Cancel)
1979- CSS class overrides and Theme Studio
1980- Excel-like custom UI with SplitButton and Dialog
1981
1982#### Integration and Advanced
1983📄 **Read:** [references/integration-and-advanced.md](references/colorpicker-integration-and-advanced.md)
1984- Embedding ColorPicker in a DropDownButton
1985- Popup toggle control
1986- State persistence across page reloads
1987- Mode switcher visibility and events
1988- Disabled state
1989
1990#### Localization and RTL
1991📄 **Read:** [references/localization-and-rtl.md](references/colorpicker-localization-and-rtl.md)
1992- Localizing Apply / Cancel / ModeSwitcher labels
1993- Loading translation objects with `L10n`
1994- Right-to-left rendering (`enableRtl`)
1995
1996#### Accessibility
1997📄 **Read:** [references/accessibility.md](references/colorpicker-accessibility.md)
1998- WCAG 2.2 / Section 508 compliance
1999- WAI-ARIA attributes
2000- Keyboard navigation shortcuts
2001- Accessibility validation
2002
2003#### API Reference
2004📄 **Read:** [references/api.md](references/colorpicker-api.md)
2005- All properties with types and defaults
2006- All methods with signatures
2007- All events with payload types
2008
2009---
2010
2011### Quick Start
2012
2013```bash
2014npm install @syncfusion/ej2-react-inputs --save
2015```
2016
2017```css
2018/* src/App.css */
2019@import "../node_modules/@syncfusion/ej2-base/styles/tailwind3.css";
2020@import "../node_modules/@syncfusion/ej2-buttons/styles/tailwind3.css";
2021@import "../node_modules/@syncfusion/ej2-react-inputs/styles/tailwind3.css";
2022@import "../node_modules/@syncfusion/ej2-popups/styles/tailwind3.css";
2023@import "../node_modules/@syncfusion/ej2-splitbuttons/styles/tailwind3.css";
2024```
2025
2026```tsx
2027import { ColorPickerComponent } from '@syncfusion/ej2-react-inputs';
2028import * as React from 'react';
2029import './App.css';
2030
2031function App() {
2032 return (
2033 <div id="container">
2034 <div className="wrap">
2035 <h4>Choose Color</h4>
2036 <ColorPickerComponent id="color-picker" />
2037 </div>
2038 </div>
2039 );
2040}
2041export default App;
2042```
2043
2044---
2045
2046### Common Patterns
2047
2048#### Inline picker (no popup)
2049```tsx
2050<ColorPickerComponent inline={true} showButtons={false} />
2051```
2052
2053#### Palette-only mode
2054```tsx
2055<ColorPickerComponent mode="Palette" modeSwitcher={false} showButtons={false} />
2056```
2057
2058#### Set initial color + handle changes
2059```tsx
2060import { ColorPickerEventArgs } from '@syncfusion/ej2-react-inputs';
2061
2062function App() {
2063 function onChange(args: ColorPickerEventArgs): void {
2064 console.log(args.currentValue.hex); // e.g. "#ff5733"
2065 console.log(args.currentValue.rgba); // e.g. "rgba(255,87,51,1)"
2066 }
2067 return <ColorPickerComponent value="#ff5733" change={onChange} />;
2068}
2069```
2070
2071#### Custom palette with preset colors
2072```tsx
2073const presets: { [key: string]: string[] } = {
2074 'brand': ['#0078d4', '#106ebe', '#005a9e', '#004578'],
2075 'accents': ['#e81123', '#ff8c00', '#00b294', '#68217a']
2076};
2077
2078<ColorPickerComponent
2079 mode="Palette"
2080 presetColors={presets}
2081 columns={4}
2082 modeSwitcher={false}
2083 inline={true}
2084 showButtons={false}
2085/>
2086```
2087
2088#### Disable opacity slider
2089```tsx
2090<ColorPickerComponent enableOpacity={false} />
2091```
2092
2093#### No-color support (clear selection)
2094```tsx
2095<ColorPickerComponent
2096 mode="Palette"
2097 noColor={true}
2098 modeSwitcher={false}
2099 showButtons={false}
2100/>
2101```
2102
2103#### Localization (German)
2104```tsx
2105import { L10n } from '@syncfusion/ej2-base';
2106
2107L10n.load({
2108 'de-DE': {
2109 'colorpicker': { Apply: 'Anwenden', Cancel: 'Abbrechen', ModeSwitcher: 'Modus wechseln' }
2110 }
2111});
2112
2113<ColorPickerComponent locale="de-DE" />
2114```
2115
2116---
2117
2118### Key Props
2119
2120| Prop | Type | Default | Purpose |
2121|------|------|---------|---------|
2122| `value` | `string` | `'#008000ff'` | Initial color (3/4/6/8 digit hex) |
2123| `mode` | `'Picker' \| 'Palette'` | `'Picker'` | Which panel to show initially |
2124| `inline` | `boolean` | `false` | Render component directly (no popup) |
2125| `showButtons` | `boolean` | `true` | Show Apply/Cancel buttons |
2126| `modeSwitcher` | `boolean` | `true` | Show mode switcher button |
2127| `noColor` | `boolean` | `false` | Add a "no color" tile to palette |
2128| `presetColors` | `object` | `null` | Custom color groups for palette |
2129| `columns` | `number` | `10` | Palette columns count |
2130| `enableOpacity` | `boolean` | `true` | Show opacity slider |
2131| `showRecentColors` | `boolean` | `false` | Show recent color tiles (palette only) |
2132| `disabled` | `boolean` | `false` | Disable the component |
2133| `cssClass` | `string` | `''` | Custom CSS class on root element |
2134| `enableRtl` | `boolean` | `false` | Right-to-left rendering |
2135| `locale` | `string` | `''` | Locale string for localization |
2136
2137## MaskedTextBox
2138
2139The Syncfusion React MaskedTextBox component enforces a specific input format by applying a mask pattern, guiding users to enter data in the correct structure. It is ideal for phone numbers, postal codes, dates, IP addresses, product keys, and any scenario where input must follow a predefined format.
2140
2141### Navigation Guide
2142
2143#### Getting Started
2144📄 **Read:** [references/getting-started.md](references/maskedtextbox-getting-started.md)
2145- Installation via npm (`@syncfusion/ej2-react-inputs`)
2146- Vite / Create-React-App setup
2147- CSS imports for theming
2148- Rendering a basic MaskedTextBox
2149- Setting the `mask` property for format enforcement
2150
2151#### Mask Configuration
2152📄 **Read:** [references/mask-configuration.md](references/maskedtextbox-mask-configuration.md)
2153- Standard mask element tokens (0, 9, #, L, ?, &, C, A, a, <, >, |, \)
2154- Custom characters via `customCharacters` property
2155- Regular expression masks for flexible patterns (e.g., IP addresses)
2156- Prompt character customization via `promptChar`
2157
2158#### Adornments (Prepend / Append Elements)
2159📄 **Read:** [references/adornments.md](references/maskedtextbox-adornments.md)
2160- Adding icons or buttons before/after the input with `prependTemplate` and `appendTemplate`
2161- Entry guidance, quick actions, and context labels
2162- Class and functional component examples
2163
2164#### React Hooks Integration
2165📄 **Read:** [references/react-hooks.md](references/maskedtextbox-react-hooks.md)
2166- Controlled component with `useState`
2167- Auto-focus on mount using `useEffect` + `useRef` + `focusIn()`
2168- Multiple masked inputs with `useReducer`
2169- Handling the `change` event in functional components
2170
2171#### Style, Appearance & Customization
2172📄 **Read:** [references/style-and-customization.md](references/maskedtextbox-style-and-customization.md)
2173- Custom styling with `cssClass`
2174- CSS overrides for wrapper, hover, and focus states
2175- Setting cursor position on focus using the `focus` event (`selectionStart`, `selectionEnd`)
2176- Displaying numeric keypad on mobile with `type="tel"`
2177- `floatLabelType` options (Never, Always, Auto)
2178
2179#### Form Validation
2180📄 **Read:** [references/form-validation.md](references/maskedtextbox-form-validation.md)
2181- Integrating with Syncfusion `FormValidator`
2182- Defining custom validation rules using `ej2_instances`
2183- Custom error placement with `customPlacement`
2184- Checking for incomplete masked values using `promptChar`
2185
2186#### API Reference
2187📄 **Read:** [references/api.md](references/maskedtextbox-api.md)
2188- All properties: `mask`, `value`, `placeholder`, `floatLabelType`, `promptChar`, `customCharacters`, `cssClass`, `enabled`, `readonly`, `showClearButton`, `enableRtl`, `enablePersistence`, `htmlAttributes`, `locale`, `width`, `prependTemplate`, `appendTemplate`
2189- Methods: `focusIn()`, `focusOut()`, `getMaskedValue()`, `destroy()`, `getPersistData()`
2190- Events: `change`, `focus`, `blur`, `created`, `destroyed`
2191
2192### Quick Start
2193
2194```tsx
2195import * as React from 'react';
2196import { MaskedTextBoxComponent } from '@syncfusion/ej2-react-inputs';
2197import '../node_modules/@syncfusion/ej2-base/styles/tailwind3.css';
2198import '../node_modules/@syncfusion/ej2-react-inputs/styles/tailwind3.css';
2199
2200export default function App() {
2201 return (
2202 <MaskedTextBoxComponent
2203 mask="000-000-0000"
2204 placeholder="Enter phone number"
2205 floatLabelType="Auto"
2206 />
2207 );
2208}
2209```
2210
2211### Common Patterns
2212
2213#### Phone Number Input
2214```tsx
2215<MaskedTextBoxComponent mask="000-000-0000" placeholder="Phone" floatLabelType="Always" />
2216```
2217
2218#### IP Address with Regex Mask
2219```tsx
2220<MaskedTextBoxComponent
2221 mask="[0-2][0-9][0-9].[0-2][0-9][0-9].[0-2][0-9][0-9].[0-2][0-9][0-9]"
2222 placeholder="IP Address (ex: 212.212.111.222)"
2223 floatLabelType="Always"
2224/>
2225```
2226
2227#### Custom AM/PM Time Input
2228```tsx
2229const chars = { P: 'P,A,p,a', M: 'M,m' };
2230<MaskedTextBoxComponent
2231 mask="00:00 >PM"
2232 customCharacters={chars}
2233 placeholder="Time (ex: 10:00 PM)"
2234 floatLabelType="Always"
2235/>
2236```
2237
2238#### Read Masked Value Programmatically
2239```tsx
2240const maskRef = React.useRef(null);
2241// Later:
2242const maskedVal = maskRef.current.getMaskedValue(); // e.g., "123-456-7890"
2243const rawVal = maskRef.current.value; // e.g., "1234567890"
2244```
2245
2246#### Controlled Input with Change Event
2247```tsx
2248const [phone, setPhone] = React.useState('');
2249<MaskedTextBoxComponent
2250 mask="000-000-0000"
2251 value={phone}
2252 change={(e) => setPhone(e.value)}
2253 placeholder="Phone"
2254 floatLabelType="Auto"
2255/>
2256```
2257
2258## Rating
2259
2260The Syncfusion React `RatingComponent` lets users select a rating value from a set of visual symbols (stars by default). It supports **precision modes**, **custom templates**, **tooltips**, **labels**, **reset**, **read-only/disabled** states, full **accessibility** compliance, and rich CSS customization.
2261
2262**Package:** `@syncfusion/ej2-react-inputs`
2263
2264---
2265
2266### Navigation Guide
2267
2268#### Getting Started
2269📄 **Read:** [references/getting-started.md](references/rating-getting-started.md)
2270- Installing `@syncfusion/ej2-react-inputs`
2271- CSS theme imports for Tailwind3
2272- Minimal `RatingComponent` setup
2273- Setting the initial `value` property
2274- Running the Vite/React app
2275
2276#### Selection and Reset
2277📄 **Read:** [references/selection.md](references/rating-selection.md)
2278- Setting a rating value with `value`
2279- Minimum rating value with `min`
2280- Single-selection mode with `enableSingleSelection`
2281- Show/hide reset button with `allowReset`
2282- Programmatic `reset()` method
2283
2284#### Precision Modes
2285📄 **Read:** [references/precision-modes.md](references/rating-precision-modes.md)
2286- `PrecisionType.Full` — whole number increments
2287- `PrecisionType.Half` — 0.5 increments
2288- `PrecisionType.Quarter` — 0.25 increments
2289- `PrecisionType.Exact` — 0.1 increments
2290- Combining precision with initial value
2291
2292#### Appearance and Customization
2293📄 **Read:** [references/appearance.md](references/rating-appearance.md)
2294- Controlling item count with `itemsCount`
2295- Disabling the component with `disabled`
2296- Hiding/showing the component with `visible`
2297- Read-only mode with `readOnly`
2298- CSS customization with `cssClass` (border color, fill color, item spacing, icon)
2299- Changing rating icon via CSS
2300
2301#### Labels
2302📄 **Read:** [references/labels.md](references/rating-labels.md)
2303- Showing the current value label with `showLabel`
2304- `labelPosition` options: Top, Bottom, Left, Right
2305- Custom label content with `labelTemplate`
2306
2307#### Tooltip
2308📄 **Read:** [references/tooltip.md](references/rating-tooltip.md)
2309- Enabling tooltips with `showTooltip`
2310- Custom tooltip content with `tooltipTemplate`
2311- Tooltip appearance via `cssClass`
2312
2313#### Templates
2314📄 **Read:** [references/templates.md](references/rating-templates.md)
2315- `emptyTemplate` for unrated items
2316- `fullTemplate` for rated items
2317- Emoji rating symbols
2318- SVG icon rating symbols
2319- PNG image rating symbols
2320- Precision support in templates via `--rating-value`
2321
2322#### Events
2323📄 **Read:** [references/events.md](references/rating-events.md)
2324- `beforeItemRender` — customize items before render
2325- `created` — after component initialization
2326- `onItemHover` — track hovered items
2327- `valueChanged` — react to user rating changes
2328
2329#### Accessibility
2330📄 **Read:** [references/accessibility.md](references/rating-accessibility.md)
2331- WCAG 2.2 / Section 508 / ADA compliance
2332- WAI-ARIA attributes (`role=slider`, `aria-valuemin/max/now`)
2333- Keyboard navigation shortcuts
2334- RTL support with `enableRtl`
2335- Screen reader support
2336
2337#### API Reference
2338📄 **Read:** [references/api.md](references/rating-api.md)
2339- All properties, methods, and events with types and defaults
2340- `RatingItemEventArgs`, `RatingHoverEventArgs`, `RatingChangedEventArgs`
2341- `LabelPosition` and `PrecisionType` enums
2342
2343---
2344
2345### Quick Start
2346
2347```bash
2348npm install @syncfusion/ej2-react-inputs --save
2349```
2350
2351```css
2352/* src/App.css */
2353@import "../node_modules/@syncfusion/ej2-base/styles/tailwind3.css";
2354@import "../node_modules/@syncfusion/ej2-react-inputs/styles/tailwind3.css";
2355@import "../node_modules/@syncfusion/ej2-popups/styles/tailwind3.css";
2356```
2357
2358```tsx
2359import { RatingComponent } from '@syncfusion/ej2-react-inputs';
2360import * as React from 'react';
2361import './App.css';
2362
2363function App() {
2364 return (
2365 <RatingComponent id="rating" value={3} />
2366 );
2367}
2368export default App;
2369```
2370
2371---
2372
2373### Common Patterns
2374
2375#### Rating with value change handler
2376```tsx
2377import { RatingComponent, RatingChangedEventArgs } from '@syncfusion/ej2-react-inputs';
2378import * as React from 'react';
2379
2380function App() {
2381 const [rating, setRating] = React.useState(3);
2382
2383 const handleValueChanged = (args: RatingChangedEventArgs) => {
2384 setRating(args.value);
2385 };
2386
2387 return (
2388 <RatingComponent
2389 id="rating"
2390 value={rating}
2391 valueChanged={handleValueChanged}
2392 />
2393 );
2394}
2395export default App;
2396```
2397
2398#### Half-precision rating with label
2399```tsx
2400import { RatingComponent, PrecisionType } from '@syncfusion/ej2-react-inputs';
2401import * as React from 'react';
2402
2403function App() {
2404 return (
2405 <RatingComponent
2406 id="rating"
2407 value={3.5}
2408 precision={PrecisionType.Half}
2409 showLabel={true}
2410 />
2411 );
2412}
2413export default App;
2414```
2415
2416#### Read-only rating (display only)
2417```tsx
2418import { RatingComponent } from '@syncfusion/ej2-react-inputs';
2419import * as React from 'react';
2420
2421function App() {
2422 return (
2423 <RatingComponent id="rating" value={4} readOnly={true} showTooltip={false} />
2424 );
2425}
2426export default App;
2427```
2428
2429#### Rating with reset button
2430```tsx
2431import { RatingComponent } from '@syncfusion/ej2-react-inputs';
2432import * as React from 'react';
2433
2434function App() {
2435 return (
2436 <RatingComponent id="rating" value={3} allowReset={true} />
2437 );
2438}
2439export default App;
2440```
2441
2442---
2443
2444### Key Props at a Glance
2445
2446| Prop | Type | Default | Purpose |
2447|------|------|---------|---------|
2448| `value` | `number` | `0.0` | Current rating value |
2449| `itemsCount` | `number` | `5` | Number of rating items |
2450| `min` | `number` | `0.0` | Minimum selectable value |
2451| `precision` | `PrecisionType \| string` | `Full` | Rating granularity |
2452| `allowReset` | `boolean` | `false` | Show reset button |
2453| `readOnly` | `boolean` | `false` | Prevent user interaction |
2454| `disabled` | `boolean` | `false` | Disable the component |
2455| `visible` | `boolean` | `true` | Show/hide the component |
2456| `showLabel` | `boolean` | `false` | Show current value label |
2457| `labelPosition` | `LabelPosition \| string` | `Right` | Label placement |
2458| `showTooltip` | `boolean` | `true` | Show hover tooltips |
2459| `enableSingleSelection` | `boolean` | `false` | Only one item selected |
2460| `enableAnimation` | `boolean` | `true` | Hover animation |
2461| `enableRtl` | `boolean` | `false` | Right-to-left mode |
2462| `cssClass` | `string` | `''` | Custom CSS class |
2463
2464---
2465
2466# Implementing Syncfusion React Inputs
2467
2468## Uploader
2469
2470The Syncfusion React **UploaderComponent** provides a rich file upload control with async upload, drag-and-drop, chunk upload with pause/resume/cancel, validation, templates, form integration, and accessibility support.
2471
2472### Navigation Guide
2473
2474> 🛑 **Agentic use:** Do not execute multiple steps autonomously. Confirm with the user before each action (install, run, file creation).
2475
2476#### Getting Started
2477📄 **Read:** [references/getting-started.md](references/uploader-getting-started.md)
2478- Installing `@syncfusion/ej2-react-inputs` 🛑 *STOP — Do not install packages autonomously. Ask the user to run: `npm install @syncfusion/ej2-react-inputs`. Verify with `npm audit`*
2479- License registration
2480- Basic `UploaderComponent` usage in JSX/TSX
2481- CSS theme imports
2482- Drop area configuration
2483- Success and failure event handling
2484
2485#### Asynchronous Upload
2486📄 **Read:** [references/async-upload.md](references/uploader-async-upload.md)
2487- `asyncSettings` with `saveUrl` and `removeUrl`
2488- Multiple vs. single file upload (`multiple`)
2489- Auto upload vs. manual upload (`autoUpload`)
2490- Sequential upload (`sequentialUpload`)
2491- Preloaded files (`files` property)
2492- Adding custom HTTP headers via `uploading`/`removing` events
2493- Server-side save/remove action examples
2494
2495#### Chunk Upload
2496📄 **Read:** [references/chunk-upload.md](references/uploader-chunk-upload.md)
2497- Enabling chunk upload with `asyncSettings.chunkSize`
2498- Retry configuration (`retryCount`, `retryAfterDelay`)
2499- Pause and resume chunked uploads (`pause`, `resume` methods)
2500- Cancel uploads (`cancel` method)
2501- `chunkSuccess` and `chunkFailure` events
2502- Server-side chunk handling (C#)
2503
2504#### Validation
2505📄 **Read:** [references/validation.md](references/uploader-validation.md)
2506- Allowed file extensions (`allowedExtensions`)
2507- File size limits (`minFileSize`, `maxFileSize`)
2508- Maximum file count using `selected` event
2509- Duplicate file prevention
2510- Drag-and-drop image validation
2511
2512#### File Sources
2513📄 **Read:** [references/file-source.md](references/uploader-file-source.md)
2514- Clipboard paste upload
2515- Directory/folder upload (`directoryUpload`)
2516- Drag-and-drop with custom drop area (`dropArea`)
2517- Customizing drop area appearance
2518
2519#### Templates and Customization
2520📄 **Read:** [references/template-customization.md](references/uploader-template-customization.md)
2521- File list `template` property
2522- Custom upload UI with `showFileList: false`
2523- Customizing action buttons (`buttons` property)
2524- Progress bar customization
2525- Hiding the default drop area
2526- Style and appearance overrides
2527
2528#### Advanced How-To Scenarios
2529📄 **Read:** [references/advanced-how-to.md](references/uploader-advanced-how-to.md)
2530- Programmatic file upload (`upload` method, `getFilesData`)
2531- Invisible/background upload
2532- Image preview before uploading
2533- Resize images before upload
2534- Sort selected files
2535- Check file size / MIME type before upload
2536- Confirm dialog before file removal
2537- Open/edit uploaded files
2538- Trigger file browser from external button
2539- Convert uploaded image to binary
2540- JWT authentication for secure upload ⚠️ *Never hardcode tokens. Retrieve from a secure session store at runtime. Do not log request headers or token values.*
2541- Form support (HTML form, template-driven, reactive)
2542- Localization (custom locale strings)
2543- Accessibility and keyboard navigation
2544
2545#### API Reference
2546📄 **Read:** [references/api.md](references/uploader-api.md)
2547- All properties (`allowedExtensions`, `asyncSettings`, `autoUpload`, `buttons`, `cssClass`, `directoryUpload`, `dropArea`, `dropEffect`, `enabled`, `files`, `htmlAttributes`, `locale`, `maxFileSize`, `minFileSize`, `multiple`, `sequentialUpload`, `showFileList`, `template`, and more)
2548- All methods (`upload`, `remove`, `cancel`, `pause`, `resume`, `retry`, `clearAll`, `getFilesData`, `bytesToSize`, `createFileList`, `sortFileList`)
2549- All events (`uploading`, `success`, `failure`, `selected`, `removing`, `change`, `progress`, `chunkSuccess`, `chunkFailure`, `chunkUploading`, `actionComplete`, `beforeRemove`, `beforeUpload`, `canceling`, `clearing`, `fileListRendering`, `pausing`, `resuming`, `created`)
2550
2551### Quick Start Example
2552
2553```tsx
2554import { UploaderComponent } from '@syncfusion/ej2-react-inputs';
2555import '@syncfusion/ej2-base/styles/material.css';
2556import '@syncfusion/ej2-buttons/styles/material.css';
2557import '@syncfusion/ej2-inputs/styles/material.css';
2558import '@syncfusion/ej2-popups/styles/material.css';
2559import '@syncfusion/ej2-react-inputs/styles/material.css';
2560
2561function App() {
2562 // ⚠️ Replace with your own server-side endpoints.
2563 // Never use third-party demo URLs in production — files will be sent to that external server.
2564 const asyncSettings = {
2565 saveUrl: '/api/upload/save',
2566 removeUrl: '/api/upload/remove'
2567 };
2568
2569 const onSuccess = (args: any) => {
2570 console.log('Upload operation:', args.operation, 'File:', args.file.name);
2571 };
2572
2573 const onFailure = (args: any) => {
2574 console.error('Upload failed:', args.file.name);
2575 };
2576
2577 return (
2578 <UploaderComponent
2579 asyncSettings={asyncSettings}
2580 autoUpload={false}
2581 success={onSuccess}
2582 failure={onFailure}
2583 />
2584 );
2585}
2586```
2587
2588### Common Patterns
2589
2590#### Auto Upload with Validation
2591```tsx
2592<UploaderComponent
2593 asyncSettings={{ saveUrl: '/api/upload/save', removeUrl: '/api/upload/remove' }}
2594 allowedExtensions=".pdf,.doc,.docx"
2595 maxFileSize={5000000}
2596 multiple={true}
2597/>
2598```
2599
2600#### Manual Upload with Custom Buttons
2601```tsx
2602<UploaderComponent
2603 asyncSettings={{ saveUrl: '/api/upload/save', removeUrl: '/api/upload/remove' }}
2604 autoUpload={false}
2605 buttons={{ browse: 'Choose File', clear: 'Clear All', upload: 'Upload All' }}
2606/>
2607```
2608
2609#### Chunk Upload for Large Files
2610```tsx
2611<UploaderComponent
2612 asyncSettings={{
2613 saveUrl: '/api/upload/save',
2614 removeUrl: '/api/upload/remove',
2615 chunkSize: 500000 // 500 KB chunks
2616 }}
2617/>
2618```
2619
2620### Key Decision Guide
2621
2622| Need | Property/Event |
2623|---|---|
2624| Server URLs | `asyncSettings.saveUrl` + `asyncSettings.removeUrl` |
2625| Auto vs manual upload | `autoUpload` (default: `true`) |
2626| Large file upload | `asyncSettings.chunkSize` |
2627| Restrict file types | `allowedExtensions` |
2628| Limit file size | `maxFileSize` / `minFileSize` |
2629| Preload files from server | `files` prop |
2630| Upload one at a time | `sequentialUpload: true` |
2631| Entire folder upload | `directoryUpload: true` |
2632| Custom drop target | `dropArea` |
2633| Custom file list UI | `template` or `showFileList: false` |
2634| Add auth headers | `uploading` event → `args.currentRequest.setRequestHeader()` |
2635| Send extra form data | `uploading` event → `args.customFormData` |
2636
2637## NumericTextBox
2638
2639The Syncfusion React **NumericTextBoxComponent** is a specialized input control for numeric data entry with support for number formatting (currency, percentage, scientific notation), min/max range validation, spin buttons, decimal precision control, internationalization, RTL languages, and full WCAG 2.2 accessibility compliance.
2640
2641### Documentation & Navigation Guide
2642
2643> 🛑 **Agentic use:** Do not execute multiple steps autonomously. Confirm with the user before each action (install, run, file creation).
2644
2645When the user needs help with NumericTextBox, guide them to the appropriate reference:
2646
2647#### Getting Started
2648📄 **Read:** [references/getting-started.md](references/numerictextbox-getting-started.md)
2649- Installation and package setup
2650- CSS imports and themes
2651- React component import and basic JSX
2652- Creating your first NumericTextBox
2653- Running the application
2654
2655#### Formats & Validation
2656📄 **Read:** [references/formats-and-validation.md](references/numerictextbox-formats-and-validation.md)
2657- Standard format specifiers (currency, percentage, number, scientific)
2658- Custom number formats with # and 0 patterns
2659- Range validation with min and max properties
2660- strictMode for enforcing valid ranges
2661- Real-world formatting examples
2662
2663#### Spin Buttons & Step Control
2664📄 **Read:** [references/spin-buttons-and-step.md](references/numerictextbox-spin-buttons-and-step.md)
2665- Enabling/disabling spin button arrows
2666- Step property for increment values
2667- Customizing spin button appearance and behavior
2668- Precision with step increments
2669- Keyboard shortcuts (Arrow Up/Down)
2670
2671#### Adornments & Styling
2672📄 **Read:** [references/adornments-and-styling.md](references/numerictextbox-adornments-and-styling.md)
2673- Prefix and suffix text (units, currency symbols)
2674- CSS classes and custom styling
2675- Placeholder, disabled, and readonly states
2676- Focus and blur event handling
2677- Theme customization and appearance options
2678
2679#### Precision & Decimals
2680📄 **Read:** [references/precision-decimals.md](references/numerictextbox-precision-decimals.md)
2681- decimals property for controlling decimal places
2682- validateDecimalOnType for real-time precision validation
2683- Maintaining trailing zeros in display
2684- Rounding behavior and edge cases
2685- Precision during input vs display
2686
2687#### Two-Way Binding & Forms
2688📄 **Read:** [references/two-way-binding-forms.md](references/numerictextbox-two-way-binding-forms.md)
2689- Two-way value binding in React (value prop + onChange)
2690- Controlled component patterns
2691- React state management
2692- React Hook Form integration
2693- Form validation with NumericTextBox
2694
2695#### Globalization & Accessibility
2696📄 **Read:** [references/globalization-accessibility.md](references/numerictextbox-globalization-accessibility.md)
2697- Internationalization and locale support
2698- Right-to-Left (RTL) language support
2699- WCAG 2.2 accessibility compliance
2700- Keyboard navigation and shortcuts
2701- Screen reader support with ARIA attributes
2702- Focus management and color contrast
2703
2704#### API Reference
2705📄 **Read:** [references/api.md](references/numerictextbox-api.md)
2706- Complete properties reference (value, min, max, step, format, decimals, etc.)
2707- Methods reference (increment, decrement, getText, focusIn, focusOut, destroy, etc.)
2708- Events reference with full argument types (change, blur, focus, created, destroyed)
2709
2710### Quick Start Example
2711
2712Here's a minimal working example to get started:
2713
2714```jsx
2715import React, { useState } from 'react';
2716import { NumericTextBoxComponent } from '@syncfusion/ej2-react-inputs';
2717import '@syncfusion/ej2-base/styles/material3.css';
2718import '@syncfusion/ej2-buttons/styles/material3.css';
2719import '@syncfusion/ej2-inputs/styles/material3.css';
2720
2721export default function App() {
2722 const [value, setValue] = useState(10);
2723
2724 return (
2725 <div style={{ padding: '20px' }}>
2726 <h3>Enter a Number</h3>
2727 <NumericTextBoxComponent
2728 value={value}
2729 onChange={(e) => setValue(e.value)}
2730 min={0}
2731 max={100}
2732 step={1}
2733 />
2734 <p>Current Value: {value}</p>
2735 </div>
2736 );
2737}
2738```
2739
2740**Key points:**
2741- Import `NumericTextBoxComponent` from `@syncfusion/ej2-react-inputs`
2742- Import required CSS themes (material3 in this example)
2743- Use `value` prop for the current numeric value
2744- Use `onChange` event to update React state
2745- Add `min`, `max`, `step` for validation and controls
2746
2747### Common Patterns
2748
2749#### 1. Currency Input
2750```jsx
2751<NumericTextBoxComponent
2752 value={99.99}
2753 format="c2"
2754 min={0}
2755 placeholder="Enter amount"
2756/>
2757```
2758
2759#### 2. Percentage Input
2760```jsx
2761<NumericTextBoxComponent
2762 value={50}
2763 format="p"
2764 min={0}
2765 max={100}
2766/>
2767```
2768
2769#### 3. Integer-Only Input
2770```jsx
2771<NumericTextBoxComponent
2772 value={10}
2773 decimals={0}
2774 step={1}
2775 min={0}
2776/>
2777```
2778
2779#### 4. Bounded Range with Validation
2780```jsx
2781<NumericTextBoxComponent
2782 value={25}
2783 min={0}
2784 max={100}
2785 strictMode={true}
2786 placeholder="0-100"
2787/>
2788```
2789
2790#### 5. Form Field with Label
2791```jsx
2792<div>
2793 <label>Product Quantity:</label>
2794 <NumericTextBoxComponent
2795 value={qty}
2796 onChange={(e) => setQty(e.value)}
2797 min={1}
2798 step={1}
2799 prefix="Units: "
2800 />
2801</div>
2802```
2803
2804### Key Properties Reference
2805
2806| Property | Type | Purpose |
2807|----------|------|---------|
2808| `value` | number | Current numeric value |
2809| `min` | number | Minimum allowed value |
2810| `max` | number | Maximum allowed value |
2811| `step` | number | Increment/decrement step (default: 1) |
2812| `decimals` | number | Number of decimal places when focused |
2813| `format` | string | Number format (n2, c2, p2, e2, etc.) |
2814| `currency` | string | ISO 4217 currency code (e.g., 'USD', 'EUR') |
2815| `placeholder` | string | Placeholder text when empty |
2816| `floatLabelType` | FloatLabelType | Float label behavior ('Never', 'Always', 'Auto') |
2817| `readonly` | boolean | Prevent user input |
2818| `enabled` | boolean | Enable or disable the control (default: true) |
2819| `strictMode` | boolean | Enforce min/max validation (default: true) |
2820| `validateDecimalOnType` | boolean | Restrict decimal length during typing |
2821| `showSpinButton` | boolean | Show/hide spinner arrows (default: true) |
2822| `showClearButton` | boolean | Show/hide clear icon |
2823| `allowMouseWheel` | boolean | Enable mouse wheel increment/decrement (default: true) |
2824| `cssClass` | string | Additional CSS classes for custom styling |
2825| `width` | number \| string | Width of the component |
2826
2827### Common Use Cases
2828
2829**1. Shopping Cart - Quantity Input**
2830- Integer-only, min=1, step=1, spinner for easy adjustment
2831
2832**2. Price Calculator - Currency Field**
2833- format="c2", min=0, prefix="$", two decimal places
2834
2835**3. Rating or Score - 0-100 Range**
2836- min=0, max=100, strictMode=true, no decimals
2837
2838**4. Discount Percentage**
2839- format="p", min=0, max=100, two decimal places
2840
2841**5. Measurement Input**
2842- decimals=2, suffix=" cm", min=0, spinner for precision
2843
2844**6. Financial Form**
2845- format="c2", validation, form integration, accessibility
2846
2847### Next Steps
2848
28491. **Package requirement:** The packages `@syncfusion/ej2-react-inputs`, `@syncfusion/ej2-base`, and `@syncfusion/ej2-buttons` must be present in your project's `package.json`. Confirm they are already installed and that your lockfile (e.g., `package-lock.json` or `yarn.lock`) pins their versions for supply-chain integrity. When adding them, use an explicit version range such as `@syncfusion/ej2-react-inputs@^27.x.x` to avoid unpinned dependency risks.
28502. **Getting Started reference:** For installation details and basic setup, see [references/getting-started.md](references/numerictextbox-getting-started.md).
28513. **Choose your reference:** Based on your use case (formatting, validation, forms, etc.), navigate to the relevant reference section above.
28524. **Review examples:** Each reference contains ready-to-use code samples that can be adapted to your requirements.
28535. **Customize:** Modify the examples to fit your specific use case and application needs.
2854
2855---
2856
2857For detailed implementation guidance, navigate to the appropriate reference file above.
2858
2859## TextBox
2860
2861The 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.
2862
2863### Navigation Guide
2864
2865> 🛑 **Agentic use:** Do not execute multiple steps autonomously. Confirm with the user before each action (install, run, file creation).
2866
2867#### Getting Started
2868📄 **Read:** [references/getting-started.md](references/textbox-getting-started.md)
2869- Vite setup for React development
2870- 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`*
2871- Adding CSS imports and themes
2872- Creating your first TextBox component
2873- Adding icons and floating labels
2874- Running the development server 🛑 *STOP — Do not start the dev server autonomously. Ask the user to run: `npm run dev`*
2875
2876#### Features and Groups
2877📄 **Read:** [references/features-and-groups.md](references/textbox-features-and-groups.md)
2878- Floating label behavior (Never, Always, Auto)
2879- Icons with `addIcon()` method (prepend/append)
2880- Clear button with `showClearButton` property
2881- Rounded corner with `e-corner` CSS class
2882- Disabled state with `enabled={false}`
2883- Multi-line textbox creation
2884- TextBox with clear button and floating label combinations
2885
2886#### Styling and Sizing
2887📄 **Read:** [references/styling-and-sizing.md](references/textbox-styling-and-sizing.md)
2888- Three predefined sizes: Normal, Small (`e-small`), Large (`e-bigger`)
2889- Applying size classes via `cssClass` property
2890- Rounded corner with `e-corner` CSS class
2891- CSS customization for TextBox wrapper and floating label
2892- Custom CSS classes and themes
2893- Responsive design patterns
2894
2895#### Multiline TextBox
2896📄 **Read:** [references/multiline-textbox.md](references/textbox-multiline-textbox.md)
2897- Creating multiline/textarea inputs with `multiline={true}`
2898- Floating labels with multiline
2899- Auto-resizing textboxes
2900- Disabling resize functionality
2901- Limiting text length with `htmlAttributes={{ maxlength: '...' }}`
2902- Character counting and display
2903
2904#### Validation and States
2905📄 **Read:** [references/validation-and-states.md](references/textbox-validation-and-states.md)
2906- Error, warning, and success validation states via `cssClass`
2907- Applying validation classes (`e-error`, `e-warning`, `e-success`)
2908- Disabled state with `enabled={false}` (not `disabled`)
2909- Read-only state with `readonly={true}`
2910- Differences between disabled and read-only
2911- Dynamic color changes based on values using `input` event
2912
2913#### Advanced Features
2914📄 **Read:** [references/advanced-features.md](references/textbox-advanced-features.md)
2915- Adornments: `prependTemplate` and `appendTemplate` properties
2916- Interactive adornments (password toggle, delete button)
2917- React functional components with hooks
2918- `useState`, `useEffect`, `useRef`, `useReducer` integration
2919- Event handling (created, input, change events)
2920- Form validation patterns
2921
2922#### Accessibility and Migration
2923📄 **Read:** [references/accessibility-and-migration.md](references/textbox-accessibility-and-migration.md)
2924- WCAG 2.2, Section 508, and WAI-ARIA compliance
2925- Screen reader support and ARIA attributes
2926- Right-to-Left (RTL) support with `enableRtl` property
2927- Keyboard navigation support
2928- Migrating from CSS TextBox to React component
2929- Before/after code comparison
2930
2931#### API Reference
2932📄 **Read:** [references/api.md](references/textbox-api.md)
2933- All properties: `placeholder`, `floatLabelType`, `value`, `type`, `cssClass`, `multiline`, `showClearButton`, `enabled`, `readonly`, `enableRtl`, `enablePersistence`, `autocomplete`, `htmlAttributes`, `locale`, `width`, `prependTemplate`, `appendTemplate`
2934- Methods: `addIcon`, `addAttributes`, `removeAttributes`, `focusIn`, `focusOut`, `destroy`, `getPersistData`
2935- Events: `created`, `destroyed`, `change`, `input`, `focus`, `blur`
2936
2937### Quick Start
2938
2939#### Basic TextBox with Floating Label
2940
2941```tsx
2942import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';
2943import './App.css';
2944
2945export default function App() {
2946 return (
2947 <TextBoxComponent
2948 placeholder="Enter your name"
2949 floatLabelType="Auto"
2950 />
2951 );
2952}
2953```
2954
2955#### TextBox with Icon
2956
2957```tsx
2958import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';
2959import { useRef } from 'react';
2960
2961export default function App() {
2962 const textboxRef = useRef(null);
2963
2964 const handleCreate = () => {
2965 if (textboxRef.current) {
2966 textboxRef.current.addIcon('append', 'e-icons e-input-popup-date');
2967 }
2968 };
2969
2970 return (
2971 <TextBoxComponent
2972 placeholder="Enter date"
2973 floatLabelType="Auto"
2974 ref={textboxRef}
2975 created={handleCreate}
2976 />
2977 );
2978}
2979```
2980
2981#### TextBox with Clear Button
2982
2983```tsx
2984import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';
2985
2986export default function App() {
2987 return (
2988 <TextBoxComponent
2989 placeholder="Enter your email"
2990 floatLabelType="Auto"
2991 showClearButton={true}
2992 />
2993 );
2994}
2995```
2996
2997#### Multiline TextBox
2998
2999```tsx
3000import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';
3001
3002export default function App() {
3003 return (
3004 <TextBoxComponent
3005 multiline={true}
3006 placeholder="Enter your address"
3007 floatLabelType="Auto"
3008 />
3009 );
3010}
3011```
3012
3013### Common Patterns
3014
3015#### Form with Validation States
3016
3017```tsx
3018import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';
3019import { useState } from 'react';
3020
3021export default function ValidationForm() {
3022 const [cssClass, setCssClass] = useState('');
3023
3024 return (
3025 <div>
3026 <TextBoxComponent
3027 placeholder="Enter username"
3028 cssClass={cssClass}
3029 floatLabelType="Auto"
3030 input={(e: any) => {
3031 if (!e.value) setCssClass('');
3032 else if (e.value.length < 3) setCssClass('e-error');
3033 else if (e.value.length < 6) setCssClass('e-warning');
3034 else setCssClass('e-success');
3035 }}
3036 />
3037 </div>
3038 );
3039}
3040```
3041
3042#### Password TextBox with Toggle
3043
3044```tsx
3045import * as React from 'react';
3046import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';
3047import { useRef, useState } from 'react';
3048
3049export default function PasswordInput() {
3050 const textboxRef = useRef<TextBoxComponent>(null);
3051 const [isVisible, setIsVisible] = useState(false);
3052
3053 const toggleVisibility = () => {
3054 if (textboxRef.current) {
3055 const newVisibility = !isVisible;
3056 textboxRef.current.type = newVisibility ? 'text' : 'password';
3057 setIsVisible(newVisibility);
3058 }
3059 };
3060
3061 function appendTemplate(): JSX.Element {
3062 return (
3063 <>
3064 <span className="e-input-separator"></span>
3065 <span
3066 className={`e-icons ${isVisible ? 'e-eye-slash' : 'e-eye'}`}
3067 onClick={toggleVisibility}
3068 style={{ cursor: 'pointer' }}
3069 ></span>
3070 </>
3071 );
3072 }
3073
3074 return (
3075 <TextBoxComponent
3076 ref={textboxRef}
3077 type="password"
3078 placeholder="Enter password"
3079 floatLabelType="Auto"
3080 appendTemplate={appendTemplate}
3081 />
3082 );
3083}
3084```
3085
3086#### Email Input with Unit Label
3087
3088```tsx
3089import * as React from 'react';
3090import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';
3091
3092export default function EmailInput() {
3093 function prependTemplate(): JSX.Element {
3094 return (
3095 <>
3096 <span className="e-icons e-user"></span>
3097 <span className="e-input-separator"></span>
3098 </>
3099 );
3100 }
3101
3102 function appendTemplate(): JSX.Element {
3103 return (
3104 <>
3105 <span className="e-input-separator"></span>
3106 <span>.com</span>
3107 </>
3108 );
3109 }
3110
3111 return (
3112 <TextBoxComponent
3113 type="email"
3114 placeholder="Enter email"
3115 floatLabelType="Auto"
3116 prependTemplate={prependTemplate}
3117 appendTemplate={appendTemplate}
3118 />
3119 );
3120}
3121```
3122
3123#### Rounded Corner TextBox
3124
3125```tsx
3126import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';
3127
3128export default function RoundedCornerTextBox() {
3129 return (
3130 <TextBoxComponent
3131 placeholder="Enter Date"
3132 cssClass="e-corner"
3133 />
3134 );
3135}
3136```
3137
3138#### Disabled TextBox
3139
3140```tsx
3141import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';
3142
3143export default function DisabledTextBox() {
3144 return (
3145 <TextBoxComponent
3146 placeholder="Enter Name"
3147 enabled={false}
3148 />
3149 );
3150}
3151```
3152
3153#### RTL TextBox
3154
3155```tsx
3156import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';
3157
3158export default function RTLTextBox() {
3159 return (
3160 <TextBoxComponent
3161 placeholder="أدخل اسمك"
3162 floatLabelType="Auto"
3163 enableRtl={true}
3164 />
3165 );
3166}
3167```
3168
3169#### Auto-sizing Multiline TextBox
3170
3171```tsx
3172import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';
3173import { useRef } from 'react';
3174
3175export default function AutoSizeTextbox() {
3176 const textboxRef = useRef(null);
3177
3178 const handleInput = () => {
3179 if (textboxRef.current) {
3180 const elem = textboxRef.current.respectiveElement;
3181 elem.style.height = 'auto';
3182 elem.style.height = elem.scrollHeight + 'px';
3183 }
3184 };
3185
3186 const handleCreate = () => {
3187 if (textboxRef.current) {
3188 textboxRef.current.addAttributes({ rows: 1 });
3189 }
3190 handleInput();
3191 };
3192
3193 return (
3194 <TextBoxComponent
3195 multiline={true}
3196 placeholder="Enter your message"
3197 floatLabelType="Auto"
3198 ref={textboxRef}
3199 created={handleCreate}
3200 input={handleInput}
3201 />
3202 );
3203}
3204```
3205
3206### Key Properties
3207
3208| Property | Type | Purpose |
3209|----------|------|---------|
3210| `placeholder` | `string` | Hint text shown when input is empty |
3211| `floatLabelType` | `"Never" \| "Always" \| "Auto"` | Label animation behavior |
3212| `value` | `string` | Sets the content of the TextBox |
3213| `type` | `string` | Input type (`text`, `password`, `email`, `number`, etc.) |
3214| `multiline` | `boolean` | Convert to textarea for multi-line input |
3215| `showClearButton` | `boolean` | Display clear button when input has value |
3216| `cssClass` | `string` | Apply CSS classes for sizing/validation/appearance (e.g., `"e-error"`, `"e-small"`, `"e-corner"`) |
3217| `enabled` | `boolean` | Enable (`true`) or disable (`false`) input interaction |
3218| `readonly` | `boolean` | Allow selection but prevent editing |
3219| `enableRtl` | `boolean` | Enable right-to-left rendering |
3220| `enablePersistence` | `boolean` | Persist value state between page reloads ⚠️ *Stores data in browser storage — enable only with explicit user consent* |
3221| `autocomplete` | `string` | Control browser autocomplete (`"on"` \| `"off"`) |
3222| `htmlAttributes` | `{ [key: string]: string }` | Pass additional HTML attributes (e.g., `{ maxlength: '200' }`) |
3223| `locale` | `string` | Override global culture/localization value |
3224| `width` | `number \| string` | Set component width |
3225| `prependTemplate` | `() => JSX.Element` | Render element before input |
3226| `appendTemplate` | `() => JSX.Element` | Render element after input |
3227
3228### Key Events
3229
3230| Event | Arguments | Purpose |
3231|-------|-----------|---------|
3232| `created` | `Object` | Fires after component initialization |
3233| `destroyed` | `Object` | Fires when component is destroyed |
3234| `change` | `ChangedEventArgs` | Fires when value changes on focus-out |
3235| `input` | `InputEventArgs` | Fires on every keystroke |
3236| `focus` | `FocusInEventArgs` | Fires when TextBox gains focus |
3237| `blur` | `FocusOutEventArgs` | Fires when TextBox loses focus |
3238
3239### Related Documentation
3240
3241> **ℹ️ External links below are for manual reference only.** Do not auto-fetch these URLs in an agentic pipeline without explicit user consent.
3242
3243- [Syncfusion React TextBox Component Demo](https://ej2.syncfusion.com/react/demos/#/tailwind3/textboxes/default) *(external)*
3244- [React TextBox API Reference](https://ej2.syncfusion.com/react/documentation/api/textbox/) *(external)*
3245- [Syncfusion React Inputs Package](https://www.npmjs.com/package/@syncfusion/ej2-react-inputs) *(external — verify before installing)*
3246- [React Functional Components](./references/textbox-advanced-features.md)
3247
3248## CheckBox
3249
3250The Syncfusion React `CheckBoxComponent` is a graphical UI element that allows users to select one or more options. It supports **checked**, **unchecked**, and **indeterminate** states, flexible label positioning, size variants, full accessibility compliance, and rich CSS customization.
3251
3252**Package:** `@syncfusion/ej2-react-buttons`
3253
3254---
3255
3256### Navigation Guide
3257
3258> 🛑 **Agentic use:** Do not execute multiple steps autonomously. Confirm with the user before each action (install, run, file creation).
3259
3260#### Getting Started
3261📄 **Read:** [references/getting-started.md](references/checkbox-getting-started.md)
3262- Installing `@syncfusion/ej2-react-buttons` 🛑 *STOP — Do not install packages autonomously. Ask the user to run: `npm install @syncfusion/ej2-react-buttons --save`. Verify with `npm audit`*
3263- CSS theme imports for Tailwind3
3264- Minimal `CheckBoxComponent` setup
3265- Running the Vite/React app 🛑 *STOP — Do not start the dev server autonomously. Ask the user to run: `npm run dev`*
3266
3267#### States (Checked, Unchecked, Indeterminate, Disabled)
3268📄 **Read:** [references/states.md](references/checkbox-states.md)
3269- Setting `checked={true}` for checked state
3270- Setting `indeterminate={true}` for indeterminate state
3271- Setting `disabled={true}` for disabled state
3272- Combined state examples
3273
3274#### Label and Size
3275📄 **Read:** [references/label-and-size.md](references/checkbox-label-and-size.md)
3276- `label` prop for caption text
3277- `labelPosition` (`"Before"` / `"After"`)
3278- Small size via `cssClass="e-small"`
3279- Default vs. small size examples
3280
3281#### Style and Appearance
3282📄 **Read:** [references/style-and-appearance.md](references/checkbox-style-and-appearance.md)
3283- Available CSS classes for overriding checkbox styles
3284- Color variant customization (primary, success, warning, danger, info)
3285- Custom frame shapes (round checkbox)
3286- Custom check icon
3287- Theme Studio integration
3288
3289#### Accessibility and RTL
3290📄 **Read:** [references/accessibility.md](references/checkbox-accessibility.md)
3291- WCAG 2.2 / Section 508 compliance
3292- WAI-ARIA attributes (`aria-disabled`)
3293- Keyboard navigation (Space key)
3294- Right-to-left (`enableRtl`) support
3295- Screen reader support
3296
3297#### How-To Guides
3298📄 **Read:** [references/how-to.md](references/checkbox-how-to.md)
3299- Name and value in form submission
3300- Enabling right-to-left display
3301- Building customized checkbox variants
3302
3303#### API Reference
3304📄 **Read:** [references/api.md](references/checkbox-api.md)
3305- All properties: `checked`, `cssClass`, `disabled`, `enableHtmlSanitizer`, `enablePersistence`, `enableRtl`, `htmlAttributes`, `indeterminate`, `label`, `labelPosition`, `locale`, `name`, `value`
3306- Methods: `click()`, `destroy()`, `focusIn()`
3307- Events: `change`, `created`
3308
3309---
3310
3311### Quick Start
3312
3313```bash
3314npm install @syncfusion/ej2-react-buttons --save
3315# Then run: npm audit
3316```
3317
3318```css
3319/* src/App.css */
3320@import "../node_modules/@syncfusion/ej2-base/styles/tailwind3.css";
3321@import "../node_modules/@syncfusion/ej2-buttons/styles/tailwind3.css";
3322```
3323
3324```tsx
3325import { CheckBoxComponent } from '@syncfusion/ej2-react-buttons';
3326import * as React from 'react';
3327import './App.css';
3328
3329function App() {
3330 return (
3331 <div>
3332 <CheckBoxComponent label="Accept Terms" />
3333 </div>
3334 );
3335}
3336export default App;
3337```
3338
3339---
3340
3341### Common Patterns
3342
3343#### Controlled Checkbox with Change Handler
3344```tsx
3345import { CheckBoxComponent } from '@syncfusion/ej2-react-buttons';
3346import { ChangeEventArgs } from '@syncfusion/ej2-react-buttons';
3347import * as React from 'react';
3348
3349function App() {
3350 const [isChecked, setIsChecked] = React.useState(false);
3351
3352 const handleChange = (args: ChangeEventArgs) => {
3353 setIsChecked(args.checked);
3354 };
3355
3356 return (
3357 <CheckBoxComponent
3358 label="Subscribe to newsletter"
3359 checked={isChecked}
3360 change={handleChange}
3361 />
3362 );
3363}
3364export default App;
3365```
3366
3367#### Parent / Children with Indeterminate State
3368```tsx
3369import { CheckBoxComponent } from '@syncfusion/ej2-react-buttons';
3370import * as React from 'react';
3371
3372function App() {
3373 return (
3374 <ul>
3375 {/* Parent: indeterminate when some children are selected */}
3376 <li><CheckBoxComponent label="Select All" indeterminate={true} /></li>
3377 <li><CheckBoxComponent label="Option A" checked={true} /></li>
3378 <li><CheckBoxComponent label="Option B" /></li>
3379 </ul>
3380 );
3381}
3382export default App;
3383```
3384
3385#### Form Submission with Name and Value
3386```tsx
3387import { CheckBoxComponent, ButtonComponent } from '@syncfusion/ej2-react-buttons';
3388import * as React from 'react';
3389
3390function App() {
3391 return (
3392 <form>
3393 <CheckBoxComponent name="hobby" value="Reading" label="Reading" checked={true} />
3394 <CheckBoxComponent name="hobby" value="Gaming" label="Gaming" />
3395 <ButtonComponent isPrimary={true}>Submit</ButtonComponent>
3396 </form>
3397 );
3398}
3399export default App;
3400```
3401
3402---
3403
3404### Key Props at a Glance
3405
3406| Prop | Type | Default | Purpose |
3407|------|------|---------|---------|
3408| `label` | `string` | `''` | Caption text next to checkbox |
3409| `checked` | `boolean` | `false` | Checked state |
3410| `indeterminate` | `boolean` | `false` | Indeterminate (partial) state |
3411| `disabled` | `boolean` | `false` | Disabled state |
3412| `labelPosition` | `'Before' \| 'After'` | `'After'` | Label placement |
3413| `cssClass` | `string` | `''` | Custom CSS class(es) |
3414| `name` | `string` | `''` | Form field name |
3415| `value` | `string` | `''` | Form field value |
3416| `enableRtl` | `boolean` | `false` | Right-to-left rendering |
3417| `enablePersistence` | `boolean` | `false` | Persist state across reloads ⚠️ *Stores data in browser storage — enable only with explicit user consent* |
3418
3419---
3420
3421## Signature
3422
3423The Syncfusion React `SignatureComponent` renders a canvas-based signature pad that captures smooth handwritten signatures using variable-width bezier curves. It supports drawing, saving (PNG/JPEG/SVG/base64/blob), loading existing signatures, undo/redo history, customizable stroke and background appearance, and full accessibility compliance.
3424
3425**Package:** `@syncfusion/ej2-react-inputs`
3426
3427---
3428
3429### Navigation Guide
3430
3431> 🛑 **Agentic use:** Do not execute multiple steps autonomously. Confirm with the user before each action (install, run, file creation).
3432
3433#### Getting Started
3434📄 **Read:** [references/getting-started.md](references/signature-getting-started.md)
3435- Installing `@syncfusion/ej2-react-inputs` 🛑 *STOP — Do not install packages autonomously. Ask the user to run: `npm install @syncfusion/ej2-react-inputs --save`. Verify with `npm audit`*
3436- CSS theme imports (Tailwind3)
3437- Minimal `SignatureComponent` setup
3438- Running the application 🛑 *STOP — Do not start the dev server autonomously. Ask the user to run: `npm run dev`*
3439
3440#### Customization
3441📄 **Read:** [references/customization.md](references/signature-customization.md)
3442- Stroke width: `maxStrokeWidth`, `minStrokeWidth`, `velocity`
3443- Stroke color: `strokeColor`
3444- Background color: `backgroundColor`
3445- Background image: `backgroundImage`
3446
3447#### Open and Save
3448📄 **Read:** [references/open-save.md](references/signature-open-save.md)
3449- Load signature from base64 or URL (`load`)
3450- Save as base64 (`getSignature`)
3451- Save as Blob (`saveAsBlob`, `getBlob`)
3452- Save as image file — PNG, JPEG, SVG (`save`)
3453- Save with background (`saveWithBackground`)
3454
3455#### User Interaction
3456📄 **Read:** [references/user-interaction.md](references/signature-user-interaction.md)
3457- Undo/redo strokes (`undo`, `redo`, `canUndo`, `canRedo`)
3458- Clear the canvas (`clear`, `isEmpty`)
3459- Disabled state (`disabled`)
3460- Read-only mode (`isReadOnly`)
3461- Draw text as signature (`draw`)
3462- Keyboard shortcuts (Ctrl+Z, Ctrl+Y, Ctrl+S, Delete)
3463
3464#### Toolbar Integration
3465📄 **Read:** [references/toolbar-integration.md](references/signature-toolbar-integration.md)
3466- Integrating with Syncfusion `ToolbarComponent`
3467- Wiring undo, redo, clear, and save toolbar buttons
3468- Stroke color picker using `ColorPickerComponent`
3469- Background color picker integration
3470- Stroke width dropdown with `DropDownListComponent`
3471- Enabling/disabling toolbar buttons based on signature state
3472
3473#### Accessibility
3474📄 **Read:** [references/accessibility.md](references/signature-accessibility.md)
3475- WCAG 2.2 / Section 508 compliance
3476- Keyboard interaction (Ctrl+Z, Ctrl+Y, Ctrl+S, Delete)
3477- Screen reader and mobile device support
3478
3479#### API Reference
3480📄 **Read:** [references/api.md](references/signature-api.md)
3481- All properties: `backgroundColor`, `backgroundImage`, `disabled`, `enablePersistence`, `isReadOnly`, `maxStrokeWidth`, `minStrokeWidth`, `saveWithBackground`, `strokeColor`, `velocity`
3482- All methods: `canRedo`, `canUndo`, `clear`, `destroy`, `draw`, `getBlob`, `getSignature`, `isEmpty`, `load`, `redo`, `refresh`, `save`, `saveAsBlob`, `undo`
3483- Events: `beforeSave`, `change`, `created`
3484
3485---
3486
3487### Quick Start
3488
3489```bash
3490npm install @syncfusion/ej2-react-inputs --save
3491# Then run: npm audit
3492```
3493
3494```css
3495/* src/App.css */
3496@import "../node_modules/@syncfusion/ej2-base/styles/tailwind3.css";
3497@import "../node_modules/@syncfusion/ej2-inputs/styles/tailwind3.css";
3498```
3499
3500```tsx
3501import { SignatureComponent } from '@syncfusion/ej2-react-inputs';
3502import * as React from 'react';
3503import './App.css';
3504
3505function App() {
3506 return (
3507 <div>
3508 <SignatureComponent id="signature" />
3509 </div>
3510 );
3511}
3512export default App;
3513```
3514
3515---
3516
3517### Common Patterns
3518
3519#### Signature with Undo/Redo/Clear Controls
3520```tsx
3521import { SignatureComponent, SignatureChangeEventArgs } from '@syncfusion/ej2-react-inputs';
3522import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
3523import * as React from 'react';
3524import { useRef } from 'react';
3525
3526function App() {
3527 const sigRef = React.useRef<SignatureComponent>(null);
3528 const [canUndo, setCanUndo] = React.useState(false);
3529 const [canRedo, setCanRedo] = React.useState(false);
3530 const [isEmpty, setIsEmpty] = React.useState(true);
3531
3532 function handleChange(args: SignatureChangeEventArgs) {
3533 if (sigRef.current) {
3534 setCanUndo(sigRef.current.canUndo());
3535 setCanRedo(sigRef.current.canRedo());
3536 setIsEmpty(sigRef.current.isEmpty());
3537 }
3538 }
3539
3540 return (
3541 <div>
3542 <ButtonComponent disabled={!canUndo} onClick={() => sigRef.current?.undo()}>Undo</ButtonComponent>
3543 <ButtonComponent disabled={!canRedo} onClick={() => sigRef.current?.redo()}>Redo</ButtonComponent>
3544 <ButtonComponent disabled={isEmpty} onClick={() => sigRef.current?.clear()}>Clear</ButtonComponent>
3545 <SignatureComponent id="signature" ref={sigRef} change={handleChange} />
3546 </div>
3547 );
3548}
3549export default App;
3550```
3551
3552#### Save Signature as PNG
3553```tsx
3554import { SignatureComponent } from '@syncfusion/ej2-react-inputs';
3555import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
3556import * as React from 'react';
3557
3558function App() {
3559 const sigRef = React.useRef<SignatureComponent>(null);
3560
3561 function saveSignature() {
3562 sigRef.current?.save('Png', 'MySignature');
3563 }
3564
3565 return (
3566 <div>
3567 <SignatureComponent id="signature" ref={sigRef} />
3568 <ButtonComponent onClick={saveSignature}>Save as PNG</ButtonComponent>
3569 </div>
3570 );
3571}
3572export default App;
3573```
3574
3575---
3576
3577### Key Props at a Glance
3578
3579| Prop | Type | Default | Purpose |
3580|------|------|---------|---------|
3581| `strokeColor` | `string` | `'#000000'` | Pen/stroke color (hex, rgb, or name) |
3582| `backgroundColor` | `string` | `''` | Canvas background color |
3583| `backgroundImage` | `string` | `''` | Canvas background image URL |
3584| `maxStrokeWidth` | `number` | `2` | Maximum stroke thickness |
3585| `minStrokeWidth` | `number` | `0.5` | Minimum stroke thickness |
3586| `velocity` | `number` | `0.7` | Controls stroke width variation |
3587| `disabled` | `boolean` | `false` | Disables the component |
3588| `isReadOnly` | `boolean` | `false` | Prevents drawing, allows focus |
3589| `saveWithBackground` | `boolean` | `true` | Include background when saving |
3590| `enablePersistence` | `boolean` | `false` | Persist state across page reloads ⚠️ *Stores signature data (biometric input) in browser storage — enable only with explicit user consent and applicable privacy disclosures* |
3591
3592---
3593
3594## OTP Input
3595
3596A focused input component for collecting one-time passwords, PINs, and verification codes. Renders a configurable number of individual character input fields with full keyboard navigation, accessibility support, and visual styling modes.
3597
3598### Quick Start
3599
3600```tsx
3601import { OtpInputComponent } from '@syncfusion/ej2-react-inputs';
3602import * as React from 'react';
3603import './App.css';
3604
3605function App() {
3606 return (
3607 <div id="container">
3608 <OtpInputComponent id="otpinput" />
3609 </div>
3610 );
3611}
3612
3613export default App;
3614```
3615
3616**CSS (src/App.css):**
3617```css
3618@import "../node_modules/@syncfusion/ej2-base/styles/tailwind3.css";
3619@import "../node_modules/@syncfusion/ej2-inputs/styles/tailwind3.css";
3620```
3621
3622**Install:**
3623```bash
3624npm install @syncfusion/ej2-react-inputs --save
3625```
3626
3627### Common Patterns
3628
3629#### 6-digit OTP with verification callback
3630
3631```tsx
3632import { OtpInputComponent, OtpChangedEventArgs } from '@syncfusion/ej2-react-inputs';
3633import * as React from 'react';
3634
3635function App() {
3636 const handleValueChanged = (args: OtpChangedEventArgs) => {
3637 console.log('Complete OTP:', args.value);
3638 // Call your API verification here
3639 };
3640
3641 return (
3642 <OtpInputComponent
3643 id="otpinput"
3644 length={6}
3645 autoFocus={true}
3646 valueChanged={handleValueChanged}
3647 />
3648 );
3649}
3650```
3651
3652#### Password-masked OTP with error state
3653
3654```tsx
3655import { OtpInputCompo
3656
3657…(truncated)