Component Detail

PageHeader

Page title, description, and action header.

Example

References

Template
templates/components/page_header.html
Golden
testdata/golden/page_header.golden.html

Go (Marionette) Example

This implementation example uses Marionette in Go. Source: docs/site-astro/public/examples/go/page-header.go

package goexamples

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

func RegisterPageHeaderExample(app *mb.App) {
	app.Page("/page-header", func(ctx *mb.Context) mf.Node {
		return mf.PageHeader(mf.PageHeaderProps{
			Title:       "Users",
			Description: "Manage account records.",
			Actions:     mf.Button("Create", mf.ComponentProps{Size: "sm"}),
		})
	})
}