-
Notifications
You must be signed in to change notification settings - Fork 0
templates layout
GitHub Actions edited this page Sep 17, 2026
·
1 revision
Import: import { asRapidLayout, createLayoutTemplate } from "@tundralibs/ui/templates/layout"
asRapidLayout(frame: (body: Html, data: LayoutData) => Html): RapidTemplateTurn any layout into the RapidTemplate<{ body, title? }> that
Application.initialize({ ui: { layout } }) expects. The frame
(nav, sidebar, footer) is fixed at initialize time — it is not
per-request data — so it is a closure, and only body flows through:
ui: { layout: asRapidLayout((body) => SidebarLayout({ header, sidebar, sidebarId, content: body })) }
createLayoutTemplate(config = …: LayoutConfig): RapidTemplateConvenience: a Navbar (+ optional Sidebar) frame from plain config —
StackedLayout without sidebarItems, SidebarLayout with them.
| Prop | Type | Required | Description |
|---|---|---|---|
body |
Html |
yes | |
title |
string |
| Prop | Type | Required | Description |
|---|---|---|---|
brand |
Html |
||
navLinks |
NavbarLink[] |
||
navActions |
Html |
||
sidebarItems |
MenuItem[] |
Guides
Reference