Getting Started with React Components via CDN – Zero Build Setup
This section explains how to add Syncfusion® React components to a browser-based project using CDN services like esm.sh. It's a quick way to integrate components without build tools, perfect for demos or simple setups using modern ES modules.
What is esm.sh?
esm.sh is an ES Module CDN that turns npm packages into native ES modules. You can load Syncfusion® React packages directly in the browser, enabling modern module use in HTML documents.
Prerequisites
System requirements for Syncfusion® React UI components
Setting up import maps
This guide uses the React Message component as an example. To get started, set up your module paths for React and Syncfusion packages in the HTML file with this code:
Add Syncfusion® CSS styles
Syncfusion® React components come with built-in themes. Add this CSS link to the HTML <head> tag:
Add Syncfusion® React component
Next, add a script to the HTML to render a Syncfusion® component with React. Here's what the full HTML looks like:
Open in the browser
Open the index.html file in a browser to see the Syncfusion® React Message component render like this: