npx skills add ...
npx skills add syncfusion/react-ui-components-skills --skill syncfusion-react-inputs
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.
npx skills add syncfusion/react-ui-components-skills --skill syncfusion-react-inputs
The 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.
🛑 Agentic use: Do not execute multiple steps autonomously. Confirm with the user before each action (install, run, file creation).
📄 Read: references/getting-started.md
@syncfusion/ej2-react-inputs 🛑 STOP — Do not install packages autonomously. Ask the user to run: npm install @syncfusion/ej2-react-inputs. Verify with npm auditUploaderComponent usage in JSX/TSX📄 Read: references/async-upload.md
asyncSettings with saveUrl and removeUrlmultiple)autoUpload)sequentialUpload)files property)uploading/removing events📄 Read: references/chunk-upload.md
asyncSettings.chunkSizeretryCount, retryAfterDelay)pause, resume methods)cancel method)chunkSuccess and chunkFailure events📄 Read: references/validation.md
allowedExtensions)minFileSize, maxFileSize)selected event📄 Read: references/file-source.md
directoryUpload)dropArea)📄 Read: references/template-customization.md
template propertyshowFileList: falsebuttons property)📄 Read: references/advanced-how-to.md
upload method, getFilesData)📄 Read: references/api.md
allowedExtensions, asyncSettings, autoUpload, buttons, cssClass, directoryUpload, dropArea, dropEffect, enabled, files, htmlAttributes, locale, maxFileSize, minFileSize, multiple, sequentialUpload, showFileList, template, and more)upload, remove, cancel, pause, resume, retry, clearAll, getFilesData, bytesToSize, createFileList, sortFileList)uploading, success, failure, selected, removing, change, progress, chunkSuccess, chunkFailure, chunkUploading, actionComplete, beforeRemove, beforeUpload, canceling, clearing, fileListRendering, pausing, resuming, created)| Need | Property/Event |
|---|---|
| Server URLs | asyncSettings.saveUrl + asyncSettings.removeUrl |
| Auto vs manual upload | autoUpload (default: true) |
| Large file upload | asyncSettings.chunkSize |
| Restrict file types | allowedExtensions |
| Limit file size | maxFileSize / minFileSize |
| Preload files from server | files prop |
| Upload one at a time | sequentialUpload: true |
| Entire folder upload | directoryUpload: true |
| Custom drop target | dropArea |
| Custom file list UI | template or showFileList: false |
| Add auth headers | uploading event → args.currentRequest.setRequestHeader() |
| Send extra form data | uploading event → args.customFormData |
The 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.
🛑 Agentic use: Do not execute multiple steps autonomously. Confirm with the user before each action (install, run, file creation).
When the user needs help with NumericTextBox, guide them to the appropriate reference:
📄 Read: references/getting-started.md
📄 Read: references/formats-and-validation.md
📄 Read: references/spin-buttons-and-step.md
📄 Read: references/adornments-and-styling.md
📄 Read: references/precision-decimals.md
📄 Read: references/two-way-binding-forms.md
📄 Read: references/globalization-accessibility.md
📄 Read: references/api.md
Here's a minimal working example to get started:
Key points:
NumericTextBoxComponent from @syncfusion/ej2-react-inputsvalue prop for the current numeric valueonChange event to update React statemin, max, step for validation and controls| Property | Type | Purpose |
|---|---|---|
value | number | Current numeric value |
min | number | Minimum allowed value |
max | number | Maximum allowed value |
step | number | Increment/decrement step (default: 1) |
decimals | number | Number of decimal places when focused |
format | string | Number format (n2, c2, p2, e2, etc.) |
currency | string | ISO 4217 currency code (e.g., 'USD', 'EUR') |
placeholder | string | Placeholder text when empty |
floatLabelType | FloatLabelType | Float label behavior ('Never', 'Always', 'Auto') |
readonly | boolean | Prevent user input |
enabled | boolean | Enable or disable the control (default: true) |
strictMode | boolean | Enforce min/max validation (default: true) |
validateDecimalOnType | boolean | Restrict decimal length during typing |
showSpinButton | boolean | Show/hide spinner arrows (default: true) |
showClearButton | boolean | Show/hide clear icon |
allowMouseWheel | boolean | Enable mouse wheel increment/decrement (default: true) |
cssClass | string | Additional CSS classes for custom styling |
width | number | string | Width of the component |
1. Shopping Cart - Quantity Input
2. Price Calculator - Currency Field
3. Rating or Score - 0-100 Range
4. Discount Percentage
5. Measurement Input
6. Financial Form
@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.For detailed implementation guidance, navigate to the appropriate reference file above.
The TextBox component is a lightweight input control that captures user text input with support for floating labels, validation states, icons, and advanced features. This skill guides you through implementing, configuring, and customizing the TextBox component in React applications.
🛑 Agentic use: Do not execute multiple steps autonomously. Confirm with the user before each action (install, run, file creation).
📄 Read: references/getting-started.md
@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 auditnpm run dev📄 Read: references/features-and-groups.md
addIcon() method (prepend/append)showClearButton propertye-corner CSS classenabled={false}📄 Read: references/styling-and-sizing.md
e-small), Large (e-bigger)cssClass propertye-corner CSS class📄 Read: references/multiline-textbox.md
multiline={true}htmlAttributes={{ maxlength: '...' }}📄 Read: references/validation-and-states.md
cssClasse-error, e-warning, e-success)enabled={false} (not disabled)readonly={true}input event📄 Read: references/advanced-features.md
prependTemplate and appendTemplate propertiesuseState, useEffect, useRef, useReducer integration📄 Read: references/accessibility-and-migration.md
enableRtl property📄 Read: references/api.md
placeholder, floatLabelType, value, type, cssClass, multiline, showClearButton, enabled, readonly, enableRtl, enablePersistence, autocomplete, htmlAttributes, locale, width, prependTemplate, appendTemplateaddIcon, addAttributes, removeAttributes, focusIn, focusOut, destroy, getPersistDatacreated, destroyed, change, input, focus, blur| Property | Type | Purpose |
|---|---|---|
placeholder | string | Hint text shown when input is empty |
floatLabelType | "Never" | "Always" | "Auto" | Label animation behavior |
value | string | Sets the content of the TextBox |
type | string | Input type (text, password, email, number, etc.) |
multiline | boolean | Convert to textarea for multi-line input |
showClearButton | boolean | Display clear button when input has value |
cssClass | string | Apply CSS classes for sizing/validation/appearance (e.g., "e-error", "e-small", "e-corner") |
enabled | boolean | Enable (true) or disable (false) input interaction |
readonly | boolean | Allow selection but prevent editing |
enableRtl | boolean | Enable right-to-left rendering |
enablePersistence | boolean | Persist value state between page reloads ⚠️ Stores data in browser storage — enable only with explicit user consent |
autocomplete | string | Control browser autocomplete ("on" | "off") |
htmlAttributes | { [key: string]: string } | Pass additional HTML attributes (e.g., { maxlength: '200' }) |
locale | string | Override global culture/localization value |
width | number | string | Set component width |
prependTemplate | () => JSX.Element | Render element before input |
appendTemplate | () => JSX.Element | Render element after input |
| Event | Arguments | Purpose |
|---|---|---|
created | Object | Fires after component initialization |
destroyed | Object | Fires when component is destroyed |
change | ChangedEventArgs | Fires when value changes on focus-out |
input | InputEventArgs | Fires on every keystroke |
focus | FocusInEventArgs | Fires when TextBox gains focus |
blur | FocusOutEventArgs | Fires when TextBox loses focus |
ℹ️ External links below are for manual reference only. Do not auto-fetch these URLs in an agentic pipeline without explicit user consent.
The 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.
Package: @syncfusion/ej2-react-buttons
🛑 Agentic use: Do not execute multiple steps autonomously. Confirm with the user before each action (install, run, file creation).
📄 Read: references/getting-started.md
@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 auditCheckBoxComponent setupnpm run dev📄 Read: references/states.md
checked={true} for checked stateindeterminate={true} for indeterminate statedisabled={true} for disabled state📄 Read: references/label-and-size.md
label prop for caption textlabelPosition ("Before" / "After")cssClass="e-small"📄 Read: references/style-and-appearance.md
📄 Read: references/accessibility.md
aria-disabled)enableRtl) support📄 Read: references/how-to.md
📄 Read: references/api.md
checked, cssClass, disabled, enableHtmlSanitizer, enablePersistence, enableRtl, htmlAttributes, indeterminate, label, labelPosition, locale, name, valueclick(), destroy(), focusIn()change, created| Prop | Type | Default | Purpose |
|---|---|---|---|
label | string | '' | Caption text next to checkbox |
checked | boolean | false | Checked state |
indeterminate | boolean | false | Indeterminate (partial) state |
disabled | boolean | false | Disabled state |
labelPosition | 'Before' | 'After' | 'After' | Label placement |
cssClass | string | '' | Custom CSS class(es) |
name | string | '' | Form field name |
value | string | '' | Form field value |
enableRtl | boolean | false | Right-to-left rendering |
enablePersistence | boolean | false | Persist state across reloads ⚠️ Stores data in browser storage — enable only with explicit user consent |
The 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.
Package: @syncfusion/ej2-react-inputs
🛑 Agentic use: Do not execute multiple steps autonomously. Confirm with the user before each action (install, run, file creation).
📄 Read: references/getting-started.md
@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 auditSignatureComponent setupnpm run dev📄 Read: references/customization.md
maxStrokeWidth, minStrokeWidth, velocitystrokeColorbackgroundColorbackgroundImage📄 Read: references/open-save.md
load)getSignature)saveAsBlob, getBlob)save)saveWithBackground)📄 Read: references/user-interaction.md
undo, redo, canUndo, canRedo)clear, isEmpty)disabled)isReadOnly)draw)📄 Read: references/toolbar-integration.md
ToolbarComponentColorPickerComponentDropDownListComponent📄 Read: references/accessibility.md
📄 Read: references/api.md
backgroundColor, backgroundImage, disabled, enablePersistence, isReadOnly, maxStrokeWidth, minStrokeWidth, saveWithBackground, strokeColor, velocitycanRedo, canUndo, clear, destroy, draw, getBlob, getSignature, isEmpty, load, redo, refresh, save, saveAsBlob, undobeforeSave, change, created| Prop | Type | Default | Purpose |
|---|---|---|---|
strokeColor | string | '#000000' | Pen/stroke color (hex, rgb, or name) |
backgroundColor | string | '' | Canvas background color |
backgroundImage | string | '' | Canvas background image URL |
maxStrokeWidth | number | 2 | Maximum stroke thickness |
minStrokeWidth | number | 0.5 | Minimum stroke thickness |
velocity | number | 0.7 | Controls stroke width variation |
disabled | boolean | false | Disables the component |
isReadOnly | boolean | false | Prevents drawing, allows focus |
saveWithBackground | boolean | true | Include background when saving |
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 |
A 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.
CSS (src/App.css):
Install:
| Property | Type | Default | Purpose |
|---|---|---|---|
length | number | 4 | Number of OTP input fields |
value | string | number | '' | Current OTP value |
type | 'number' | 'text' | 'password' | 'number' | Input character type |
stylingMode | 'outlined' | 'filled' | 'underlined' | 'outlined' | Visual style variant |
placeholder | string | '' | Hint character(s) per field |
separator | string | '' | Character between fields |
cssClass | string | '' | Custom/predefined CSS class (e-success, e-warning, e-error) |
disabled | boolean | false | Disables user input |
autoFocus | boolean | false | Auto-focuses on render |
enableRtl | boolean | false | Right-to-left layout |
textTransform | 'none' | 'uppercase' | 'lowercase' | 'none' | Case transformation |
ariaLabels | string[] | [] | Per-field ARIA labels |
htmlAttributes | { [key: string]: string } | {} | Extra HTML attributes |
📄 Read: references/getting-started.md
📄 Read: references/configuration.md
e-success, e-warning, e-error)📄 Read: references/events.md
created event (post-render init)focus and blur events with OtpFocusEventArgsinput event for real-time tracking with OtpInputEventArgsvalueChanged event for OTP submission with OtpChangedEventArgsfocusIn() / focusOut() methods📄 Read: references/accessibility.md
ariaLabels configurationhtmlAttributes for custom accessibility metadata📄 Read: references/api.md
destroy(), focusIn(), focusOut()OtpInputType, OtpInputStyle, TextTransformOtpFocusEventArgs, OtpInputEventArgs, OtpChangedEventArgsWhich type to use?
type="number" (default)type="text"type="password"Which event to use?
valueChangedinputfocus / blurWhich styling mode?
outlined (default)filledunderlinedVisual feedback after verification?
cssClass="e-success"cssClass="e-error"cssClass="e-warning"The 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.
📄 Read: references/getting-started.md
📄 Read: references/value-and-content.md
📄 Read: references/floating-label.md
📄 Read: references/adornments.md
📄 Read: references/form-support.md
📄 Read: references/max-length.md
📄 Read: references/rows-columns-sizing.md
📄 Read: references/resize.md
📄 Read: references/styling-appearance.md
📄 Read: references/events.md
📄 Read: references/methods.md
📄 Read: references/api.md
| Prop | Purpose | Common Values |
|---|---|---|
value | Set/get textarea content | string |
placeholder | Hint text | string |
rows | Visible height in lines | 3-10 |
cols | Visible width in characters | 30-80 |
floatLabelType | Floating behavior | 'Auto', 'Always', 'Never' |
maxLength | Character limit | number |
resizeMode | User resizing | 'Both', 'Vertical', 'Horizontal', 'None' |
enabled | Enable/disable input | boolean |
readonly | Read-only mode | boolean |
cssClass | Custom styling | 'e-outline', 'e-small', 'e-filled' |
showClearButton | Display clear button | boolean |
A 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.
Package: @syncfusion/ej2-react-inputs
📄 Read: references/getting-started.md
📄 Read: references/types-and-orientation.md
📄 Read: references/tooltips-and-ticks.md
📄 Read: references/formatting-and-limits.md
📄 Read: references/styling.md
📄 Read: references/accessibility.md
role="slider", aria-valuemin, aria-valuemax, aria-valuenow, aria-orientation)aria-live regions📄 Read: references/color-range.md
colorRange property and ColorRangeDataModel interfaceRange type (dual handles)colorRange with limits, ticks, and tooltip📄 Read: references/events-and-methods.md
change event — continuous value updates while draggingchanged event — final committed value on drag releasecreated event — post-render initializationrenderingTicks — customize tick label text per tickrenderedTicks — post-process tick DOM after all ticks rendertooltipChange — customize tooltip display textreposition() method — when and how to calldestroy() method — cleanup and removalref patterns for programmatic control📄 Read: references/api-reference.md
SliderComponent properties: value, type, min, max, step, orientation, ticks, tooltip, limits, colorRange, customValues, showButtons, enableAnimation, enabled, readonly, cssClass, width, enableRtl, enablePersistence, enableHtmlSanitizer, localereposition(), destroy()change, changed, created, renderingTicks, renderedTicks, tooltipChangeTicksDataModel — placement ('Before'/'After'/'Both'/'None'), largeStep, smallStep, showSmallTicks, formatTooltipDataModel — isVisible, placement, showOn ('Always'/'Focus'/'Click'), format, cssClassLimitDataModel — enabled, minStart, minEnd, maxStart, maxEnd, startHandleFixed, endHandleFixedColorRangeDataModel — color, start, endSliderChangeEventArgs — value, previousValue, action, isInteracted, textSliderTickEventArgs — value, text, tickElementSliderTickRenderedEventArgs — ticksWrapper, tickElementsSliderTooltipEventArgs — value, textSliderType ('Default' | 'MinRange' | 'Range')SliderOrientation ('Horizontal' | 'Vertical')Use Default type for simple numeric selection with visual scale.
Use Range type with limits to restrict handle movement to specific areas.
Display values as currency using format API.
Display slider vertically for space-constrained layouts.
Add buttons to manually adjust slider values.
Paint distinct color sections on the slider track using colorRange.
Use non-numeric labels as slider values with customValues.
Show a locked slider for informational display.
| Property | Type | Default | Purpose |
|---|---|---|---|
value | number | number[] | null | Single value or [start, end] array for Range type |
type | 'Default' | 'MinRange' | 'Range' | 'Default' | Slider mode |
min | number | 0 | Minimum selectable value |
max | number | 100 | Maximum selectable value |
step | number | 1 | Value increment/decrement per step |
orientation | 'Horizontal' | 'Vertical' | 'Horizontal' | Slider direction |
tooltip | TooltipDataModel | { isVisible: false } | Tooltip configuration |
ticks | TicksDataModel | { placement: 'before' } | Tick marks configuration |
limits | LimitDataModel | { enabled: false } | Thumb movement restrictions |
colorRange | ColorRangeDataModel[] | [] | Color zones on the track |
customValues | string[] | number[] | null | Custom value scale (ignores min/max/step) |
showButtons | boolean | false | Show +/- increment/decrement buttons |
enabled | boolean | true | Enable or disable the slider |
readonly | boolean | false | Read-only display mode |
enableRtl | boolean | false | Right-to-left layout |
width | number | string | null | Slider element width |
cssClass | string | '' | Custom CSS classes on root element |
| Type | Handles | Fill Behavior | Use Case |
|---|---|---|---|
| Default | 1 | No fill | Simple numeric selection |
| MinRange | 1 | Fill from min | Visual progress/level indicator |
| Range | 2 | Fill between handles | Min/max range selection |
Select min and max budget with step increments and currency formatting.
→ Use type="Range", step={50}, format 'C0', tooltip enabled
Select time window (hours, minutes, days).
→ Use type="Range", custom formatting via renderingTicks event
Single handle adjustment with immediate feedback.
→ Use type="Default", no ticks, always-visible tooltip
MinRange mode with shadow showing current level.
→ Use type="MinRange", min={0}, max={10}, step-based
Multiple product categories with price ranges.
→ Use type="Range", limits for each category, event handlers
| Event | Trigger | Usage |
|---|---|---|
created | Component created and rendered | One-time setup operations |
change | Value changing while dragging | Real-time feedback (continuous) |
changed | Drag complete (thumb released) | Capture final committed value |
tooltipChange | Tooltip about to render | Custom tooltip text formatting |
renderingTicks | Each tick being rendered | Custom tick label text |
renderedTicks | All ticks rendered | Post-process tick DOM elements |
⚠️ Note: The official event for continuous updates while dragging is
change, notchanging. The event fired after drag completes ischanged. Do NOT useonChangeprop (that is a React native input prop). Usechangeandchangeddirectly.
Component not displaying? → Check CSS imports and theme in getting-started.md
Values not updating? → Use change (continuous) or changed (on release) events — NOT onChange
Formatting not working? → See format API examples in formatting-and-limits.md
Accessibility issues? → Refer to accessibility.md for ARIA and keyboard support
Vertical slider not rendering? → Wrap in a container with explicit height (e.g., style={{ height: '300px' }})
Range type with single value? → Always pass value={[start, end]} array for type="Range"
Color zones not showing? → Check colorRange array has valid start/end/color properties
Default, MinRange, or Range)⚠️ Critical: Only use APIs explicitly listed in references/api-reference.md. Do not reference
onChange(usechange/changed),toggle(),open(),close(), or any undocumented methods.
The 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.
Package: @syncfusion/ej2-react-inputs
Component: <ColorPickerComponent>
📄 Read: references/getting-started.md
📄 Read: references/modes-and-value.md
📄 Read: references/palette-features.md
presetColors)beforeTileRender)noColor)showRecentColors)columns)📄 Read: references/ui-customization.md
📄 Read: references/integration-and-advanced.md
📄 Read: references/localization-and-rtl.md
L10nenableRtl)📄 Read: references/accessibility.md
📄 Read: references/api.md
| Prop | Type | Default | Purpose |
|---|---|---|---|
value | string | '#008000ff' | Initial color (3/4/6/8 digit hex) |
mode | 'Picker' | 'Palette' | 'Picker' | Which panel to show initially |
inline | boolean | false | Render component directly (no popup) |
showButtons | boolean | true | Show Apply/Cancel buttons |
modeSwitcher | boolean | true | Show mode switcher button |
noColor | boolean | false | Add a "no color" tile to palette |
presetColors | object | null | Custom color groups for palette |
columns | number | 10 | Palette columns count |
enableOpacity | boolean | true | Show opacity slider |
showRecentColors | boolean | false | Show recent color tiles (palette only) |
disabled | boolean | false | Disable the component |
cssClass | string | '' | Custom CSS class on root element |
enableRtl | boolean | false | Right-to-left rendering |
locale | string | '' | Locale string for localization |
The 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.
📄 Read: references/getting-started.md
@syncfusion/ej2-react-inputs)mask property for format enforcement📄 Read: references/mask-configuration.md
customCharacters propertypromptChar📄 Read: references/adornments.md
prependTemplate and appendTemplate📄 Read: references/react-hooks.md
useStateuseEffect + useRef + focusIn()useReducerchange event in functional components📄 Read: references/style-and-customization.md
cssClassfocus event (selectionStart, selectionEnd)type="tel"floatLabelType options (Never, Always, Auto)📄 Read: references/form-validation.md
FormValidatorej2_instancescustomPlacementpromptChar📄 Read: references/api.md
mask, value, placeholder, floatLabelType, promptChar, customCharacters, cssClass, enabled, readonly, showClearButton, enableRtl, enablePersistence, htmlAttributes, locale, width, prependTemplate, appendTemplatefocusIn(), focusOut(), getMaskedValue(), destroy(), getPersistData()change, focus, blur, created, destroyedThe 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.
Package: @syncfusion/ej2-react-inputs
📄 Read: references/getting-started.md
@syncfusion/ej2-react-inputsRatingComponent setupvalue property📄 Read: references/selection.md
valueminenableSingleSelectionallowResetreset() method📄 Read: references/precision-modes.md
PrecisionType.Full — whole number incrementsPrecisionType.Half — 0.5 incrementsPrecisionType.Quarter — 0.25 incrementsPrecisionType.Exact — 0.1 increments📄 Read: references/appearance.md
itemsCountdisabledvisiblereadOnlycssClass (border color, fill color, item spacing, icon)📄 Read: references/labels.md
showLabellabelPosition options: Top, Bottom, Left, RightlabelTemplate📄 Read: references/tooltip.md
showTooltiptooltipTemplatecssClass📄 Read: references/templates.md
emptyTemplate for unrated itemsfullTemplate for rated items--rating-value📄 Read: references/events.md
beforeItemRender — customize items before rendercreated — after component initializationonItemHover — track hovered itemsvalueChanged — react to user rating changes📄 Read: references/accessibility.md
role=slider, aria-valuemin/max/now)enableRtl📄 Read: references/api.md
RatingItemEventArgs, RatingHoverEventArgs, RatingChangedEventArgsLabelPosition and PrecisionType enums| Prop | Type | Default | Purpose |
|---|---|---|---|
value | number | 0.0 | Current rating value |
itemsCount | number | 5 | Number of rating items |
min | number | 0.0 | Minimum selectable value |
precision | PrecisionType | string | Full | Rating granularity |
allowReset | boolean | false | Show reset button |
readOnly | boolean | false | Prevent user interaction |
disabled | boolean | false | Disable the component |
visible | boolean | true | Show/hide the component |
showLabel | boolean | false | Show current value label |
labelPosition | LabelPosition | string | Right | Label placement |
showTooltip | boolean | true | Show hover tooltips |
enableSingleSelection | boolean | false | Only one item selected |
enableAnimation | boolean | true | Hover animation |
enableRtl | boolean | false | Right-to-left mode |
cssClass | string | '' | Custom CSS class |
<UploaderComponent
asyncSettings={{ saveUrl: '/api/upload/save', removeUrl: '/api/upload/remove' }}
allowedExtensions=".pdf,.doc,.docx"
maxFileSize={5000000}
multiple={true}
/><UploaderComponent
asyncSettings={{ saveUrl: '/api/upload/save', removeUrl: '/api/upload/remove' }}
autoUpload={false}
buttons={{ browse: 'Choose File', clear: 'Clear All', upload: 'Upload All' }}
/><UploaderComponent
asyncSettings={{
saveUrl: '/api/upload/save',
removeUrl: '/api/upload/remove',
chunkSize: 500000 // 500 KB chunks
}}
/>import React, { useState } from 'react';
import { NumericTextBoxComponent } from '@syncfusion/ej2-react-inputs';
import '@syncfusion/ej2-base/styles/material3.css';
import '@syncfusion/ej2-buttons/styles/material3.css';
import '@syncfusion/ej2-inputs/styles/material3.css';
export default function App() {
const [value, setValue] = useState(10);
return (
<div style={{ padding: '20px' }}>
<h3>Enter a Number</h3>
<NumericTextBoxComponent
value={value}
onChange={(e) => setValue(e.value)}
min={0}
max={100}
step={1}
/>
<p>Current Value: {value}</p>
</div>
);
}<NumericTextBoxComponent
value={99.99}
format="c2"
min={0}
placeholder="Enter amount"
/><NumericTextBoxComponent
value={50}
format="p"
min={0}
max={100}
/><NumericTextBoxComponent
value={10}
decimals={0}
step={1}
min={0}
/><NumericTextBoxComponent
value={25}
min={0}
max={100}
strictMode={true}
placeholder="0-100"
/><div>
<label>Product Quantity:</label>
<NumericTextBoxComponent
value={qty}
onChange={(e) => setQty(e.value)}
min={1}
step={1}
prefix="Units: "
/>
</div>import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';
import './App.css';
export default function App() {
return (
<TextBoxComponent
placeholder="Enter your name"
floatLabelType="Auto"
/>
);
}import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';
import { useRef } from 'react';
export default function App() {
const textboxRef = useRef(null);
const handleCreate = () => {
if (textboxRef.current) {
textboxRef.current.addIcon('append', 'e-icons e-input-popup-date');
}
};
return (
<TextBoxComponent
placeholder="Enter date"
floatLabelType="Auto"
ref={textboxRef}
created={handleCreate}
/>
);
}import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';
export default function App() {
return (
<TextBoxComponent
placeholder="Enter your email"
floatLabelType="Auto"
showClearButton={true}
/>
);
}import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';
export default function App() {
return (
<TextBoxComponent
multiline={true}
placeholder="Enter your address"
floatLabelType="Auto"
/>
);
}import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';
import { useState } from 'react';
export default function ValidationForm() {
const [cssClass, setCssClass] = useState('');
return (
<div>
<TextBoxComponent
placeholder="Enter username"
cssClass={cssClass}
floatLabelType="Auto"
input={(e: any) => {
if (!e.value) setCssClass('');
else if (e.value.length < 3) setCssClass('e-error');
else if (e.value.length < 6) setCssClass('e-warning');
else setCssClass('e-success');
}}
/>
</div>
);
}import * as React from 'react';
import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';
import { useRef, useState } from 'react';
export default function PasswordInput() {
const textboxRef = useRef<TextBoxComponent>(null);
const [isVisible, setIsVisible] = useState(false);
const toggleVisibility = () => {
if (textboxRef.current) {
const newVisibility = !isVisible;
textboxRef.current.type = newVisibility ? 'text' : 'password';
setIsVisible(newVisibility);
}
};
function appendTemplate(): JSX.Element {
return (
<>
<span className="e-input-separator"></span>
<span
className={`e-icons ${isVisible ? 'e-eye-slash' : 'e-eye'}`}
onClick={toggleVisibility}
style={{ cursor: 'pointer' }}
></span>
</>
);
}
return (
<TextBoxComponent
ref={textboxRef}
type="password"
placeholder="Enter password"
floatLabelType="Auto"
appendTemplate={appendTemplate}
/>
);
}import * as React from 'react';
import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';
export default function EmailInput() {
function prependTemplate(): JSX.Element {
return (
<>
<span className="e-icons e-user"></span>
<span className="e-input-separator"></span>
</>
);
}
function appendTemplate(): JSX.Element {
return (
<>
<span className="e-input-separator"></span>
<span>.com</span>
</>
);
}
return (
<TextBoxComponent
type="email"
placeholder="Enter email"
floatLabelType="Auto"
prependTemplate={prependTemplate}
appendTemplate={appendTemplate}
/>
);
}import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';
export default function RoundedCornerTextBox() {
return (
<TextBoxComponent
placeholder="Enter Date"
cssClass="e-corner"
/>
);
}import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';
export default function DisabledTextBox() {
return (
<TextBoxComponent
placeholder="Enter Name"
enabled={false}
/>
);
}import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';
export default function RTLTextBox() {
return (
<TextBoxComponent
placeholder="أدخل اسمك"
floatLabelType="Auto"
enableRtl={true}
/>
);
}import { TextBoxComponent } from '@syncfusion/ej2-react-inputs';
import { useRef } from 'react';
export default function AutoSizeTextbox() {
const textboxRef = useRef(null);
const handleInput = () => {
if (textboxRef.current) {
const elem = textboxRef.current.respectiveElement;
elem.style.height = 'auto';
elem.style.height = elem.scrollHeight + 'px';
}
};
const handleCreate = () => {
if (textboxRef.current) {
textboxRef.current.addAttributes({ rows: 1 });
}
handleInput();
};
return (
<TextBoxComponent
multiline={true}
placeholder="Enter your message"
floatLabelType="Auto"
ref={textboxRef}
created={handleCreate}
input={handleInput}
/>
);
}npm install @syncfusion/ej2-react-buttons --save
# Then run: npm audit/* src/App.css */
@import "../node_modules/@syncfusion/ej2-base/styles/tailwind3.css";
@import "../node_modules/@syncfusion/ej2-buttons/styles/tailwind3.css";import { CheckBoxComponent } from '@syncfusion/ej2-react-buttons';
import * as React from 'react';
import './App.css';
function App() {
return (
<div>
<CheckBoxComponent label="Accept Terms" />
</div>
);
}
export default App;import { CheckBoxComponent } from '@syncfusion/ej2-react-buttons';
import { ChangeEventArgs } from '@syncfusion/ej2-react-buttons';
import * as React from 'react';
function App() {
const [isChecked, setIsChecked] = React.useState(false);
const handleChange = (args: ChangeEventArgs) => {
setIsChecked(args.checked);
};
return (
<CheckBoxComponent
label="Subscribe to newsletter"
checked={isChecked}
change={handleChange}
/>
);
}
export default App;import { CheckBoxComponent } from '@syncfusion/ej2-react-buttons';
import * as React from 'react';
function App() {
return (
<ul>
{/* Parent: indeterminate when some children are selected */}
<li><CheckBoxComponent label="Select All" indeterminate={true} /></li>
<li><CheckBoxComponent label="Option A" checked={true} /></li>
<li><CheckBoxComponent label="Option B" /></li>
</ul>
);
}
export default App;import { CheckBoxComponent, ButtonComponent } from '@syncfusion/ej2-react-buttons';
import * as React from 'react';
function App() {
return (
<form>
<CheckBoxComponent name="hobby" value="Reading" label="Reading" checked={true} />
<CheckBoxComponent name="hobby" value="Gaming" label="Gaming" />
<ButtonComponent isPrimary={true}>Submit</ButtonComponent>
</form>
);
}
export default App;npm install @syncfusion/ej2-react-inputs --save
# Then run: npm audit/* src/App.css */
@import "../node_modules/@syncfusion/ej2-base/styles/tailwind3.css";
@import "../node_modules/@syncfusion/ej2-inputs/styles/tailwind3.css";import { SignatureComponent } from '@syncfusion/ej2-react-inputs';
import * as React from 'react';
import './App.css';
function App() {
return (
<div>
<SignatureComponent id="signature" />
</div>
);
}
export default App;import { SignatureComponent, SignatureChangeEventArgs } from '@syncfusion/ej2-react-inputs';
import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import * as React from 'react';
import { useRef } from 'react';
function App() {
const sigRef = React.useRef<SignatureComponent>(null);
const [canUndo, setCanUndo] = React.useState(false);
const [canRedo, setCanRedo] = React.useState(false);
const [isEmpty, setIsEmpty] = React.useState(true);
function handleChange(args: SignatureChangeEventArgs) {
if (sigRef.current) {
setCanUndo(sigRef.current.canUndo());
setCanRedo(sigRef.current.canRedo());
setIsEmpty(sigRef.current.isEmpty());
}
}
return (
<div>
<ButtonComponent disabled={!canUndo} onClick={() => sigRef.current?.undo()}>Undo</ButtonComponent>
<ButtonComponent disabled={!canRedo} onClick={() => sigRef.current?.redo()}>Redo</ButtonComponent>
<ButtonComponent disabled={isEmpty} onClick={() => sigRef.current?.clear()}>Clear</ButtonComponent>
<SignatureComponent id="signature" ref={sigRef} change={handleChange} />
</div>
);
}
export default App;import { SignatureComponent } from '@syncfusion/ej2-react-inputs';
import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import * as React from 'react';
function App() {
const sigRef = React.useRef<SignatureComponent>(null);
function saveSignature() {
sigRef.current?.save('Png', 'MySignature');
}
return (
<div>
<SignatureComponent id="signature" ref={sigRef} />
<ButtonComponent onClick={saveSignature}>Save as PNG</ButtonComponent>
</div>
);
}
export default App;import { OtpInputComponent } from '@syncfusion/ej2-react-inputs';
import * as React from 'react';
import './App.css';
function App() {
return (
<div id="container">
<OtpInputComponent id="otpinput" />
</div>
);
}
export default App;@import "../node_modules/@syncfusion/ej2-base/styles/tailwind3.css";
@import "../node_modules/@syncfusion/ej2-inputs/styles/tailwind3.css";npm install @syncfusion/ej2-react-inputs --savenpm install @syncfusion/ej2-react-inputs --savenpm install @syncfusion/ej2-react-inputs --saveimport { OtpInputComponent, OtpChangedEventArgs } from '@syncfusion/ej2-react-inputs';
import * as React from 'react';
function App() {
const handleValueChanged = (args: OtpChangedEventArgs) => {
console.log('Complete OTP:', args.value);
// Call your API verification here
};
return (
<OtpInputComponent
id="otpinput"
length={6}
autoFocus={true}
valueChanged={handleValueChanged}
/>
);
}import { OtpInputComponent } from '@syncfusion/ej2-react-inputs';
import * as React from 'react';
function App() {
return (
<OtpInputComponent
id="otpinput"
type="password"
length={6}
cssClass="e-error"
placeholder="*"
/>
);
}import { OtpInputComponent } from '@syncfusion/ej2-react-inputs';
import * as React from 'react';
function App() {
return (
<OtpInputComponent
id="otpinput"
type="text"
length={6}
separator="-"
textTransform="uppercase"
stylingMode="filled"
/>
);
}import { TextAreaComponent } from '@syncfusion/ej2-react-inputs';
import * as React from 'react';
import './App.css';
function App() {
const [textValue, setTextValue] = React.useState('');
const handleChange = (args) => {
console.log('TextArea value changed:', args.value);
};
return (
<div className='wrap'>
<TextAreaComponent
id='default'
placeholder='Enter your comments'
value={textValue}
change={handleChange}
floatLabelType='Auto'
rows={5}
cols={40}
/>
</div>
);
}
export default App;<TextAreaComponent
name='comments'
placeholder='Your feedback'
floatLabelType='Auto'
required={true}
maxLength={500}
showClearButton={true}
/>const [value, setValue] = React.useState('');
<TextAreaComponent
value={value}
input={(args) => setValue(args.value)}
/><TextAreaComponent
placeholder='Enter text'
cssClass='e-outline e-small'
floatLabelType='Auto'
/><TextAreaComponent placeholder='Disabled' enabled={false} />
<TextAreaComponent placeholder='Read-only' readonly={true} /><TextAreaComponent
placeholder='Message'
prependTemplate={() => <span className='icon'>📝</span>}
appendTemplate={() => <button>Send</button>}
/>import React from 'react';
import { SliderComponent } from '@syncfusion/ej2-react-inputs';
import '@syncfusion/ej2-react-inputs/styles/material.css';
function App() {
return (
<div>
<SliderComponent
id="slider"
value={30}
min={0}
max={100}
/>
</div>
);
}
export default App;import React from 'react';
import { SliderComponent } from '@syncfusion/ej2-react-inputs';
import '@syncfusion/ej2-react-inputs/styles/material.css';
function App() {
const [range, setRange] = React.useState([30, 70]);
return (
<div>
<SliderComponent
id="range-slider"
type="Range"
value={range}
change={(e) => setRange(e.value)}
min={0}
max={100}
/>
</div>
);
}
export default App;import React from 'react';
import { SliderComponent } from '@syncfusion/ej2-react-inputs';
import '@syncfusion/ej2-react-inputs/styles/material.css';
function PriceRangeSelector() {
const [priceRange, setPriceRange] = React.useState([100, 500]);
const tooltip = {
placement: 'Before',
isVisible: true,
format: 'C2' // Currency format
};
return (
<div>
<h3>Price Range: ${priceRange[0]} - ${priceRange[1]}</h3>
<SliderComponent
id="price-slider"
type="Range"
value={priceRange}
change={(e) => setPriceRange(e.value)}
min={0}
max={1000}
step={10}
tooltip={tooltip}
/>
</div>
);
}
export default PriceRangeSelector;<SliderComponent
id="default-slider"
value={40}
min={0}
max={100}
step={5}
ticks={{
placement: 'After',
largeStep: 20,
smallStep: 5,
showSmallTicks: true
}}
/><SliderComponent
id="limited-range"
type="Range"
value={[25, 75]}
limits={{
enabled: true,
minStart: 10,
minEnd: 40,
maxStart: 60,
maxEnd: 90
}}
tooltip={{ isVisible: true }}
/><SliderComponent
id="currency-slider"
type="Range"
value={[1000, 5000]}
min={0}
max={10000}
step={100}
tooltip={{
isVisible: true,
format: 'C0' // Currency without decimals
}}
ticks={{
placement: 'After',
largeStep: 2000,
format: 'C0'
}}
/><div style={{ height: '300px', width: '100px' }}>
<SliderComponent
id="vertical-slider"
value={50}
orientation="Vertical"
tooltip={{ isVisible: true }}
/>
</div><SliderComponent
id="button-slider"
type="Range"
value={[30, 70]}
showButtons={true}
tooltip={{ isVisible: true }}
/>import { ColorRangeDataModel } from '@syncfusion/ej2-react-inputs';
const colorRange: ColorRangeDataModel[] = [
{ color: '#ff4040', start: 0, end: 33 }, // Low zone — red
{ color: '#ffb300', start: 34, end: 66 }, // Mid zone — amber
{ color: '#00c853', start: 67, end: 100 } // High zone — green
];
<SliderComponent
id="color-slider"
type="MinRange"
value={50}
colorRange={colorRange}
tooltip={{ isVisible: true, showOn: 'Always' }}
/><SliderComponent
id="size-slider"
customValues={['XS', 'S', 'M', 'L', 'XL', 'XXL']}
value="M"
tooltip={{ isVisible: true }}
/><SliderComponent
id="status-slider"
type="MinRange"
value={65}
min={0}
max={100}
readonly={true}
tooltip={{ isVisible: true, showOn: 'Always' }}
ticks={{ placement: 'After', largeStep: 20 }}
/>/* src/App.css */
@import "../node_modules/@syncfusion/ej2-base/styles/tailwind3.css";
@import "../node_modules/@syncfusion/ej2-buttons/styles/tailwind3.css";
@import "../node_modules/@syncfusion/ej2-react-inputs/styles/tailwind3.css";
@import "../node_modules/@syncfusion/ej2-popups/styles/tailwind3.css";
@import "../node_modules/@syncfusion/ej2-splitbuttons/styles/tailwind3.css";import { ColorPickerComponent } from '@syncfusion/ej2-react-inputs';
import * as React from 'react';
import './App.css';
function App() {
return (
<div id="container">
<div className="wrap">
<h4>Choose Color</h4>
<ColorPickerComponent id="color-picker" />
</div>
</div>
);
}
export default App;<ColorPickerComponent inline={true} showButtons={false} /><ColorPickerComponent mode="Palette" modeSwitcher={false} showButtons={false} />import { ColorPickerEventArgs } from '@syncfusion/ej2-react-inputs';
function App() {
function onChange(args: ColorPickerEventArgs): void {
console.log(args.currentValue.hex); // e.g. "#ff5733"
console.log(args.currentValue.rgba); // e.g. "rgba(255,87,51,1)"
}
return <ColorPickerComponent value="#ff5733" change={onChange} />;
}const presets: { [key: string]: string[] } = {
'brand': ['#0078d4', '#106ebe', '#005a9e', '#004578'],
'accents': ['#e81123', '#ff8c00', '#00b294', '#68217a']
};
<ColorPickerComponent
mode="Palette"
presetColors={presets}
columns={4}
modeSwitcher={false}
inline={true}
showButtons={false}
/><ColorPickerComponent enableOpacity={false} /><ColorPickerComponent
mode="Palette"
noColor={true}
modeSwitcher={false}
showButtons={false}
/>import { L10n } from '@syncfusion/ej2-base';
L10n.load({
'de-DE': {
'colorpicker': { Apply: 'Anwenden', Cancel: 'Abbrechen', ModeSwitcher: 'Modus wechseln' }
}
});
<ColorPickerComponent locale="de-DE" />import * as React from 'react';
import { MaskedTextBoxComponent } from '@syncfusion/ej2-react-inputs';
import '../node_modules/@syncfusion/ej2-base/styles/tailwind3.css';
import '../node_modules/@syncfusion/ej2-react-inputs/styles/tailwind3.css';
export default function App() {
return (
<MaskedTextBoxComponent
mask="000-000-0000"
placeholder="Enter phone number"
floatLabelType="Auto"
/>
);
}<MaskedTextBoxComponent mask="000-000-0000" placeholder="Phone" floatLabelType="Always" /><MaskedTextBoxComponent
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]"
placeholder="IP Address (ex: 212.212.111.222)"
floatLabelType="Always"
/>const chars = { P: 'P,A,p,a', M: 'M,m' };
<MaskedTextBoxComponent
mask="00:00 >PM"
customCharacters={chars}
placeholder="Time (ex: 10:00 PM)"
floatLabelType="Always"
/>const maskRef = React.useRef(null);
// Later:
const maskedVal = maskRef.current.getMaskedValue(); // e.g., "123-456-7890"
const rawVal = maskRef.current.value; // e.g., "1234567890"const [phone, setPhone] = React.useState('');
<MaskedTextBoxComponent
mask="000-000-0000"
value={phone}
change={(e) => setPhone(e.value)}
placeholder="Phone"
floatLabelType="Auto"
/>/* src/App.css */
@import "../node_modules/@syncfusion/ej2-base/styles/tailwind3.css";
@import "../node_modules/@syncfusion/ej2-react-inputs/styles/tailwind3.css";
@import "../node_modules/@syncfusion/ej2-popups/styles/tailwind3.css";import { RatingComponent } from '@syncfusion/ej2-react-inputs';
import * as React from 'react';
import './App.css';
function App() {
return (
<RatingComponent id="rating" value={3} />
);
}
export default App;import { RatingComponent, RatingChangedEventArgs } from '@syncfusion/ej2-react-inputs';
import * as React from 'react';
function App() {
const [rating, setRating] = React.useState(3);
const handleValueChanged = (args: RatingChangedEventArgs) => {
setRating(args.value);
};
return (
<RatingComponent
id="rating"
value={rating}
valueChanged={handleValueChanged}
/>
);
}
export default App;import { RatingComponent, PrecisionType } from '@syncfusion/ej2-react-inputs';
import * as React from 'react';
function App() {
return (
<RatingComponent
id="rating"
value={3.5}
precision={PrecisionType.Half}
showLabel={true}
/>
);
}
export default App;import { RatingComponent } from '@syncfusion/ej2-react-inputs';
import * as React from 'react';
function App() {
return (
<RatingComponent id="rating" value={4} readOnly={true} showTooltip={false} />
);
}
export default App;import { RatingComponent } from '@syncfusion/ej2-react-inputs';
import * as React from 'react';
function App() {
return (
<RatingComponent id="rating" value={3} allowReset={true} />
);
}
export default App;