The Properties & Events panel allows you to add properties and functionality to your page elements. With the panel you can:
The Properties & Events panel is located to the right of the code editor.
Wix Studio
You can access the Properties & Events panel in the editor (Wix Studio and Wix Editor)
Wix Editor
The Properties & Events panel changes content when you select an element. The properties and event handlers listed in the panel differ based on the element that you select.
You can close and open the panel with the Properties & Events button in the toolbar:
All elements come with a default ID value. When you select an element, its ID is displayed in the panel. You can manually change the ID of your element. Assigning meaningful IDs to your elements can make your code easier to maintain.
Important:
If you change the ID of an element, make sure to update any existing code that uses the ID of that element.
Certain boolean properties for your selected element appear under the Default Values section of the panel. They allow you to set an element’s state when the page loads. This limits the need to set an element’s initial state with code, keeping your code cleaner and more concise. Set the element’s initial state by selecting or clearing the checkbox to the left of the property.
The available default state properties are:
Notes:
Event handlers appear under the Event Handlers section of the Properties & Events panel. Event handlers allow you to add code that defines what happens when site visitors interact with this element. Clicking on an event handler in the panel adds the event handler’s function declaration to your page code for you.
Like properties, event handlers are specific to the element. Common event handlers that appear in the panel for many elements include:
onBlur()
onClick()
onDblClick()
onFocus()
onMouseIn()
onMouseOut()
onViewportEnter()
onViewportLeave()
Other event handlers can appear in the panel depending on the element that is selected. For example, when a Gallery element is selected, the panel includes additional event handlers to some of the ones listed above, such as:
onCurrentItemChanged()
onItemClicked()
onPlay()
onPause()
See the Velo API reference for descriptions of all the event handlers for each element.
The Properties & Events panel in Wix Studio also comes with an AI Assistant button.
Use the AI assistant to help create interactive code for your event handlers. The AI assistant allows you to select an event handler and then describe what the code should do. It generates a code example that you can add to your page code.
It’s important to note that AI can make mistakes and that you should double check that any AI generated code is accurate before using it.
Note: The AI Assistant button is only supported in Wix Studio.