LayoutManager
TheLayoutManager is responsible for sending display requests to MentraOS Cloud to show layouts in the AR view. It provides methods for displaying different types of content in the user’s field of view.
You access the LayoutManager through the layouts property of a AppSession instance:
Layout Methods
showTextWall()
Displays a single, primary block of text.text: The text content to displayoptions: Optional parametersview: Target view (ViewType.MAINorViewType.DASHBOARD). Defaults toMAINdurationMs: Optional duration in milliseconds to show the layout
showDoubleTextWall()
Displays two blocks of text, one above the other.topText: Text for the top sectionbottomText: Text for the bottom sectionoptions: Optional parametersview: Target view (ViewType.MAINorViewType.DASHBOARD). Defaults toMAINdurationMs: Optional duration in milliseconds
showReferenceCard()
Displays a card with a title and main content text.title: The title of the cardtext: The main content text of the cardoptions: Optional parametersview: Target view (ViewType.MAINorViewType.DASHBOARD). Defaults toMAINdurationMs: Optional duration in milliseconds
showDashboardCard()
Displays a card suitable for dashboards, typically showing a key-value pair.leftText: Text for the left side (often a label)rightText: Text for the right side (often a value)options: Optional parametersview: Target view (ViewType.MAINorViewType.DASHBOARD). Defaults toDASHBOARDdurationMs: Optional duration in milliseconds
Layout Types
The LayoutManager uses several layout types internally. For reference, these are:TextWall
DoubleTextWall
ReferenceCard
DashboardCard
View Types
TheViewType enum is used to specify where in the AR display the layout should appear:
Best Practices
- Choose the Right Layout: Select the layout type that best fits your content’s structure.
- Keep Text Concise: Screen space in AR glasses is limited. Keep your text brief and to the point.
-
Use Duration Wisely:
- For important information, use longer durations or no duration (persistent until replaced)
- For notifications or transient information, use shorter durations (2-5 seconds)
- Dashboard vs. Main View:

