Component Detail

H1-H4

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

Example

References

Template
frontend/ui_impl.go
Golden
N/A

Go (Marionette) Example

This implementation example uses Marionette in Go. Source: 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")),
		)
	})
}