Documentation
¶
Overview ¶
templ: version: v0.3.977
templ: version: v0.3.977
Index ¶
Constants ¶
View Source
const DrawerID = "dashboard"
DrawerID is the fixed ID for the dashboard's sidebar drawer.
Variables ¶
This section is empty.
Functions ¶
func Dashboard ¶
func Dashboard(props DashboardProps) templ.Component
Types ¶
type AppBranding ¶
type AppBranding struct {
// Name is the application name shown in headers/sidebars
Name string
// LogoFullUrl is the URL to the full logo image
// e.g. https://example.com/logo-full.png
LogoFullUrl string
// Href is the logo click destination (defaults to "/")
Href string
}
AppBranding configures application branding used across layouts. This is shared between Dashboard, Auth pages, and other layouts.
func (AppBranding) DefaultHref ¶
func (b AppBranding) DefaultHref() string
DefaultHref returns the href to use, defaulting to "/" if not set.
func (AppBranding) DefaultLogoUrl ¶
func (b AppBranding) DefaultLogoUrl() string
DefaultLogoUrl returns the logo URL to use, defaulting to "/assets/logo.png" if not set.
func (AppBranding) DefaultName ¶
func (b AppBranding) DefaultName() string
DefaultName returns the name to use, defaulting to "App" if not set.
type DashboardProps ¶
type DashboardProps struct {
BaseProps
// App configures branding in sidebar header
App AppBranding
// User configures the user section in sidebar footer
User UserInfo
// UserMenu items shown in the user dropdown
UserMenu []UserMenuItem
Nav []NavGroup
// CurrentPath highlights the active nav item
CurrentPath string
// ShowDetailPanel enables the right-side detail panel (controlled by Datastar signals)
ShowDetailPanel bool
// HeaderActions is an optional slot for action buttons in the navbar
HeaderActions templ.Component
// ThemeToggle enables a light/dark theme toggle in the navbar.
// When set, a sun/moon toggle appears in the navbar end section.
ThemeToggle *ThemeToggleConfig
}
DashboardProps configures the dashboard layout.
type PanelSignals ¶
type PanelSignals struct {
Open bool `json:"open"`
}
PanelSignals holds the reactive state for the right-side detail panel.
type ThemeToggleConfig ¶ added in v0.0.7
type ThemeToggleConfig struct {
DarkTheme string // theme name when toggled on (e.g. "dark")
LightTheme string // theme name when toggled off (e.g. "silk")
}
ThemeToggleConfig configures the theme toggle in the navbar header.
Click to show internal directories.
Click to hide internal directories.