I want to the user to hit the switch so a light box appears. whats the code
Hey, Shumile!
You will need to add an event handler to your switch element. Click the element, then hover over an event (in the properties panel, e.g. onClick) and click the plus sign to add its event handler. The code panel automatically opens, and the function for the event handler is added to your page.
You will need to add code to the function to tell your site what should happen when the event occurs (lightbox pops up in your case). Check the relevant API here .
Your code should look something like this:
import wixWindow from ‘wix-window’;
export function switch1_click(event) {
wixWindow.openLightbox(“LightboxName”);
}