コンポーネント詳細

AppShell

Application shell with sidebar, flashes, header, and content regions.

サンプル

参照情報

テンプレート
frontend/ui_impl.go
ゴールデン
N/A

Go(Marionette)サンプル

この実装例は Go の Marionette を使っています。ソース: docs/site-astro/public/examples/go/app-shell.go

package goexamples

import (
	mb "github.com/YoshihideShirai/marionette/backend"
	mf "github.com/YoshihideShirai/marionette/frontend"
)

func RegisterAppShellExample(app *mb.App) {
	app.Page("/app-shell", func(ctx *mb.Context) mf.Node {
		return mf.AppShell(mf.AppShellProps{
			Header:  mf.H2(mf.Text("Workspace")),
			Content: mf.TextComponent(mf.TextProps{Text: "Main content rendered inside AppShell.", Tone: "muted"}),
		})
	})
}