Compatibility with Essential JS 2 Components

7 Jun 20234 minutes to read

The Essential JS 1 components can be compatible with the Essential JS 2 components in the same web page. For this we need to follow the below steps,

Script Compatibility

We should maintain the script reference order (refer Essential JS 1 before Essential JS 2) for this, and we should extend the Essential JS 1 namespace with Essential JS 2.
Please find the below code for script references.

  • HTML
  • <!-- Essential JS 1 script -->
    <script src=""></script>
    <!-- Essential JS 2 script -->
    <script src="" type="text/javascript"></script>
        //Extend ej namespace with Syncfusion
          $.extend(ej, Syncfusion)

    Theme Compatibility

    We have provided compatibility css files for all the Essential JS 1 web components in all the themes, since we have used same classes for Essential JS 1 and Essential JS 2 components. So, the both classes were overrides with each other. We have provided this support for all the themes which are available in Essential JS 1.

    You can find the compatibility theme files which are ends with the name compatibility in the below mentioned location.

    widgets.core - (installed location) \Syncfusion\Essential Studio{RELEASE_VERSION}\ JavaScript\assets\css\web\ej.widgets.core.compatibility.min.css
    theme - (installed location)\Syncfusion\Essential Studio{RELEASE_VERSION}\ JavaScript\assets\css\web\default-theme\ej.theme.compatibility.min.css


    We have illustrated flat azure theme in this document. However, all the themes in Essential JS 1 have compatibility support.

    Compatibility Themes

    1. Bootstrap
    2. Azure and its variants (Flat, Dark, Gradient)
    3. Saffron and its variants
    4. Lime and its variants
    5. High Contrast 01
    6. High Contrast 02
    7. Material
    8. Office 365

    You can get the compatibility css in the following way.

    • You can get the compatibility theme files from the below build installed location.

    **(installed location) **\Syncfusion\Essential Studio\ {RELEASE_VERSION} \ JavaScript\assets\css\web

    Creating Sample Application for Essential JS 1 Component

    Create Essential JS 1 Button

    You can refer the Getting Started to create the button component. Now you can modify the sample’s css references as below to refer the compatibility themes.

    Please refer the below code snippet.

  • HTML
  • <!-- Style sheet for default theme (flat Azure) -->
    <link href="" rel="stylesheet" />

    Add Essential JS 2 Button

    You can refer the Getting Started for button creation and made the Essential JS 2 related changes in the same html file.

    Please find the below html code.

  • HTML
  • <!DOCTYPE html>
    <html xmlns="">
        <title>Essential JS 2 - Essential JS 1</title>
        <!-- Essential JS 1 default theme -->
        <link href=" " rel="stylesheet" type="text/css" />
        <!-- Essential JS 2 material theme -->
        <link href="" rel="stylesheet" type="text/css" />
        <!-- Essential JS 1 scripts -->
        <script src="" type="text/javascript"></script>
        <script src="" type="text/javascript"></script>
        <script src="" type="text/javascript"></script>
        <!-- Essential JS 2 script -->
        <script src="" type="text/javascript"></script>
        <div style="margin: 50px;">
            <!-- Add HTML Button element for Essential JS 2 -->
            <button id="btn2">Essential JS 2</button>
    	<div style="margin: 50px;">
            <!-- Add HTML Button element for Essential JS 1 -->
            <button id="btn1">Essential JS 1</button>

    Please find the below Javascript code.

  • HTML
  • <script>
       // Extend ej namespace with Syncfusion
       $.extend(ej, Syncfusion);
       // Initialize Essential JS 1 JavaScript Button component
       // Initialize Essential JS 2 JavaScript Button component
       var button = new ej.buttons.Button({});

    Run the Sample

    Now run the html page which contains Essential JS 1 Button and Essential JS 2 Button and the output look like below,