WIDGET BUILDER GUIDE

Ecosistema completo para organización y gestión de contenido con interfaces espaciales

🧩 Widget Builder Guide

Date: November 5, 2025
Status: ✅ Ready to Use
Purpose: Create reusable, modular widgets for your platform


🎯 What is Widget Builder?

Widget Builder is a visual tool for creating reusable UI components that can be:


🚀 How to Access Widget Builder

Route:

/space/{space}/editor/widget-builder

Navigation:

  1. Go to Editor (any page or blank canvas)
  2. Navigate to: /space/{space}/editor/widget-builder
  3. Or use navigation service:
    this.spaceNav.navigate('editor/widget-builder');
    

🏗️ Creating a New Widget

Step 1: Choose Template or Start Blank

Templates Available:

Or: Click "Create Blank Widget" to start from scratch

Step 2: Design Your Widget

Use the Design Panel to:

Step 3: Configure Inputs

Widget Inputs = Properties users can customize when using your widget

Example:

{
  name: 'title',
  type: 'string',
  required: true,
  defaultValue: 'My Title',
  description: 'The title text to display'
}

Common Input Types:

Step 4: Configure Outputs

Widget Outputs = Events your widget can emit

Example:

{
  name: 'onClick',
  type: 'void',
  description: 'Emitted when widget is clicked'
}

Step 5: Apply Theme Variables

Map widget properties to theme variables for automatic theme support:

Result: Widget automatically adapts to platform theme!

Step 6: Preview

Test your widget across breakpoints:

Step 7: Export

Choose export format:

  1. Save to Registry → Widget available in Editor widget palette
  2. Export as Standalone Component → Single .ts file
  3. Export as NX Library → Full library structure

📋 Widget Builder Interface

Left Sidebar - Panels:

  1. Design - Visual widget designer
  2. Inputs - Define widget properties
  3. Theme - Map to theme variables
  4. Preview - Test across breakpoints
  5. Export - Save/export widget

Center - Preview:

Live preview of your widget with responsive breakpoint testing

Right Sidebar - Templates:

Quick-start templates for common widget types


🔄 Widget Lifecycle

Creation Flow:

1. Choose Template / Start Blank
   ↓
2. Design Widget Visually
   ↓
3. Configure Inputs/Outputs
   ↓
4. Apply Theme Variables
   ↓
5. Preview & Test
   ↓
6. Save to Registry / Export
   ↓
7. Widget Available in Editor Palette

💡 Best Practices

1. Reusability First

2. Theme Integration

3. Responsive Design

4. Clear Documentation

5. Performance


🎨 Example: Creating a "Product Card" Widget

Step 1: Choose "Card Widget" Template

Step 2: Configure Inputs:

[
  {
    name: 'product',
    type: 'object',
    required: true,
    description: 'Product data'
  },
  {
    name: 'showPrice',
    type: 'boolean',
    defaultValue: true,
    description: 'Show product price'
  },
  {
    name: 'showDescription',
    type: 'boolean',
    defaultValue: false,
    description: 'Show product description'
  }
]

Step 3: Configure Outputs:

[
  {
    name: 'onAddToCart',
    type: 'object',
    description: 'Emitted when "Add to Cart" is clicked'
  },
  {
    name: 'onViewDetails',
    type: 'void',
    description: 'Emitted when product is clicked'
  }
]

Step 4: Apply Theme:

Step 5: Save to Registry

Widget is now available in Editor widget palette!


🔗 Integration with Editor

Once saved to registry, your widget:


📚 File Locations


🚀 Next Steps

  1. Create Your First Widget:

    • Navigate to Widget Builder
    • Choose a template or start blank
    • Follow the 7-step process
  2. Use Your Widget:

    • Go to Editor
    • Open widget library
    • Drag your widget onto a page
  3. Package Into Module:

    • Create a module in Modularity
    • Select pages that use your widgets
    • Package and deploy!

🎉 You're Ready!

Widget Builder is fully functional and ready to use. Start creating reusable widgets for your platform!