コンポーネント詳細
DashWind Shell
Responsive DashWind admin shell with drawer navigation, topbar search, actions, and user menu.
サンプル
参照情報
- テンプレート
frontend/dashwind/dashwind.go- ゴールデン
N/A
Go(Marionette)サンプル
この実装例は Go の Marionette を使っています。ソース: docs/site-astro/public/examples/go/dashwind-shell.go
package goexamples
import (
mb "github.com/YoshihideShirai/marionette/backend"
mf "github.com/YoshihideShirai/marionette/frontend"
dw "github.com/YoshihideShirai/marionette/frontend/dashwind"
)
func RegisterDashwindShellExample(app *mb.App) {
app.Page("/dashwind-shell", func(ctx *mb.Context) mf.Node {
return dw.Shell(dw.ShellProps{
Brand: dw.Brand{Title: "DashWind", Subtitle: "Admin kit", Mark: "D", Href: "#"},
CurrentPath: "/dashboard",
Navigation: dw.Navigation{{Label: "Workspace", Items: []dw.NavItem{
{Path: "/dashboard", Label: "Dashboard", Icon: "▦"},
{Path: "/customers", Label: "Customers", Icon: "☷", Badge: "12"},
}}},
SearchPlaceholder: "Search dashboard",
User: dw.UserMenu{Name: "Ada Lovelace", Email: "ada@example.com", Initials: "AL"},
}, dw.CardPanel(dw.CardPanelProps{Title: "Shell content", Description: "Responsive drawer, topbar, search, actions, and user menu."}, mf.Text("Ready for htmx fragments.")))
})
}