Access the Interactions Panel by selecting an element and pressing Ctrl+I, or through the right sidebar when an element is selected.
Quick Start
Basic Usage Flow
- Select an Element: Click on any element in your page editor
- Open Interactions Panel: Press Ctrl+I or find it in the right sidebar
- Add a Trigger: Click “Add [Device] Trigger” and choose when the interaction should happen
- Choose an Action: Select what should happen when the trigger fires
- Configure Settings: Customize the behavior with specific parameters
- Test: Preview your page to see the interaction in action
Common Example: Execute JavaScript on Click
Getting Element IDs for Targeting
When you need to target specific elements (for show/hide actions, JavaScript code, etc.), you can easily copy their element IDs:- Select the target element in the page builder
- Hover over “Component Settings” text in the right sidebar
- Click the copy link that appears on hover to copy the element ID
- Paste the ID into your interaction configuration
- Show/Hide Element actions
- Toggle Visibility actions
- Custom JavaScript that targets specific elements
- Focus on Element actions
Device-Specific Behavior
Device Detection System
The system automatically detects the current device based on screen width:Mobile Portrait
- Screen Width: ≤ 575px
- Device ID:
mobilePortrait - Typical Devices: Mobile phones in portrait mode
Tablet
- Screen Width: 576px - 992px
- Device ID:
tablet - Typical Devices: Tablets, mobile phones in landscape, small laptops
Desktop
- Screen Width: > 992px
- Device ID:
desktop - Typical Devices: Desktop computers, large laptops
Cascading Rules System
The interactions system uses a cascading inheritance model where interactions flow down from larger to smaller devices: Desktop interactions execute on: Desktop, Tablet, Mobile Portrait (unless overridden)Tablet interactions execute on: Tablet, Mobile Portrait (unless overridden)
Mobile Portrait interactions execute on: Mobile Portrait only This ensures your interactions work across all devices while allowing device-specific customization.
Override and Disable System
When viewing tablet or mobile in the panel, you’ll see desktop interactions that will execute unless specifically overridden:Override Button
- Creates a device-specific version of the interaction
- Allows you to customize behavior for that device
- The override takes precedence over the cascaded interaction
Disable Button
- Prevents the desktop interaction from executing on this device
- Useful when an interaction doesn’t make sense on smaller screens
- Creates a “disabled” action that blocks the cascaded interaction
Dynamic Device Changes
The system automatically handles device changes:- Responsive Design: When users resize their browser or rotate their device
- Automatic Re-evaluation: Interactions are re-evaluated for the new device size
- No Page Reload: Device changes are handled seamlessly without page refresh
- Duplicate Prevention: The system prevents duplicate event listeners during device transitions
Available Triggers
Mouse & Touch Interactions
On Click
- Description: Triggers when the element is clicked or tapped
- Use Cases: Button actions, navigation, form submissions
- Best For: Primary user interactions
On Hover
- Description: Triggers when mouse hovers over the element
- Use Cases: Tooltips, preview content, hover effects
- Note: May not work on touch devices
On Mouse Enter
- Description: Triggers when mouse cursor enters the element area
- Use Cases: Show additional information, highlight effects
- Difference from hover: More precise control over enter/leave events
On Mouse Leave
- Description: Triggers when mouse cursor leaves the element area
- Use Cases: Hide tooltips, reset animations, cleanup actions
Focus & Form Interactions
On Focus
- Description: Triggers when the element gains focus
- Best For: Input fields, buttons, interactive elements
- Use Cases: Show help text, highlight sections, form validation
On Blur
- Description: Triggers when the element loses focus
- Best For: Input fields, form elements
- Use Cases: Validate input, hide help text, save data
On Form Submit
- Description: Triggers when a form is submitted
- Available On: Form elements only
- Use Cases: Custom validation, tracking, additional processing
On Form Success
- Description: Triggers when form submission is successful
- Available On: Form elements only
- Use Cases: Show success messages, redirect, track conversions
On Form Error
- Description: Triggers when form submission fails
- Available On: Form elements only
- Use Cases: Show error messages, retry logic, error tracking
Other Triggers
On Scroll
- Description: Triggers when the element is scrolled
- Use Cases: Lazy loading, scroll animations, progress indicators
On Load
- Description: Triggers when the element finishes loading
- Best For: Images, iframes, media elements
- Use Cases: Show content after loading, initialize components
Available Actions
Modal Controls
Show Modal
- Description: Display a modal dialog
- Configuration: Select which modal to show
- Use Cases: Product details, contact forms, confirmations
Hide Modal
- Description: Close a modal dialog
- Configuration: Select which modal to hide
- Use Cases: Close buttons, overlay clicks, form completion
Element Visibility
Show Element
- Description: Make a hidden element visible
- Configuration: CSS selector of target element
- Use Cases: Reveal hidden content, show form fields
Hide Element
- Description: Hide a visible element
- Configuration: CSS selector of target element
- Use Cases: Collapse sections, hide form fields
Toggle Visibility
- Description: Switch between hidden and visible states
- Configuration: CSS selector of target element
- Use Cases: Expandable sections, show/hide toggles
Tracking & Analytics
Track Split Test Goal
- Description: Record a conversion goal for split testing
- Configuration: Goal value (e.g., “purchase”, “signup”)
- Use Cases: Track conversions, measure variant performance
Track Event
- Description: Send tracking events to analytics platforms
- Configuration: Event name selection
- Platforms: Google Analytics, Meta Ads, Google Ads
- Common Events: Lead, AddToCart, Purchase, Contact, Subscribe
Custom Meta Event
- Description: Send custom events to Meta (Facebook) Ads
- Configuration: Event name and value
- Use Cases: Custom conversion tracking, audience building
Custom GA Event
- Description: Send custom events to Google Analytics
- Configuration: Event name and value
- Use Cases: Custom tracking, behavior analysis
JavaScript Execution
Execute JavaScript
- Description: Run custom JavaScript code using the browser’s JavaScript engine
- Configuration: Code editor with syntax highlighting
- Execution: Code is executed using
eval()with access to the global scope - Error Handling: JavaScript errors are caught and logged to the browser console
- Use Cases: Custom functionality, API calls, complex interactions, DOM manipulation
- Code executes with full access to the page and global JavaScript scope
- All JavaScript errors are caught and logged for debugging
- Code execution is immediate when the trigger fires
- Consider performance impact for complex operations
Element Focus
Focus on Element
- Description: Set focus to a specific element
- Configuration: CSS selector of target element
- Use Cases: Improve accessibility, guide user attention
Animations
Slide Animations
- Slide Up: Element slides upward
- Slide Down: Element slides downward
- Slide Left: Element slides to the left
- Slide Right: Element slides to the right
- Configuration: Duration, distance, easing function
Fade Animations
- Fade In: Element fades into view
- Fade Out: Element fades out of view
- Configuration: Duration, easing function
Scale Animations
- Scale Up: Element grows larger
- Scale Down: Element shrinks smaller
- Configuration: Duration, scale factor, easing function
Rotation Animations
- Rotate Clockwise: Element rotates clockwise
- Rotate Counter: Element rotates counter-clockwise
- Configuration: Duration, rotation degrees, easing function
Special Effects
- Bounce In: Element bounces into view
- Shake: Element shakes horizontally
- Pulse: Element pulses in size
- Flip: Element flips around
- Configuration: Duration, easing function
Animation Settings
All animations can be customized with:- Duration: Animation length in milliseconds (default: 300ms)
- Easing: Animation timing function
- ease, ease-in, ease-out, ease-in-out
- linear, cubic-bezier curves
- Target Element: Animate a different element (optional)
Configuration Options
Action-Specific Settings
Modal Actions
- Modal Selection: Choose from available modals on your page
- Auto-close: Configure automatic closing behavior
Event Tracking
- Event Name: Select from common events or enter custom names
- Goal Value: Optional conversion value for split testing
- Platform Targeting: Events automatically sent to connected platforms
Custom JavaScript
- Code Editor: Full-featured editor with syntax highlighting
- Error Handling: Console integration for debugging
- Scope: Access to page elements and global variables
Element Targeting
- CSS Selectors: Use ID (#element), class (.class), or complex selectors
- Copy Element IDs: Hover over “Component Settings” in the right sidebar to copy any element’s ID
- Validation: Real-time validation of selector syntax
- Multiple Elements: Target multiple elements with class selectors
Animation Controls
- Duration: Fine-tune animation timing
- Easing Functions: Choose from predefined or custom curves
- Chaining: Combine multiple animations for complex effects
Best Practices
Performance Optimization
- Minimize JavaScript: Keep custom code lightweight and efficient
- Use Animations Sparingly: Too many animations can impact performance
- Test on Mobile: Ensure interactions work well on touch devices
- Optimize Selectors: Use efficient CSS selectors for targeting elements
- Consider Event Frequency: Avoid high-frequency events like scroll for heavy operations
User Experience Guidelines
- Provide Visual Feedback: Users should know when interactions occur
- Maintain Accessibility: Ensure interactions work with keyboard navigation
- Consider Touch Devices: Hover effects don’t work on mobile
- Test Across Devices: Verify interactions work on all target devices
Development Workflow
- Start with Desktop: Create your primary interactions on desktop first
- Test Mobile Early: Check how interactions behave on smaller screens
- Use Override System: Create device-specific versions when needed
- Preview Frequently: Test interactions in preview mode regularly
Common Patterns
Button Click Handlers
Form Enhancement
Dynamic Content
Device-Specific Examples
Desktop-Only Interactions
- Hover Effects: Use “On Hover” triggers for rich tooltips and preview content
- Complex Animations: Multi-step animations that work better on larger screens
- Advanced JavaScript: Complex form validation or API interactions
Mobile-Specific Interactions
- Touch-Friendly Actions: Larger click targets and simplified interactions
- Simplified Animations: Lighter animations for better mobile performance
- Mobile-Specific Content: Show mobile-optimized content or navigation
Responsive Strategies
- Start with Desktop: Create your main interactions on desktop first
- Test Mobile Early: Preview how desktop interactions work on mobile
- Override When Needed: Create mobile-specific versions for better UX
- Disable Hover Effects: Disable hover interactions that don’t work on touch devices
Troubleshooting
Common Issues
Interactions Not Triggering
- Wrong Element Selected: Make sure you selected the correct element before adding the interaction
- Device Mismatch: Check if the interaction is set for the device you’re testing on
- Element Missing: Verify the target element exists and has a unique ID
- JavaScript Errors: Check browser console for error messages
JavaScript Code Issues
- Syntax Errors: Check your JavaScript code syntax in the browser console first
- Missing Elements: Make sure elements you’re targeting in your code actually exist
- Timing Issues: Some elements may not be available when your code runs
Device-Specific Issues
- Desktop vs Mobile: Desktop interactions run on all devices unless you override them
- Touch vs Mouse: Hover effects don’t work on touch devices
- Screen Size: Device detection is based on screen width (575px and 992px breakpoints)
Show/Hide Element Issues
- Invalid Selectors: Make sure your CSS selectors are correct (e.g.,
#element-id,.class-name) - Element Not Found: Verify the target element exists on the page
- ID Spelling: Check that element IDs are spelled correctly and match exactly
- Need Element ID?: Hover over “Component Settings” in the right sidebar to copy any element’s ID
Debugging Tips
Testing Your Interactions
- Preview Mode: Always test interactions in live preview mode
- Browser Console: Check for error messages if interactions aren’t working
- Device Testing: Use browser dev tools to simulate different screen sizes
- Step-by-Step Testing: Test each interaction individually before combining multiple
Common Debugging Steps
- Verify Element Selection: Make sure you selected the correct element in the editor
- Check Device Settings: Confirm the interaction is set for the right device
- Test JavaScript Code: For custom JavaScript, test your code in the browser console first
- Validate Selectors: For show/hide actions, ensure your CSS selectors are correct
- Check Element IDs: Make sure target elements have unique IDs
Quick Fixes
- Interaction not working: Check browser console for error messages
- Wrong device behavior: Verify device settings in the interactions panel
- JavaScript errors: Test your code syntax in browser console
- Element not found: Double-check element IDs and CSS selectors
Advanced Use Cases
API Integration
Form Validation
Dynamic Content Updates
Security Considerations
Safe JavaScript Practices
- Validate Input: Always validate user input before processing
- Sanitize Data: Clean data before displaying in HTML
- Limit Scope: Don’t expose sensitive information in client-side code
- Test Thoroughly: Verify interactions work as expected without security risks
Content Security Policy
- Script Sources: Ensure custom JavaScript complies with CSP
- External APIs: Only connect to trusted external services
- User Data: Handle user data responsibly and securely
Related Documentation
- Split Testing - Using interactions for A/B testing
- Form Handling - Advanced form interactions
- Analytics Integration - Event tracking setup
- Debug Window - Testing and debugging interactions
- Page Events - Funnel-level event tracking