Component Detail
Input
Single-line text and value input control
Example
References
- Template
templates/components/input.tmpl- Golden
testdata/golden/input.golden.html
Go (Marionette) Example
This implementation example uses Marionette in Go. Source: docs/site-astro/public/examples/go/input.go
package goexamples
import (
mb "github.com/YoshihideShirai/marionette/backend"
mf "github.com/YoshihideShirai/marionette/frontend"
)
func RegisterInputExample(app *mb.App) {
app.Page("/input", func(ctx *mb.Context) mf.Node {
return mf.InputWithOptions("start_date", "2030-01-01", mf.InputOptions{
Type: "date",
Placeholder: "Start date",
Required: true,
Props: mf.ComponentProps{Size: "sm"},
})
})
}