Deprecation notice:
installation.autoAdd is deprecated. If your code still uses this property, update it to installation.staticContainer.
When a Wix user installs your app, you can choose whether the CLI adds your custom element to their site automatically. You set installation.staticContainer in your widget's extension file (element.extension.ts). This article explains how installation works, what you can configure, and how to get your custom element on the pages you want.
Set installation.staticContainer to "HOMEPAGE" to automatically add the widget to the site's home page when the Wix user installs the app. Wix users can later move, resize, or remove it. If the field is omitted, the CLI doesn't add the widget to any page on install. It only appears in the editor's Add panel where Wix users must add it manually.
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:
staticContainer: "HOMEPAGE" for the home page.You define configuration per widget in each custom element's extension file. For the full list of options, see Custom Element Extension Files and Code.
You can:
staticContainer: "HOMEPAGE".You can't:
staticContainer 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.
staticContainer is set to "HOMEPAGE", and that Wix users can move it.width and height options in Custom Element Extension Files and Code.staticContainer: "HOMEPAGE" and 1 with the field omitted, and document which widget to add where.