Getting Started with Smart HTML Elements

Depending on your preferences and the requirements of your project, you can:

Hosting Smart HTML Elements in Your Project

To host Smart HTML Elements in your project, you need to:

  • Download Smart HTML Elements
  • Add the CSS and JavaScript references.

Download Smart HTML Elements

After you download any of the Smart HTML Elements bundles, the folders listed below are hosted in your local repository.

/demos The folder contains quick-start demo files. It is recommended that you open them through a web server instead of folder from the file system, because that approach breaks the Ajax data requests.
/source Contains the minified JavaScript files.
/source/styles Consists of the minified CSS files and theme images.
readme.htm Provides the Smart HTML Elements release notes.

Add CSS and JavaScript References

To use Smart HTML Elements your project, include the required JavaScript and CSS files.

Step 1 Extract the /source and /styles folders from the bundle archive and copy them to your web application root folder.

Step 2 Include the Smart HTML Elements Javascript and CSS files in the head tag of your HTML document..

<!DOCTYPE html>  
 <html lang="en">  
    <link rel="stylesheet" href="source/styles/smart.default.css" type="text/css" />  
    <script type="text/javascript" src=""></script>  
    <script type="text/javascript" src="source/smart.element.js"></script>  
    <script type="text/javascript" src="source/smart.elements.js"></script>  
    <smart-button id="button">Click Me</smart-button>  

WebComponents polyfills should be the first referenced javascript files in the header of the page since not all browsers support Custom Elements natively.