Web Design » InVision » How do you add an overlay to InVision?

How do you add an overlay to InVision?

Last updated on December 19, 2022 @ 5:46 pm

Adding an overlay to InVision is relatively easy. You can follow these steps:

1. First, make sure that the InVision app is open. Then, go to the File menu and select “New Overlay.”

2. You will be prompted to choose a name for your overlay, and then you will be able to select a template from the available options.

3. Once you have created your overlay, you will need to add the code for the overlay to your project. To do this, open the “InVision Overlay” file in your project and locate the “InVision.js” file.

4. Add the following code to the “InVision.js” file:

  • InVision.overlay = {}; InVision.overlay.init = function() {}; InVision.init.done = function() {}; InVision.fail = function() {}; InVision.progress = function() {}; InVision.total = 0; InVision.loaded = function() {}; InVision.loaded.total = 1;

5. Next, you will need to add the code for the overlay to your project’s main() function. Open “main.js” and add the following code:

  • InVision.init(); InVision.overlay.init();

6. Finally, you will need to add the code for the overlay to the document.body element. Open “index.html” and add the code.

PRO TIP: Overlays can be added to InVision projects in a few different ways. The most common way is to add an image file as an overlay. This can be done by going to the “Add Overlay” button in the top toolbar and selecting “Image File.” Another way to add an overlay is to create a new layer in InVision and add your image to that layer.

Conclusion

Adding an overlay to InVision is relatively easy. Once you have created your overlay, you will need to add the code for the overlay to your project’s main() function.

Dale Leydon

Dale Leydon

Sysadmin turned Javascript developer. Owner of 20+ apps graveyard, and a couple of successful ones.