Index of every page on this site: llms.txt
All skills
wix avatar

/wix-app

@e2bc48e official
by Wix.comwix/skills40 stars
42
Run it yourself

Build and review Wix CLI app extensions — dashboard pages, modals, plugins, menu plugins, custom element widgets, Editor React components, site plugins, embedded scripts, context providers, function libraries, lightbox (popup) behavior, page onLoad contexts, backend APIs, backend events, service plugins, data collections, and App Market readiness. Use when building ANY feature or extension for a Wix CLI app or preparing a Wix app for App Market review. Triggers on: add, build, create, implement, help me, dashboard, widget, plugin, backend, API, event, collection, embedded script, service plugin, Editor React component, context provider, function library, onLoad, on page load, checkout, shipping, tax, discount, SPI, CMS, schema, tracking, popup, lightbox, admin panel, menu item, modal, validate, test, verify, register extension, App Market, app review, submission readiness.

Use this Skill: https://skilld.dev/gh/wix/skills/wix-app

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesdashboard-pageDASHBOARD_API_PAGE_HELPERS.md

≈1.4k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Dashboard API Reference: page helpers

Part of the Dashboard API Reference.

navigateBack()

Host Module '@wix/dashboard' 'navigateBack()' navigates the user back to the previous dashboard page (equivalent to the browser back button).

Signature: No parameters.

Example:

import { dashboard } from '@wix/dashboard';

// Navigate back to the previous page
dashboard.navigateBack();

getPageUrl()

Host Module '@wix/dashboard' 'getPageUrl()' returns the full URL for a dashboard page.

Method parameters:

  • destination: Destination — URL destination details

Destination object:

  • pageId (string): ID of the page to link to
  • relativeUrl (string, optional): URL segment appended to the base page URL. Can include path segments, query string, and fragment

Returns: The full URL (string) of the dashboard page with the provided relativeUrl appended. Promise<string>

Example:

import { dashboard } from '@wix/dashboard';

// Get the URL of the dashboard's home page with a query string
const pageUrl = await dashboard.getPageUrl({
  pageId: "0845ada2-467f-4cab-ba40-2f07c812343d",
  relativeUrl: "?referral=widget",
});

getSiteInfo()

Host Module '@wix/dashboard' 'getSiteInfo()' returns information about the site and its editor: the site URL, whether Wix Editor or Wix Studio is available and active, and whether the site is published. It is synchronous and returns null when site information isn't available.

Signature: No parameters.

Returns: SiteInfo | null

Site info:

  • wixEditorAvailable (boolean): Whether Wix Editor or Wix Studio is connected to this site
  • wixEditorActive (boolean): Whether the editor is currently active and accessible
  • editorUrl (string, optional): URL of the editor for this site
  • siteUrl (string, optional): URL of the site
  • createSiteUrl (string, optional): Relative URL to the site creation flow. Returned only when the editor isn't active
  • published (boolean, optional): Whether the site is published. Only available for some site types

Example:

import { dashboard } from '@wix/dashboard';

// Link to the editor when it is active
const siteInfo = dashboard.getSiteInfo();
if (siteInfo?.wixEditorActive && siteInfo.editorUrl) {
  console.log('Edit the site at:', siteInfo.editorUrl);
}

onBeforeUnload()

Host Module '@wix/dashboard' 'onBeforeUnload()' registers a beforeunload handler for a dashboard page, modal, or plugin extension. The callback runs when the user is about to navigate away or the browsing context is unloading. Calling event.preventDefault() pauses navigation and shows a warning dialog about unsaved data.

Signature: onBeforeUnload(callback: (event: { preventDefault: () => void }) => void): { remove: () => void }

Method parameters:

  • callback: (event: { preventDefault: () => void }) => void — Called when the beforeunload event fires

Notes:

  • Do not assume the beforeunload event will always fire or that a confirmation dialog will always appear; behavior varies by browser.

Returns: An object with a remove() method to unregister the handler { remove: () => void }

Example:

import { dashboard } from '@wix/dashboard';

