Overlay System
🎨 Overlay System
What are Overlays?
The Overlay System in Nexo Maker allows expansion developers to create global, persistent UI components that run outside of any specific project context. These overlays appear on top of the main application and remain visible across all routes and project changes.
Key Characteristics
Global Scope - Overlays run independently of project navigation
Persistent State - Data persists across route changes and app restarts
Event System - Can react to keyboard shortcuts and global events
Interactive UI - Support for draggable, clickable components
Background Services - Can run invisible background processes
How Overlays Work
Overlays are registered as background modules and are loaded when the application starts. They:
Load globally inside the APP scope
Persist across navigation - remain active when changing routes
Share state using the global state system
Communicate through the notification and event system
Run continuously until the application closes
Registration
Register overlays using registerBackgroundModule in your expansion's main.js:
Component Structure
Overlay components use the standard Nexo Maker modular format:
Background Code Without UI
Overlays can also run background code without any visible UI by returning an empty fragment:
State Management
Overlays use useGlobalState for persistent data that survives route changes:
Common Use Cases
Status Displays
Show system information, project status, or monitoring data that users need to see at all times.
Quick Actions
Provide shortcuts to frequently used tools or actions without navigating to specific pages.
Notifications
Display alerts, progress indicators, or status messages that persist across the application.
Background Services
Run invisible processes that monitor events, sync data, or perform periodic tasks. These can return React.createElement(React.Fragment) to run without any UI.
Developer Tools
Create debugging interfaces, performance monitors, or development utilities.
Positioning and Styling
Overlays typically use:
position: fixedfor absolute positioningHigh
zIndexvalues (1500+) to appear above other contentCareful positioning to avoid interfering with the main UI
Responsive design considerations for different screen sizes
Lifecycle
Registration - Overlay is registered in expansion's
main.jsLoading - Component is loaded when application starts
Mounting - React component mounts and initializes state
Runtime - Overlay runs continuously, responding to events
Persistence - State is maintained across navigation
Cleanup - Component unmounts only when application closes
Last updated