コンポーネント詳細
Tabs
Tabbed navigation for switching related views
サンプル
参照情報
- テンプレート
templates/components/tabs.html- ゴールデン
testdata/golden/tabs.golden.html
Go(Marionette)サンプル
この実装例は Go の Marionette を使っています。ソース: docs/site-astro/public/examples/go/tabs.go
package goexamples
import (
mb "github.com/YoshihideShirai/marionette/backend"
mf "github.com/YoshihideShirai/marionette/frontend"
)
func RegisterTabsExample(app *mb.App) {
app.Page("/tabs", func(ctx *mb.Context) mf.Node {
return mf.Tabs(mf.TabsProps{
AriaLabel: "User sections",
Items: []mf.TabsItem{
{Label: "Profile", Href: "/users/1/profile", Active: true},
{Label: "Permissions", Href: "/users/1/permissions"},
{Label: "Audit", Disabled: true},
},
})
})
}