Root template
Crema root view
Section titled “Crema root view”Set inertia.root_view to a Crema view name (for example app). The manager renders:
| Binding | Content |
|---|---|
page |
Raw JSON string of the page object |
pageAttr |
HTML-attribute-escaped JSON (safe for data-page="…") |
vite |
Tags from Vite.tags(*viteEntries) or "" if unresolved |
Example:
<!DOCTYPE html><html> <head> <meta charset="utf-8" /> {!! vite !!} </head> <body> <div id="app" data-page="{!! pageAttr !!}"></div> </body></html>Crema must be registered (CremaServiceProvider) so InertiaServiceProvider can attach CremaEngine at boot.
Plain HTML root
Section titled “Plain HTML root”When rootView is null, or Crema is missing, the manager uses rootHtml (config inertia.root_html or the built-in default).
Placeholders:
@page→ escaped JSON (for attributes)@vite→ Vite tags string
Default shell includes a #app div with data-page='@page'.
Vite entries
Section titled “Vite entries”InertiaManager.viteEntries defaults to ["src/main/resources/js/app.js"]. Set to empty to omit tags even when a manifest exists.