Documentation
¶
Overview ¶
templ: version: v0.3.960
Index ¶
- func Tabs(args TabsArgs) templ.Component
- func TabsContent(args TabsContentArgs) templ.Component
- func TabsList(args TabsListArgs) templ.Component
- func TabsTrigger(args TabsTriggerArgs) templ.Component
- type TabsArgs
- type TabsContentArgs
- type TabsHandler
- func (t *TabsHandler) BuildContentAriaHidden(value string) string
- func (t *TabsHandler) BuildContentShowExpression(value string) string
- func (t *TabsHandler) BuildTriggerAriaSelected(value string) string
- func (t *TabsHandler) BuildTriggerClickHandler(value string) string
- func (t *TabsHandler) BuildTriggerDataClass(value string) string
- func (t *TabsHandler) BuildTriggerStateAttr(value string) string
- func (t *TabsHandler) BuildTriggerTabIndex(value string) string
- type TabsListArgs
- type TabsSignals
- type TabsTriggerArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TabsContent ¶
func TabsContent(args TabsContentArgs) templ.Component
TabsContent displays the content for the active tab
func TabsTrigger ¶
func TabsTrigger(args TabsTriggerArgs) templ.Component
TabsTrigger is a clickable tab button
Types ¶
type TabsArgs ¶
type TabsArgs struct {
// ID is a unique identifier for this tabs instance (required for signal management)
ID string
// DefaultValue sets the initial active tab
DefaultValue string
// Value controls the active tab (for controlled usage)
Value string
// Class allows additional CSS classes to be added
Class string
// Attributes allows additional HTML attributes to be added
Attributes templ.Attributes
}
TabsArgs defines the properties for the Tabs root component
type TabsContentArgs ¶
type TabsContentArgs struct {
// ID is the tabs instance ID (must match the parent Tabs ID)
ID string
// Value identifies this content and associates it with a trigger
Value string
// Class allows additional CSS classes to be added
Class string
// Attributes allows additional HTML attributes to be added
Attributes templ.Attributes
}
TabsContentArgs defines the properties for the TabsContent component
type TabsHandler ¶
type TabsHandler struct {
// contains filtered or unexported fields
}
TabsHandler creates handlers for Tabs component functionality
func NewTabsHandler ¶
func NewTabsHandler(tabsID string, signals *utils.SignalManager) *TabsHandler
NewTabsHandler creates a tabs handler
func (*TabsHandler) BuildContentAriaHidden ¶
func (t *TabsHandler) BuildContentAriaHidden(value string) string
BuildContentAriaHidden creates the aria-hidden attribute expression
func (*TabsHandler) BuildContentShowExpression ¶
func (t *TabsHandler) BuildContentShowExpression(value string) string
BuildContentShowExpression creates the show expression for tab content
func (*TabsHandler) BuildTriggerAriaSelected ¶
func (t *TabsHandler) BuildTriggerAriaSelected(value string) string
BuildTriggerAriaSelected creates the aria-selected attribute expression
func (*TabsHandler) BuildTriggerClickHandler ¶
func (t *TabsHandler) BuildTriggerClickHandler(value string) string
BuildTriggerClickHandler creates the tab trigger click handler
func (*TabsHandler) BuildTriggerDataClass ¶
func (t *TabsHandler) BuildTriggerDataClass(value string) string
BuildTriggerDataClass creates conditional classes for tab triggers
func (*TabsHandler) BuildTriggerStateAttr ¶
func (t *TabsHandler) BuildTriggerStateAttr(value string) string
BuildTriggerStateAttr creates the data-state attribute expression
func (*TabsHandler) BuildTriggerTabIndex ¶
func (t *TabsHandler) BuildTriggerTabIndex(value string) string
BuildTriggerTabIndex creates the tabindex attribute expression
type TabsListArgs ¶
type TabsListArgs struct {
// Class allows additional CSS classes to be added
Class string
// Attributes allows additional HTML attributes to be added
Attributes templ.Attributes
}
TabsListArgs defines the properties for the TabsList component
type TabsSignals ¶
type TabsSignals struct {
Active string `json:"active"`
}
TabsSignals defines the signal structure for tabs components
type TabsTriggerArgs ¶
type TabsTriggerArgs struct {
// ID is the tabs instance ID (must match the parent Tabs ID)
ID string
// Value identifies this trigger and associates it with content
Value string
// Disabled makes the trigger non-interactive
Disabled bool
// Class allows additional CSS classes to be added
Class string
// Attributes allows additional HTML attributes to be added
Attributes templ.Attributes
}
TabsTriggerArgs defines the properties for the TabsTrigger component