Layout

Layout

A complete HTML document with embedded CSS and theme attributes.

components.Layout · LayoutProps

Give the layout a full page

This component owns document or application landmarks. Open its standalone preview to see it in context.

Open layout preview

Use it well.

Use once per document. Pass the body component and optional trusted Head metadata. Appearance controls tokens; the application owns its preferences.

Explore the full demo →

This is the source compiled for the preview. Select the text to copy it, or download the file. Change the package name and demo routes for your application.

package examples

import "github.com/Tend-Stack/TendUI/v2026/components"

templ ExampleLayout() {
	@components.Layout(components.LayoutProps{Title: "A TendUI page", Language: "en", Theme: components.ThemeLight}, exampleLayoutBody())
}

templ exampleLayoutBody() {
	<main><h1>A page from one Go binary.</h1><p>Semantic HTML, an embedded stylesheet, and a system font.</p><a href="/catalog/layout">Back to Layout</a></main>
}