components

package
v1.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

templ: version: v0.3.1001

templ: version: v0.3.1001

templ: version: v0.3.1001

templ: version: v0.3.1001

templ: version: v0.3.1001

templ: version: v0.3.1001

templ: version: v0.3.1001

templ: version: v0.3.1001

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfirmDialog

func ConfirmDialog(props ConfirmDialogProps) templ.Component

ConfirmDialog renders a reusable delete/action confirmation dialog.

func DialogHelpers

func DialogHelpers() templ.Component

DialogHelpers renders the ForgeUI dialog script and provides tuiOpenDialog / tuiCloseDialog helper functions. Safe to include multiple times — functions are always redefined (cheap), but event listeners are only attached once.

func EmptyState

func EmptyState(iconName string, title string, description string) templ.Component

EmptyState renders a centered placeholder with a large muted icon, title, and description.

func FooterAPIDocsLink(href string) templ.Component

FooterAPIDocsLink renders an API Docs link for the sidebar footer.

func PageHeader(title string, count string, description string) templ.Component

PageHeader renders a reusable page header with title, count badge, description, and an actions slot.

func PathRewriter

func PathRewriter(pagesBase string) templ.Component

PathRewriter adds an HTMX configRequest interceptor that rewrites bare page paths (e.g. "/roles/detail") to fully-qualified dashboard extension paths (e.g. "/dashboard/ext/warden/pages/roles/detail").

It also handles htmx.ajax() calls that use partial paths like "/ext/warden/pages/..." by prepending the dashboard base path.

This component should wrap the outermost page content once.

func PluginSections

func PluginSections(sections []templ.Component) templ.Component

PluginSections renders a list of plugin-contributed sections separated by horizontal rules. If sections is empty, nothing is rendered.

func StatCard

func StatCard(iconName string, label string, value string, subtitle string) templ.Component

StatCard renders a dashboard statistics card with an icon, label, value, and optional subtitle.

Types

type ConfirmDialogProps

type ConfirmDialogProps struct {
	ID           string
	Title        string
	Description  string
	ConfirmLabel string
	HxEndpoint   string
	HxMethod     string // "delete" or "post"
}

ConfirmDialogProps holds the properties for a confirmation dialog.

type PaginationMeta

type PaginationMeta struct {
	Total       int64
	Limit       int
	Offset      int
	CurrentPage int
	TotalPages  int
}

PaginationMeta holds pagination metadata for list pages.

func NewPaginationMeta

func NewPaginationMeta(total int64, limit, offset int) PaginationMeta

NewPaginationMeta creates pagination metadata from total count, limit, and offset.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL