How to show/hide element?
When we create a new style class , we can set its condition based on the viewport width . Can we have a formula that returns the viewport width so we can also control the visibility of an element ? For example , show the element only if the viewport width is greater than 375 pixels . @Chris Laupama , you 're correct . We can achieve that through the styles class . However , for my use case , I need to show or hide a specific element based on the viewport width . To do this , I need a formula that returns the viewport width . Have access to this opens up numerous possibilities ! 🙏 I shared it in another thread function viewportWidth (args , ctx ) { window .addEventListener ( 'resize ' , function ( ) { const isBelowThreshold = window .innerWidth < args .width ; ctx .triggerActionEvent ( 'isBelow ' , isBelowThreshold ) } ) ; } it returns true /false for viewport size based on the width you put in Maybe I should just put this as a package lol But yeah , maybe an action for it would be nice I hope this helps @Patrick Mast - in this case I 'm making something disappear below a certain viewport width . https://www.tella.tv/video/disappearing-design-etvz 👍1



.jpeg/public)