HTML Canvas

Build your own custom widgets with the HTML Canvas


Ubidots offers off-the-shelf widgets to cover most visualization needs. However, some projects may require more specific and custom widgets. That's why we offer the HTML Canvas widget, which supports your own code to deliver custom visualizations.


HTML Canvas is a widget that enables the creation of custom widgets. It accomplishes this by letting the user write their own custom code using the following languages (as well as some Ubidots' built-in methods and third-party libraries which will be described later):

  • HTML

  • CSS

  • JavaScript

This widget features a code editor composed of three tabs, one for each language.

When to use the HTML Canvas?

Whenever the other available widgets don't meet a specific requirement in terms of functionality and/or style.

How to create an HTML Canvas?

Go to a dashboard, click the Add new widget button (+), scroll down to the Advanced section and select HTML Canvas.

Widget settings:

The widget offers the following settings:

  • Code editor

  • 3rd party libraries

  • Enable lazy loading

  • Preload Dashboard data

Widget appearance tab:

The appearence of the widget can be further customized with these options:

  • Name

  • Custom Style

Custom Style:

Check the Custom Style documentation here in order to know how to customize your HTML Canvas' styles.

Last updated