Dashboard API Reference
The Dashboard API provides an interface for displaying real-time information and status updates directly on the user’s MentraOS glasses. It allows your app to send content to the dashboard.Import
Overview
EveryAppSession
exposes a dashboard
property that provides access to the Dashboard API:
Property | Type | Purpose |
---|---|---|
session.dashboard.content | DashboardContentAPI | Interface for writing content to the dashboard |
Enum: DashboardMode
TheDashboardMode
enum defines the different display modes available on the MentraOS dashboard.
MAIN
: The default dashboard mode that appears as a small overlay
mode
parameter or when checking the current dashboard state.
Class: DashboardContentAPI
TheDashboardContentAPI
class provides methods for sending content to the dashboard. It is automatically instantiated by the AppSession
and available at session.dashboard.content
.
Constructor
The DashboardContentAPI is automatically instantiated by the AppSession. You should not create instances directly.Methods
write
Send content to the dashboard.content
: The text content to display on the dashboard
writeToMain
Convenience method for sending content specifically to the main dashboard mode.content
: The text content to display in main mode
Interface: DashboardAPI
The main dashboard interface that contains all dashboard-related functionality.AppSession
constructs this object and assigns it to session.dashboard
. Currently, it only contains the content
API, but future versions may include additional dashboard capabilities.
Content Guidelines
Character Limits
To ensure optimal display:- Keep content under 60 characters to avoid truncation
Content Replacement
The dashboard keeps only the latest message per app. Writing a new message automatically replaces your previous one.Message Types (Advanced)
The SDK handles these WebSocket messages automatically, but they are documented here for completeness:Message | type value | Sent By | Purpose |
---|---|---|---|
DashboardContentUpdate | dashboard_content_update | App | Send new content to dashboard |
DashboardModeChange | dashboard_mode_change | MentraOS | Notify of mode transitions |
DashboardModeQuery | dashboard_mode_query | App | Request current mode |
@mentra/sdk/src/types/dashboard
.
Frequently Asked Questions
Can I send layouts or images?
Not yet. The current release supports plain text only. Rich layouts, images, and interactive elements are planned for future releases.What happens if I write multiple times in a row?
The dashboard keeps only the latest message per app per mode. Each new message replaces the previous one for that specific mode.Is there a character limit?
Yes, to ensure optimal display:- 60 characters maximum