Documentation
¶
Overview ¶
templ: version: v0.3.960
Index ¶
- func DropdownMenu(args DropdownMenuArgs) templ.Component
- func DropdownMenuContent(args DropdownMenuContentArgs) templ.Component
- func DropdownMenuGroup(args DropdownMenuGroupArgs) templ.Component
- func DropdownMenuItem(args DropdownMenuItemArgs) templ.Component
- func DropdownMenuLabel(args DropdownMenuLabelArgs) templ.Component
- func DropdownMenuSeparator(args DropdownMenuSeparatorArgs) templ.Component
- func DropdownMenuShortcut(args DropdownMenuShortcutArgs) templ.Component
- func DropdownMenuTrigger(args DropdownMenuTriggerArgs) templ.Component
- type DropdownHandler
- type DropdownMenuArgs
- type DropdownMenuContentArgs
- type DropdownMenuGroupArgs
- type DropdownMenuItemArgs
- type DropdownMenuLabelArgs
- type DropdownMenuSeparatorArgs
- type DropdownMenuShortcutArgs
- type DropdownMenuTriggerArgs
- type DropdownSignals
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DropdownMenu ¶
func DropdownMenu(args DropdownMenuArgs) templ.Component
DropdownMenu renders the main dropdown wrapper with Datastar state management
func DropdownMenuContent ¶
func DropdownMenuContent(args DropdownMenuContentArgs) templ.Component
DropdownMenuContent renders the dropdown content panel
func DropdownMenuGroup ¶
func DropdownMenuGroup(args DropdownMenuGroupArgs) templ.Component
DropdownMenuGroup renders a logical grouping of menu items
func DropdownMenuItem ¶
func DropdownMenuItem(args DropdownMenuItemArgs) templ.Component
DropdownMenuItem renders a clickable menu item
func DropdownMenuLabel ¶
func DropdownMenuLabel(args DropdownMenuLabelArgs) templ.Component
DropdownMenuLabel renders a non-interactive label
func DropdownMenuSeparator ¶
func DropdownMenuSeparator(args DropdownMenuSeparatorArgs) templ.Component
DropdownMenuSeparator renders a visual separator
func DropdownMenuShortcut ¶
func DropdownMenuShortcut(args DropdownMenuShortcutArgs) templ.Component
DropdownMenuShortcut renders keyboard shortcut text
func DropdownMenuTrigger ¶
func DropdownMenuTrigger(args DropdownMenuTriggerArgs) templ.Component
DropdownMenuTrigger renders the trigger button that opens/closes the dropdown
Types ¶
type DropdownHandler ¶
type DropdownHandler struct {
// contains filtered or unexported fields
}
DropdownHandler creates handlers for dropdown components
type DropdownMenuArgs ¶
type DropdownMenuArgs struct {
// ID provides a unique identifier for the dropdown (auto-generated if not provided)
ID string
// Class allows additional CSS classes to be added
Class string
// Attributes allows additional HTML attributes to be added
Attributes templ.Attributes
// Open controls the open state (for controlled usage)
Open bool
// DefaultOpen sets the initial open state
DefaultOpen bool
}
DropdownMenuArgs defines the properties for the DropdownMenu root component
type DropdownMenuContentArgs ¶
type DropdownMenuContentArgs struct {
// ID is the dropdown identifier (required to link to the correct dropdown)
ID string
// Class allows additional CSS classes to be added
Class string
// Attributes allows additional HTML attributes to be added
Attributes templ.Attributes
// Align specifies the alignment relative to the trigger
// Options: "start", "center", "end"
Align string
// Side specifies which side of the trigger to align to
// Options: "top", "right", "bottom", "left"
Side string
// SideOffset specifies the distance from the trigger
SideOffset int
}
DropdownMenuContentArgs defines the properties for the DropdownMenuContent component
type DropdownMenuGroupArgs ¶
type DropdownMenuGroupArgs struct {
// ID is the dropdown identifier (optional for groups)
ID string
// Class allows additional CSS classes to be added
Class string
// Attributes allows additional HTML attributes to be added
Attributes templ.Attributes
}
DropdownMenuGroupArgs defines the properties for the DropdownMenuGroup component
type DropdownMenuItemArgs ¶
type DropdownMenuItemArgs struct {
// ID is the dropdown identifier (required to link to the correct dropdown)
ID string
// Class allows additional CSS classes to be added
Class string
// Attributes allows additional HTML attributes to be added
Attributes templ.Attributes
// Inset adds left padding for nested items
Inset bool
// Variant defines the visual style of the item
// Options: "default", "destructive"
Variant string
// Disabled makes the item non-interactive
Disabled bool
// AsChild renders the item as a child element (for composition)
AsChild bool
// OnClick is an optional Datastar expression to execute after closing the dropdown
// Example: "@post('/api/action')" or "$mySignal = true"
OnClick string
}
DropdownMenuItemArgs defines the properties for the DropdownMenuItem component
type DropdownMenuLabelArgs ¶
type DropdownMenuLabelArgs struct {
// ID is the dropdown identifier (optional for labels)
ID string
// Class allows additional CSS classes to be added
Class string
// Attributes allows additional HTML attributes to be added
Attributes templ.Attributes
// Inset adds left padding for nested labels
Inset bool
}
DropdownMenuLabelArgs defines the properties for the DropdownMenuLabel component
type DropdownMenuSeparatorArgs ¶
type DropdownMenuSeparatorArgs struct {
// ID is the dropdown identifier (optional for separators)
ID string
// Class allows additional CSS classes to be added
Class string
// Attributes allows additional HTML attributes to be added
Attributes templ.Attributes
}
DropdownMenuSeparatorArgs defines the properties for the DropdownMenuSeparator component
type DropdownMenuShortcutArgs ¶
type DropdownMenuShortcutArgs struct {
// ID is the dropdown identifier (optional for shortcuts)
ID string
// Class allows additional CSS classes to be added
Class string
// Attributes allows additional HTML attributes to be added
Attributes templ.Attributes
}
DropdownMenuShortcutArgs defines the properties for the DropdownMenuShortcut component
type DropdownMenuTriggerArgs ¶
type DropdownMenuTriggerArgs struct {
// ID is the dropdown identifier (required to link to the correct dropdown)
ID string
// Class allows additional CSS classes to be added
Class string
// Attributes allows additional HTML attributes to be added
Attributes templ.Attributes
// AsChild renders the trigger as a child element (for composition)
AsChild bool
// Disabled makes the trigger non-interactive
Disabled bool
}
DropdownMenuTriggerArgs defines the properties for the DropdownMenuTrigger component
type DropdownSignals ¶
type DropdownSignals struct {
Open bool `json:"open"`
}
DropdownSignals defines the signal structure for dropdown components