Display layers hold the UI that does not belong to one page but still has to stay visible: a global background, a permanent status bar, a shared mask, a floating hint.
What display layers are
A normal page lives on the active screen, so it leaves when the project switches pages. A display layer belongs to the display itself, so its content keeps drawing while pages change underneath it.
In the editor a layer is authored as a screen of its own: that screen's root is attached to the layer instead of being loaded as a page, so you place widgets, lay them out and style them exactly as you would on a normal screen.
The display stacks four planes, and the Navigator lists them in this top-down order:
| Layer | Position | Best for |
|---|---|---|
| System layer | Highest | UI that must stay above everything else |
| Top layer | Above the page | Persistent bars, floating buttons, masks |
| Screen layer | The page itself | The current page's own content |
| Bottom layer | Below the page | Global backgrounds and decorative backdrops |
This matches how LVGL describes them in Screen Layers and Layers: the top and system layers are transparent and do not receive clicks by default, and the bottom layer sits under the active screen, transparent but still clickable.
What each layer is for
Screen layer
The Screen layer is where your normal pages live. It carries the content of whichever page is currently loaded, and it changes when the project navigates.
Put here:
- the layout of a single page
- its buttons, lists, forms, and charts
- titles, labels, and images that belong to that page only
- anything that should enter and leave with the page
If a piece of content is used on one page and does not need to persist, it belongs on the Screen layer.
Top layer
The top layer is drawn above the active screen and is visible on every page, which makes it the natural home for shared UI that is still part of your product rather than the system.
Put here:
- a top navigation bar, title bar, or tab bar
- a global floating button
- a popup host or a mask that covers the page
- a banner or status strip that several pages share
The layer's own root does not take clicks, so touches fall through the empty area onto the page below, while the widgets you place on the layer still receive them. That is what lets one layer carry a mask or a popup host.
Note:
- The layer root is not scrollable, so do not put content there that needs scrolling to read.
- It is transparent by default, so it never hides the page on its own.
- If you give it a background colour, set its opacity too - the layer stays see-through otherwise.
System layer
The system layer is drawn above the top layer and has the highest priority. The example LVGL gives for it is the mouse cursor, because that has to stay over everything at all times.
Put here:
- a cursor or touch indicator
- system-level notices
- an urgent overlay that must cover all of your own UI
- debug overlays such as performance readouts
When content merely needs to stay fixed, use the top layer. Reach for the system layer only when it must stay above everything.
Note:
- Like the top layer, its root is not scrollable and does not take clicks.
- It is transparent by default, but anything you place on it covers all of your page UI.
- Keep ordinary product content off it.
Bottom layer
The bottom layer sits under the active screen and is available on LVGL 9.x targets only. As LVGL points out, it only shows through where the active screen's background is not fully opaque.
Put here:
- a global background image
- a fixed decorative plate
- anything meant to show through semi-transparent pages
- a shared texture or ambience layer
Note:
- If the current page paints a fully opaque background, its content is simply not visible - plan for that.
- It is not scrollable, but it does receive clicks.
- On an 8.x target the New layer menu does not offer it. A document that still places a screen on the bottom layer is reported as Unsupported display layer: preview shows that screen as a normal page, and the export refuses to build it.
- Use it for backgrounds, not for foreground controls that have to stay visible.
When to use one, and when not
A display layer is the right tool when:
- content has to survive a page switch
- several pages share the same overlay
- something must stay fixed above or below your normal pages
It is the wrong tool when:
- the content belongs to a single page
- it should enter and leave together with the page
- you only need front-to-back ordering inside one page
A simple rule: if it should follow the page, use a normal screen; if it should stay on the display, use a display layer.
Authoring a layer in the editor
1. Create the layer's screen from the Navigator
The Navigator's screen list sits under a Display layer heading, and the rows under it name the plane you are looking at: System layer, Top layer, Screen layer, Bottom layer. Screen layer is always there; a layer row appears only once a screen lives on that layer.
Open the New layer menu next to the heading and pick the layer you want. The editor creates that layer's screen and puts the canvas on it; the list itself stays on the screens you came from until you pick the new layer's row. Only layers that are still free and that your project's target LVGL version provides are offered, which is why Bottom layer is missing on an 8.x target. Once a layer has its screen, the menu stops offering it.
The screen takes a name after its layer - top_layer_screen, sys_layer_screen, bottom_layer_screen - so you find it by the same name in the tree and in the exported sources, such as setup_top_layer_screen.c.
2. Edit it like any other screen
The canvas shows the layer's own content, marked with a pill such as Editing the Top layer. By default you see that layer's screen on its own rather than stacked over a page; the synthesize toggle at the start of the Display layer heading switches this. Turn it on to composite every layer on the canvas the way the device draws it, and off again to isolate the layer you are editing. Preview always shows the composited result, so the stacking itself is something you confirm there.
Editing works as usual: drop widgets from the widget bar, position them, style them. The layer itself is already sized to the display and stripped of padding, border, rounding and scrolling, so you only add content. If you paint a background on it, give that background an opacity as well.
A layer screen is always exported as a global screen, so the inspector shows no Scope row for it - other pages reference its widgets, and that needs the wider linkage.
3. Keep one screen per layer
Each layer hosts a single persistent root, so it maps to one screen:
- The editor cannot place a second screen on a layer. If a project still carries two - from a hand-written document, for instance - the Problems tab reports Display layer already in use. Both are still built and drawn one over the other in screen list order, which is rarely what you meant, so move that content or delete the extra screen.
- Pick the layer when you create the screen. Nothing turns a layer screen back into a normal page afterwards, so giving up a layer means deleting its screen with Delete layer.
- Leave at least one normal screen in the project. The exported
setup_ui()loads the first screen that has no layer, so a project whose every screen is a layer has no page to open on, which the Problems tab reports. - Only screens can sit on a layer. A Symbol is a reusable widget definition, not a page, and has no layer of its own.
- The order of the screen list matters: the first screen claiming a layer is the one that owns it, and screens are set up in that order.
4. Check the stacking in preview
Layer content stays put while you move between pages. Preview is where you confirm it actually behaves as intended:
- does this content really need to persist across pages
- is anything clickable on the page falling under a layer you made interactive
- does a top-most hint cover content that should be readable
- does the bottom layer's background actually show through your pages
- does the shared bar still look right on every page it now spans
Tips
- Use layers sparingly. They are made for shared UI, not for holding a large amount of page content.
- Prefer the top layer over the system layer. Reserve the system layer for the few things that truly must stay on top.
- One responsibility per layer. A background on the bottom layer and shared floating UI on the top layer stays legible; both on one layer does not.
- Decide the layer before you design the content. Authoring a bar as a normal page and only later moving it means the structure, the layer expectations and the event targets all have to be revisited.
- Keep event handlers on a layer pointed at the layer. A handler that reaches into a widget of one particular page is reported, because the layer outlives the page it reaches into. Switching pages is fine.