Widget Editor Overview
The Widget Editor has three main tabs plus additional tools for previewing and publishing:- Main Tabs
- Additional Tools
- Assistant - Chat with AI to generate and modify your widget
- Code - View and copy the MDX code for your widget
- Data - See the data structure your tool provides
Assistant Tab: Building with AI
How the Widget Editor Agent Works
The Agent generates MDX code based on your natural language descriptions. You don’t need to know how to code - just describe what you want. What Happens When You Send a Message:Type and send
Processing status
Widget updates
Changes appear
Writing Effective Prompts
The key to great results is being specific about what you want. Good prompt structure:[Action] + [Component] + [Visual details] + [Interaction behavior] Examples:
- Be Descriptive
- Include Visual Details
- Specify Interactions
“Create a quiz widget with one question displayed at a time, four multiple choice buttons in a 2x2 grid, and a submit button at the bottom”Not as good:
“Make a quiz”
Using the Examples Library
The fastest way to build is starting with an example. To Access:- Click the Examples button in the Editor
- Browse by category or search by keyword
- Click on any example to see details
Data Visualization
Data Visualization
Feedback & Communication
Feedback & Communication
Data Display
Data Display
User Input
User Input
Navigation & Controls
Navigation & Controls
Scheduling
Scheduling
Surveys and Assessments
Surveys and Assessments
Text & Documents
Text & Documents
Find an example
Copy Prompt
Return to Assistant
Paste the prompt
Send it
Modify from there
Iterating on Your Widget
Making Changes: Just chat naturally with the Agent:- “Make the buttons larger”
- “Change the color scheme to use our brand purple”
- “Add icons next to each option”
- “Move the submit button to the right side”
- “Add a congratulations message when the quiz is complete”
- Your edit history is saved as versions
- You can always revert to a previous version
- See the Versions tab for full history
Working with Tool Data
Your widget displays data from your tool. The Data tab shows you what information your tool provides. To Reference Tool Data in Your Prompts: “Show the course title, description, and rating from the tool data” “Display the quiz questions as a list with the question text and four answer options” “Create a card for each result that shows the thumbnail image, title, and price” The Agent understands your tool’s data structure and will map it correctly.Code Tab: Viewing and Copying MDX
What’s in the Code Tab
The Code tab shows the MDX (Markdown + JSX) code that powers your widget. You don’t need to understand this code to use Widget Studio, but it’s here if you want to:- Copy the code to use elsewhere
- Share it with developers
- Keep a backup
Copying Your Code
Go to the Code tab
Click the Copy button
Code is copied
- External code editors
- Other AI tools for further refinement
- Documentation for your team
Import Function (Coming Soon)
You’ll see an Import button in the Code tab. This doesn’t work yet - we’re enabling it soon.Data Tab: Understanding Tool Output
What the Data Tab Shows
The Data tab displays the structure of data your tool returns. This helps you understand what information you have available to display in your widget. Example Data Structure:Using Data in Your Widget
When you describe your widget to the Agent, reference the data fields you see: “Show each course as a card with the thumbnail image, title, rating, and duration. Add an ‘Enroll Now’ button for each.” The Agent maps your description to the actual data structure automatically.Preview: Testing Your Widget
Preview Modes
- Device Preview
- Theme Preview
- Desktop - How your widget looks in the full-width agent chat
- Mobile - How it appears on mobile devices
- Text that’s readable on desktop might be too small on mobile
- Colors that work in light mode might not contrast well in dark mode
- Interactive elements need to be touch-friendly on mobile
What to Check
On Desktop
On Desktop
- Does the layout use space effectively?
- Are buttons and interactive elements easy to click?
- Is text easily readable?
On Mobile
On Mobile
- Does content fit without horizontal scrolling?
- Are touch targets large enough (buttons, links)?
- Is text still readable at smaller sizes?
In Light Mode
In Light Mode
- Is contrast sufficient for readability?
- Do colors align with your brand?
In Dark Mode
In Dark Mode
- Does text remain readable?
- Do colors still look good?
- Are borders and dividers visible?
Design System: Applying Your Brand
What Design Systems Do
Design systems automatically apply your brand colors throughout your widget. When you select a design system, colors propagate to:- Buttons
- Backgrounds
- Text highlights
- Borders
- Interactive elements
Changing Design Systems
Click the Design System dropdown
Select from your configured design systems
Preview updates immediately
Switch between systems
Versions: Managing Widget History
How Versioning Works
Every time you edit your widget and the Agent generates new code, a new version is created automatically. Version Information:- Version number (0.1, 0.2, 0.3, etc.)
- Timestamp of creation
- Status (Published, Unpublished, Latest)
Viewing Version History
Go to the Versions tab
See all versions
Click on any version
Reverting to a Previous Version
To go back to an earlier version:Unpublish your current widget
Go to Versions tab
Find the version you want
Click Promote to Latest
Go to Publish tab
Click Publish
Publishing: Making Your Widget Live
Publishing Checklist
Before you can publish, certain requirements must be met:- ✓ Widget Name - Must have a name
- ✓ Widget Description - Must have a description
- ✓ Widget Mode - Display or Standalone selected
- ✓ Initial Version - At least version 0.1 created
- ✓ Widget Code - MDX code generated
- ✓ Widget Compiles - Code compiles successfully
Publishing Your Widget
Go to the Publish tab
Review the checklist
Click Publish
Your widget is now live!
- Widget becomes active in your agent
- When the agent calls your tool, the widget displays automatically
- End users see your widget in the agent chat
Unpublishing
To take a widget offline:Open the widget
Go to Publish tab
Click Unpublish
Tool continues to work
- Making major edits
- Widget isn’t working as expected
- Testing changes before republishing
Practical Examples
Example 1: Building a Quiz Widget
- Initial prompt
- Refining the design
- Adding interactions
- Final polish
Example 2: Building a Course Catalog
- Initial prompt
- Improving the layout
- Enhancing visuals
- Adding functionality
Example 3: Building a Booking Calendar
- Initial prompt
- Adding structure
- Improving interaction
- Final touches
Best Practices
Building Effective Widgets
Start Simple
Test Thoroughly
Consider Your Users
Managing Your Workflow
Keep Sessions Focused
Keep Sessions Focused
- Complete related edits in one session
- Don’t switch tabs unnecessarily (message history will be lost)
- Save/publish when you reach a good stopping point
Use Version Control
Use Version Control
- Major milestones = good time to note the version
- Can always revert if needed
- Promotes a safety net for experimentation
Backup Important Work
Backup Important Work
- Copy MDX code for critical widgets
- Keep external notes on design decisions
- Document what prompts worked well
Troubleshooting
Problem: Agent doesn't seem to understand my request
Problem: Agent doesn't seem to understand my request
- Be more specific and descriptive
- Reference the data structure from the Data tab
- Use an example from the library as a starting point
Problem: Widget looks good on desktop but broken on mobile
Problem: Widget looks good on desktop but broken on mobile
- Ask the Agent: “Make this responsive for mobile devices”
- Simplify the layout for smaller screens
- Test preview on Mobile mode as you iterate
Problem: Colors don't match my brand
Problem: Colors don't match my brand
- Switch Design Systems
- Ask the Agent: “Use colors from the [System Name] design system”
- Contact your team if you need a new design system created
Problem: I lost my message history
Problem: I lost my message history
- Keep external notes
- Try to complete edits in one session
- We’re fixing this soon