Studio Editor: Using the AI Assistant to Add Custom Code
Currently, this feature is in alpha mode.
Add custom code behaviors to elements, without any coding experience, using our AI assistant. Whether you're enhancing interactivity or creating tailored experiences, AI makes it simple. Focus on your creative vision while the assistant handles the technical coding, offering suggestions or implementing your own ideas.
How can I access the AI assistant?
There are 2 ways you can access the AI assistant for help with custom code – directly through the Code panel, or by selecting an element on the canvas. .
On the canvas: Right-click the element you want to customize and select Add Custom Behavior with AI.

Through the Code panel: Access the Code

panel on the left side of the editor and select AI Assistant.


Adding custom behavior with AI
Access the AI assistant from the Code panel, or right-click the specific element you want to customize. The assistant will send an initial message on your behalf – ‘What interactive behavior can you apply to (element ID)?’ — and offer tailored suggestions based on the element.
Pick a suggested behavior or describe the customization you have in mind. You’ll always have the chance to preview and approve the code before it’s added to your client’s site.
To add custom behavior with AI:
Right-click the relevant element.
Select Add Custom Behavior with AI.
Tip: This opens the chat with the AI assistant (within the Code panel) on the left side of the editor.
Review the AI assistant's suggestions for custom behaviors it can add.
Describe what you want to customize and click the Send icon

.
Tip: It doesn't have to be one of the suggestions if you had a different idea in mind. The AI assistant will evaluate and advise if it can add the customization you're thinking of.
Choose what to do next:
Refine the customization: Continue chatting to the AI assistant to clarify the specific customization you want it to add.
Preview the code: Click Show code to see the code AI intends to add. It also provides a breakdown of what the code does, clarifying how it applies the customization.
Add the code: Add the code to your client's site.
Click Add code.
Click Approve to confirm adding the code.
What's next?
Click Preview under Generated Code to see how your customization looks.
You can always click the New Chat icon

to start a conversation about another customization you want AI to make.

Reverting code changes done by AI
Restore your client's site to its previous state if you want to undo changes made by the AI assistant. You can access your chat history with the assistant and revert any generated code back to an earlier version.
To restore the code to the previous state:
Click Code

on the left side of the editor.
Click AI Assistant.
Click the More Actions icon

at the top right of the code panel.
Select Show chat history.

Select the relevant conversation.
Click Restore under the relevant Generated Code section.

FAQs
Click a question below to learn more.
Are there customizations that are not supported?
While the AI assistant can perform many actions on various elements, Wix apps and other third-party apps have certain limitations.
If the assistant is unable to help with a certain action, it will let you know and suggest some alternative actions as well.

The AI assistant gave me a list of element IDs (e.g. 'box 3', 'section1') - how do I find these?
When chatting to the AI assistant, it may give you suggestions for elements on the page it can customize. Each element has a unique ID identifying it in the code.

When dev mode is enabled, you can see element IDs when selecting the relevant element on the canvas, or in the Layers panel.
On the canvas: When selecting an element, the element ID appears on the blue label, right next to the element name. In the example below, the text element's ID is 'text7'.

In the Layers panel: Open this panel to get an overview of all of the elements on the page and their IDs. Make sure the Display IDs toggle is enabled.
