Usage in JavaScript Web Frameworks

To use the commspace-embedded-dashboard, follow the steps below:

  1. Load the script in your HTML file:
  2. <script type="module"
            src="https://assets.commspace.co.za/embedded-dashboard/commspace-embedded-dashboard.min.js"
            integrity="sha384-WXbtYiP1egRpFGFs2tAPpNzXzYQEjmcyhT9CqEnfn6zKT4fETYr/XvKZvY6B/xZE"
            crossorigin="anonymous">
    </script>
  3. Add the custom element anywhere in the <body> of your HTML file:
  4. <commspace-embedded-dashboard
        dashboardId="Dashboard ID"
        authKey="Auth Key"
        authToken="Auth Token"
        loaderSpinnerColor="#2596EB"
        loaderBackground="#F2F2F2">
    </commspace-embedded-dashboard>

Try it here