Component Detail
TextComponent
Semantic text helper with size, weight, and tone options.
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/text-component.go
package goexamples
import (
mb "github.com/YoshihideShirai/marionette/backend"
mf "github.com/YoshihideShirai/marionette/frontend"
)
func RegisterTextComponentExample(app *mb.App) {
app.Page("/text-component", func(ctx *mb.Context) mf.Node {
return mf.Stack(mf.StackProps{Gap: "sm"},
mf.TextComponent(mf.TextProps{Text: "Display text", Size: "xl", Weight: "semibold"}),
mf.TextComponent(mf.TextProps{Text: "Supportive body copy", Tone: "muted"}),
)
})
}