コンポーネント詳細

H1-H4

Semantic heading node helpers (H1-H4 and props variants).

サンプル

参照情報

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

Go(Marionette)サンプル

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

package goexamples

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

func RegisterHeadingExample(app *mb.App) {
	app.Page("/heading", func(ctx *mb.Context) mf.Node {
		return mf.Stack(mf.StackProps{Gap: "sm"},
			mf.H1(mf.Text("Heading helper example")),
			mf.H2(mf.Text("H2 subtitle")),
			mf.H3(mf.Text("H3 section")),
			mf.H4(mf.Text("H4 caption")),
		)
	})
}