コンポーネント詳細

Region

ID-addressable content region designed for partial updates.

サンプル

参照情報

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

Go(Marionette)サンプル

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

package goexamples

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

func RegisterRegionExample(app *mb.App) {
	app.Page("/region", func(ctx *mb.Context) mf.Node {
		return mf.Region(mf.RegionProps{ID: "summary-region"},
			mf.Card(mf.CardProps{Title: "Summary"}, mf.TextComponent(mf.TextProps{Text: "Region content can be updated independently."})),
		)
	})
}