コンポーネント詳細
Card
Card surface with optional header metadata.
サンプル
参照情報
- テンプレート
templates/components/card.html- ゴールデン
testdata/golden/card.golden.html
Go(Marionette)サンプル
この実装例は Go の Marionette を使っています。ソース: docs/site-astro/public/examples/go/card.go
package goexamples
import (
mb "github.com/YoshihideShirai/marionette/backend"
mf "github.com/YoshihideShirai/marionette/frontend"
)
func RegisterCardExample(app *mb.App) {
app.Page("/card", func(ctx *mb.Context) mf.Node {
return mf.Card(mf.CardProps{
Title: "Workspace summary",
Description: "Header, description, actions, then body content.",
Actions: mf.Button("Edit", mf.ComponentProps{Variant: "ghost", Size: "sm"}),
}, mf.TextComponent(mf.TextProps{Text: "Ready"}))
})
}