CLI Documentation Notice
You're viewing documentation for the new CLI, which we recommend for all new projects. Determine which CLI your project uses.
Previous CLI documentation:
When a Wix user installs your app, you can choose whether the CLI adds your custom element site widget to their site automatically. You set installation.autoAdd in your widget's extension file (element.extension.ts). This article explains how installation works, what you can configure, and how to get your widget on the pages you want.
| Value | Behavior |
|---|---|
true | The CLI automatically adds the widget to the site's home page when the Wix user installs the app. Wix users can later move, resize, or remove it. |
false | The CLI doesn't add the widget to any page on install. It only appears in the editor's Add panel. The Wix user must add it manually to the pages they want. |
Use this for a main landing experience widget. Wix users can move it to another page or section if they want.
Use this for header/footer widgets or when you want the Wix user to choose where to place the widget. You can document in your app or panel that they should add it to the header or footer and use the editor's Show on All Pages option so it appears site-wide.
You can ship several widgets and set installation per widget:
autoAdd: true for the home page.autoAdd: false for header, footer, or specific pages, with instructions on where to add them.You define configuration per widget in each widget's extension file. For the full list of options, including installation.essential, see Custom Element Site Widget Extension Files and Code.
You can:
autoAdd: true.autoAdd: false, so the widget only appears in the editor's Add panel.You can't:
autoAdd setting and by what the Wix user does in the editor.For site-wide display, Wix users need to move the widget to the header or footer in the editor and enable Show on All Pages.
autoAdd is true, and that Wix users can move it.width and height options in Custom Element Site Widget Extension Files and Code.autoAdd: true and 1 with autoAdd: false, and document which widget to add where.