Custom Widget Parameters

Custom Widget Parameters

Parameters allow you to send a list of keys and values to your custom widget.

One use of these parameters is to change the way your code behaves. You can have two widgets pointing to the same link, but exhibiting different behaviors.

Each parameter may have a unique key and a value. The key will be used in your code to retrieve the parameter's value.

You can specify up to 20 parameters.


Usage in code

Before reading this section, you should read the Custom Widget tutorial in order to understand how the code works.

In your code, the parameters will be received in the onStart function, like so:

window.TagoIO.onStart((widget) => {
  const display = widget.display;

  const parameters = display.parameters;

  const parameter1 = parameters[0];
  const parameter2 = parameters[1];
});

    • Related Articles

    • Custom Widget

      Custom widgets allow developers to incorporate powerful content in their own widget for their dashboards. Creating your own The sky's the limit when using this widget. You can build your widget using Angular, React, Vue.js, or even plain old ...
    • Heat Map Widget

      With the Heat Map widget, you can build a colorful layer with bubbles representing the intensity of the variables on top of your image. The higher the value of the variable, the more red the bubble will be, and you can also add a heat scale to this ...
    • Card Widget

      Use Card to display the last value of a variable, its unit, and a mini-chart. Card accepts links so that when users click on it, it may redirect them to another website, dashboard, or tab.  This widget also accepts features like metadata, that can be ...
    • Keypad Widget

      Keypad allows the user to submit a pin code along with an optional action string. This widget is ideal to represent an alarm or to request a PIN code to unlock a resource. Creating your own To add it to your dashboard, choose the Keypad widget from ...
    • Compose Widget

      The compose widget allows you to add pins to different images and videos. You can manipulate the colors, values, and icons for each pin. This widget also accepts features like metadata and series, that can be set in your variable data. Creating your ...

      Aug 30 - Join us at TagoIO Connect Global, our annual conference. Learn new features and use cases. Register Here


        Future and past Webinars