-
Notifications
You must be signed in to change notification settings - Fork 0
templates core
GitHub Actions edited this page Sep 17, 2026
·
1 revision
Import: import { createCoreTemplate } from "@tundralibs/ui/templates/core"
createCoreTemplate(options = …: CoreOptions): RapidTemplateBuilds the document shell — Application.initialize({ ui: { core: createCoreTemplate({...}) } }). Head/meta/viewport, this library's
assets (CDN or self-hosted), a skip-link and the toast region.
Where the document shell loads ui.css / ui.js from.
-
"cdn"(default): the versioned jsDelivr URLs from version.ts, with subresource integrity — zero setup, one fewer thing to serve. -
A URL prefix such as
"/ui": self-hosted. The app mounts the package'sdist/there (server.static: { "/ui": { root, fingerprint: true } }, seecopyUiAssets()in@tundralibs/ui/assets) and every URL goes throughview.asset()for cache-busting (§8). -
"cdn" -
/${string}
| Prop | Type | Required | Description |
|---|---|---|---|
assets |
CoreAssets |
||
lang |
string |
<html lang>. @default "en" |
|
stylesheets |
typeOperator |
Extra stylesheets after ui.css — a theme override file, fonts. A path starting with / is passed through view.asset(); anything else (a full URL) is used verbatim. |
|
scripts |
typeOperator |
Extra scripts after ui.js, same path rules as stylesheets. An object form carries a subresource-integrity hash for a third-party CDN script (e.g. APEXCHARTS from @tundralibs/ui/chart). |
|
head |
Html |
Extra <head> markup (preconnects, icons) — constant, not per-request. |
|
toastRegion |
boolean |
Render the shared ToastRegion every page gets. @default true |
|
history |
boolean |
Also load rAPId's opt-in history module (/__rapid/history.js) — pair with ui: { history: true }. @default false |
|
live |
boolean |
Also load rAPId's live bridge (/__rapid/live.js) — pair with ui: { live: true }. @default false |
-
CoreTemplate:RapidTemplate— The zero-config shell: assets from the versioned CDN.
Guides
Reference