About Site Plugin Extensions

With site plugins, you can create interactive and feature-rich components that seamlessly integrate into Wix’s business solutions, such as Wix Stores and Wix Bookings, extending their functionality and user experience.

Wix users can easily place site plugins into predefined slots (UI placeholders) within Wix apps, using the plugin explorer available in all Wix editors.

plugin-flow

Terminology

The following are key terms related to site plugins:

TermDefinition
Host widgetA widget belonging to a Wix business solution, which contains one or more slots.
SlotA placeholder within a host widget in which users can add a plugin.
Site pluginA component that can be added inside a slot, extending the host widget's functionality.
Plugin APIAn API contract between a site plugin and a slot that both must implement to communicate.

How site plugins work

A site plugin integrates with its host widget in two ways:

  • Visually, by embedding its UI inside one of the host's slots
  • Logically, by implementing a communication interface with the host

To enable site plugins to communicate with their hosts, each slot supports an API that provides data about the plugin's context (for example the productId of the current product on the Product page).

Slots and plugin APIs

Wix offers a range of placeholders – called slots – across app pages, for which you can build plugins.

When developing a plugin, you need to explicitly declare the specific slots in which users are allowed to add it.

Explore the slots available on each host widget, as well as the APIs they support:

Wix appHost widget
Wix eCommCheckout page
Wix StoresProduct page
Wix StoresCategory page
Wix StoresShop page
Wix StoresGallery widget
Wix BookingsService page
Wix EventsEvent Details page
Wix BlogPost page

slot-wireframe

Implementation options

You can add a site plugin extension using:

  • Wix Blocks: Create a site widget in Wix's native app editor. Design your site plugin using visual layout and design tools, and code your business logic using Velo, Wix’s native coding solution.
  • Wix CLI: Create a site plugin using the CLI and custom element technology, with your code by default deployed on our servers. The creation and setup process of your widget takes place in the terminal. Then, to edit your plugin, you write code directly in your CLI app project's files.
  • Self-hosted custom element: Create a site plugin using custom element technology, with your code deployed on your own server. The custom element is essentially a new HTML tag that you define, which is made available in the Wix editors as a widget.

Note: Currently, site plugins for the checkout page can only be built with Wix Blocks.

Sandboxing in the editor

When rendered in the editor, custom elements are sandboxed to enhance security. This means they're treated as if they come from a different domain, and Wix does not support the allow-same-origin directive in the sandbox attribute. As a result, your site plugin can't access same-origin resources in the editor.

This restriction impacts several key web storage and caching APIs:

To overcome these limitations:

  1. Detect the environment with viewMode().
  2. When in the editor, mock the storage or modify your API usage accordingly.

Note: When working with cookies, make sure to comply with GDPR and data protection regulations.

Did this help?