Using Hype Data Magic for dynamic ads, utilizing built-in and custom handlers (208,2 KB)


Hi Max, first of all the Data Magic is incredible. Congrats!

I have a question, is it posible to edit the color of the tabs, or/and turn them on/off?

Thanks for all your contributions to Hype!


Yes, that would be done with custom handlers. Be aware that custom handlers need to reside in a script file for the preview of them to work (if you need a preview, that is). This is due to the “bug” that Hype sadly escapes certain characters in Head HTML, making code executed there in those circumstances unusable.

Here is a simple handler:

HypeDataMagic.addDataHandler('tabBackground', {
  DataMagicPrepareForDisplay: function (hypeDocument, element, event){
    if ( === 'true') { = 'green';
    } else { = 'red';

Depending on the use case, you can also use Hype Reactive Content, which works nicely with Hype Data Magic. In this library, you don't have a preview, and it works with custom dynamic data.


Thanks Max, you are the best!