syncfusion-react-common
Common Features in Syncfusion React Components
Syncfusion React components include comprehensive common utilities and features that enhance user experience, ensure cross-cultural support, and provide foundational capabilities across all components. This skill covers installation setup, animations, globalization, state management, and security considerations for building robust React applications.
Table of Contents
Navigation Guide
Getting Started & Framework Setup
📄 Read: references/getting-started.md
- Framework integration (Next.js, Remix, Vite, Preact, SharePoint)
- Package installation and CSS imports
- Component initialization
- Quick start examples
Globalization
📄 Read: references/globalization.md
- Right-to-left (RTL) support for Arabic, Hebrew, Persian languages
- Localization (l10n) for multi-language support
- Internationalization (i18n) with CLDR data
- Number and currency formatting
- Date and time formatting
Advanced Features & Utilities
📄 Read: references/advanced-features.md
- Animation effects (FadeIn, ZoomOut, SlideUp, etc.)
- Animation timing (duration, delay, global settings)
- Drag-and-drop interactions (Draggable, Droppable)
- Template customization and optimization
- State persistence with enablePersistence
- Security best practices and HTML sanitization
Quick Start
Install Syncfusion React Package
npm install @syncfusion/ej2-react-grids@latest --save
Note: The
@syncfusion/ej2-basepackage is a dependency for all Syncfusion components and will be automatically installed when you install any Syncfusion React package. You don't need to explicitly add it to yourpackage.jsonfile.
Import Styles
@import "../node_modules/@syncfusion/ej2-base/styles/tailwind3.css";
@import "../node_modules/@syncfusion/ej2-buttons/styles/tailwind3.css";
@import "../node_modules/@syncfusion/ej2-calendars/styles/tailwind3.css";
@import "../node_modules/@syncfusion/ej2-dropdowns/styles/tailwind3.css";
@import "../node_modules/@syncfusion/ej2-inputs/styles/tailwind3.css";
@import "../node_modules/@syncfusion/ej2-navigations/styles/tailwind3.css";
@import "../node_modules/@syncfusion/ej2-popups/styles/tailwind3.css";
@import "../node_modules/@syncfusion/ej2-react-grids/styles/tailwind3.css";
Register License Key
Step 1: Set the environment variable:
# Windows
setx SYNCFUSION_LICENSE "Your_License_Key_Here"
# Mac/Linux
export SYNCFUSION_LICENSE='Your_License_Key_Here'
Step 2: Activate the license using NPX command:
npx syncfusion-license activate
Note: For alternative license registration methods, kindly refer to the Syncfusion license key registration documentation.
Basic Component Setup
import * as React from 'react';
import { GridComponent, ColumnsDirective, ColumnDirective, Inject, Page } from '@syncfusion/ej2-react-grids';
function App() {
const data = [
{ OrderID: 10248, CustomerID: 'VINET', Freight: 32.38 },
{ OrderID: 10249, CustomerID: 'TOMSP', Freight: 11.61 }
];
return (
<GridComponent dataSource={data} allowPaging={true}>
<ColumnsDirective>
<ColumnDirective field='OrderID' width='100' />
<ColumnDirective field='CustomerID' width='100' />
<ColumnDirective field='Freight' width='100' format="C2" />
</ColumnsDirective>
<Inject services={[Page]} />
</GridComponent>
);
}
export default App;
Common Features
Enable State Persistence
<GridComponent dataSource={data} enablePersistence={true}>
{/* Component content */}
</GridComponent>
Enable RTL Support
import { enableRtl } from '@syncfusion/ej2-base';
// Global RTL enablement
enableRtl(true);
// OR per-component
<ListViewComponent enableRtl={true} />
Add Animation Effects
import { Animation } from '@syncfusion/ej2-base';
useEffect(() => {
const animation = new Animation({ duration: 5000, delay: 2000 });
animation.animate(element, { name: 'FadeOut' });
}, []);
Implement Drag-and-Drop
import { Draggable, Droppable } from '@syncfusion/ej2-base';
useEffect(() => {
const draggable = new Draggable(document.getElementById('draggable'), { clone: false });
const droppable = new Droppable(document.getElementById('droppable'), {
drop: (e) => {
e.droppedElement.textContent = 'Dropped!';
}
});
}, []);
More from syncfusion/react-ui-components-skills
syncfusion-react-grid
Implements Syncfusion React Grid component for feature-rich data tables and grids. Use this when working with data display, sorting, filtering, grouping, aggregates, editing, or exporting. This skill covers grid configuration, CRUD operations, virtual scrolling or infinite scrolling, hierarchy grids, state persistence, and advanced data management features for data-intensive applications.
122syncfusion-react-rich-text-editor
Implements the Syncfusion React Rich Text Editor (RichTextEditorComponent) from ej2-react-richtexteditor, supporting HTML (WYSIWYG) and Markdown editing. Use this skill for toolbar configuration, image/video/audio insertion, paste cleanup, AI assistant integration, emoji picker, slash menu, mentions, import/export Word/PDF, form validation, and source code view in React applications.
118syncfusion-react-themes
Use this skill when users need to apply themes, customize appearance, switch dark mode, use CSS variables, configure icons, or modify visual styling for Syncfusion React components. Covers icon library, size modes, and Theme Studio integration.
116syncfusion-react-scheduler
Implement Syncfusion React Scheduler component for calendar, event scheduling, and appointment management. Use this when building scheduling systems, calendar applications, booking systems, or time management interfaces. Covers all scheduler views (Day, Week, Month, Timeline, Agenda, Year), data binding, resource scheduling, recurring events, CRUD operations, drag-and-drop scheduling, customization, accessibility, and advanced features.
116syncfusion-react-treegrid
Implements Syncfusion React TreeGrid for hierarchical data with sorting, filtering, editing, exporting, paging, virtual scrolling, and advanced features. Supports configuration, CRUD, aggregates, templates, state persistence, and performance optimization in React applications.
114syncfusion-react-gantt-chart
Implement, configure, and customize the Syncfusion React Gantt Chart component. Use this when building project scheduling applications with task timelines, dependencies, and resource management. Covers GanttComponent setup, task constraints, taskbar customization, filtering, sorting, Excel/PDF export, critical path analysis, milestones, predecessors, resource view, and baseline tracking.
113