Installing Desktop

To start using Desktop, you need to:

  1. Include the necessary JS and CSS scripts into an HTML file.
  2. Call the object constructor.

Included Files

You need to include 4 files on a page:

<html>
 <head>
  <!-- Webix Library -->
  <script src="codebase/webix.js" type="text/javascript"></script>
  <link rel="stylesheet" href="codebase/webix.css" type="text/css">
 
  <!-- Desktop -->
  <script type="text/javascript" src="../../codebase/desktop.js"></script>
  <link rel="stylesheet" type="text/css" href="../../codebase/desktop.css" />
 </head>
 <body>
    <!-- Desktop constructor -->
    <script>
        function start(user) {
                webix.ready(function() {
                    if (webix.env.touch) webix.ui.fullScreen();
                    else if (webix.env.scrollSize) webix.CustomScroll.init();
                    desktop = webix.ui({
                        view: "desktop",
                        systemParams: user,
                        apps: myApps,
                    });
                });
            }
            login("someurl").then(start);
</script> </body> </html>

See the next chapter to learn more ways of creating Desktop on a page.

Running Package Samples Locally

To run package samples on a local machine, you should navigate to the Desktop root folder, install the necessary dependencies and start a development server as:

// navigate to root folder
cd files
 
// install dependencies
yarn install //or npm install
 
// start dev server
yarn server //or npm run server
Back to top