Blocs for Mac 6.1 introduces a brand new feature to custom interactions that is going to be a real game changer and massively change the way you create interactions, it will allow you to do more with less!
You can now use the short code data() within your custom interactions to retrieve custom attribute data from the trigger element.
How it Works
Let me explain how this all works.
I have a button that I am using to trigger a custom interaction.
I have a data attribute added to this button (data-target-page) that contains a link to another page.
Within the Custom Interaction that this button is connected to, I use the new data() short code to get this attribute and feed it into a navigate to URL rule.
The benefit of this is, I can now use a single interaction on multiple buttons rather than create a separate interaction to link to each page. All I have to do is change the custom data attribute on the trigger element (in this case a button) and this will effect how the interaction works.
You can feed these data() values into into any of the text fields with your Custom Interaction Rules and you can use any type of string data to pass into the interaction. So you could feed in an elements ID string or a colour hex code string, whatever you want really.
Currently data() will only work on elements that trigger interactions, it will not work on the page load or scroll trigger.