Use when building interactive widgets, custom data displays, or configurable site components with settings panels. Triggers include widget, custom element, interactive component, editor component, configurable widget, web component.
Instalación
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Use when building interactive widgets, custom data displays, or configurable site components with settings panels. Triggers include widget, custom element, interactive component, editor component, configurable widget, web component.
compatibility
Requires Wix CLI development environment.
Wix Site Widget Builder
Creates custom element widget extensions for Wix CLI applications. Site widgets are React components converted to web components that appear in the Wix Editor, allowing site owners to add interactive, configurable widgets to their pages with a built-in settings panel.
Quick Start Checklist
Follow these steps in order when creating a site widget:
Important: Use inputs.selectColor(value, { onChange }) from @wix/editor with FillPreview from WDS. This opens the native Wix color picker with theme colors, gradients, and more. Never use <Input type="color">.
Font Selection
For font selection in settings panels, use FontPickerField component with inputs.selectFont() from @wix/editor. Do NOT use a text Input.
Important: Use inputs.selectFont(value, { onChange }) from @wix/editor with the callback pattern. This provides a rich font picker dialog with bold, italic, size, and typography features. Font values are stored as JSON strings.
Widget with configurable title, target date/time, colors, and font
Settings panel with date picker, time input, color pickers, font picker
Real-time countdown display with days, hours, minutes, seconds
Product Showcase Widget
Request: "Create a widget that displays products from a collection"
Output:
Widget that queries Wix Data collection
Editor environment handling (shows placeholder in editor)
Settings panel for collection selection, display options, styling
Responsive grid layout with product cards
Interactive Calculator Widget
Request: "Create a calculator widget with customizable colors"
Output:
Functional calculator component
Settings panel for color customization (background, buttons, text)
Inline styles for all styling
No external dependencies
Frontend Aesthetics
Avoid generic aesthetics. Create distinctive designs with unique fonts (avoid Inter, Roboto, Arial), cohesive color palettes, CSS animations for micro-interactions, and context-specific choices. Don't use clichéd color schemes or predictable layouts.
Extension Registration
Extension registration is MANDATORY and has TWO required steps.
Step 1: Create Widget-Specific Extension File
Each site widget requires an extensions.ts file in its folder:
The id must be a unique, static UUID v4 string. Generate a fresh UUID for each extension - do NOT use randomUUID() or copy UUIDs from examples. Replace {{GENERATE_UUID}} with a freshly generated UUID like "a1b2c3d4-e5f6-7890-abcd-ef1234567890".
Property
Type
Description
id
string
Unique static UUID v4 (generate fresh)
name
string
Display name in editor
tagName
string
HTML custom element tag (kebab-case)
element
string
Path to widget React component
settings
string
Path to settings panel component
installation
object
Auto-add behavior
width
object
Default width and stretch settings
height
object
Default height settings
Step 2: Register in Main Extensions File
CRITICAL: After creating the widget-specific extension file, you MUST read wix-cli-extension-registration and follow the "App Registration" section to update src/extensions.ts.
Without completing Step 2, the site widget will not be available in the Wix Editor.
Code Quality Requirements
Strict TypeScript (no any, explicit return types)
Functional React components with hooks
Proper error handling and loading states
No @ts-ignore comments
Inline styles only (no CSS imports)
Handle Wix Editor environment when using Wix Data API
Consistent prop naming (camelCase in widget, kebab-case in panel)