// Prompt for confirmation before unloading unsaved data
const { remove } = dashboard.onBeforeUnload((event) => {
  // Check if there's unsaved data on the page
  if (unsavedPageData) {
    event.preventDefault();
  }
});

setPageTitle()

Host Module '@wix/dashboard' 'setPageTitle()' sets the title of the current dashboard page in the browser tab. This can only be called from dashboard pages (not plugin extensions). Pass null to reset the title to the default dashboard page title.

Method parameters:

  • pageTitle: string | null — Title to set (or null to reset)

Returns: void

Example:

import { dashboard } from '@wix/dashboard';

// Set a static page title
dashboard.setPageTitle('Orders Overview');

// Reset to default dashboard page title
dashboard.observeState((_, environmentState) => {
  // Use a regular expression to capture the productId value.
  const queryParams = environmentState.pageLocation.search;
  const productIdMatch = queryParams.match(/[?&]productId=([^&]+)/);
  let productId;
  if (productIdMatch) {
    productId = productIdMatch[1];
  }

  // If a product ID was found, set the page title to the ID.
  if (productId) {
    dashboard.setPageTitle("Product: " + productId);
    // If no product ID was found, reset the page title to default.
  } else {
    dashboard.setPageTitle(null);
  }
});

onLayerStateChange()

Host Module '@wix/dashboard' 'onLayerStateChange()' registers a handler fired when a page, modal, or plugin extension moves between foreground and background. Use it to refresh data when coming to foreground and pause resource-intensive work when backgrounded.

Method parameters:

  • callback: (state: "foreground" | "background") => void — Called whenever the layer state changes

Returns: An object with remove() to unregister the handler { remove: () => void }

Example:

import { dashboard } from '@wix/dashboard';

// Refresh/pause depending on visibility
const { remove } = dashboard.onLayerStateChange((state) => {
  if (state === "foreground") {
    refreshData();
  }
});

// Remove the onLayerStateChange handler when the beforeUnload event is triggered.
dashboard.onBeforeUnload(() => {
  remove();
});

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning2d4 checks · Risk SAFE
  • Gen Agent Trust Hub2d

    This skill provides a robust and secure development environment for building Wix app extensions. It includes specialized tools for API discovery, accessibility auditing, and media management, all of which interact with official Wix services and include security best practices such as IP validation and sandboxed execution.

  • Socket2d

    1 alert: gptAnomaly

  • Snyk2d

    Risk: LOW · No issues

  • ZeroLeaks7mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at e2bc48e. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 6 days ago
compatibility
requires `@wix/cli` >= 1.1.192.

README badge

README badge for wix/skills/wix-app

Builds dashboard pages, modals, plugins, custom widgets, Editor React components, backend APIs, events, service plugins, and data collections for Wix CLI apps. Provides decision logic, API patterns, and validation workflows; scaffolding is owned by the Wix CLI via `wix generate --params`.

Generated from the current SKILL.md.

What extension types does this skill cover?
All Wix CLI app extension types: dashboard pages, modals, plugins, menu plugins, custom element widgets, Editor React components, site plugins, embedded scripts, backend APIs, backend events, service plugins, and data collections.
Does this skill scaffold the extension files for me?
The Wix CLI owns scaffolding via `wix generate --params` for all extension types except Backend API. This skill provides decision logic, API guidance, and business-logic patterns to fill in the generated stubs. Backend API files must be created manually.
What Wix CLI version is required?
The skill requires @wix/cli >= 1.1.192.
Do I need to create a Data Collection extension for app-specific data?
Yes, if you're saving or persisting app-specific data, managing domain entities in a dashboard, or running a service plugin that reads app-configured data. The skill infers this automatically—you don't need to explicitly request it.
Does this skill cover Wix Stores API usage?
Yes. When using any Wix Stores API (products, inventory, orders), the skill requires dual V1/V3 catalog support and references the Stores Versioning guide for module selection and field mapping.

Generated from the current SKILL.md. These answers refresh after source changes.