standard

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Draggable

func Draggable(config DraggableConfig) vdom.Attr

Draggable creates a Draggable hook attribute.

func Dropdown(config DropdownConfig) vdom.Attr

Dropdown creates a Dropdown hook attribute.

func Sortable

func Sortable(config any) vdom.Attr

Sortable creates a Sortable hook attribute.

func Tooltip

func Tooltip(config TooltipConfig) vdom.Attr

Tooltip creates a Tooltip hook attribute.

Types

type DraggableConfig

type DraggableConfig struct {
	Axis   string `json:"axis,omitempty"` // "x", "y", or "both"
	Handle string `json:"handle,omitempty"`
	Revert bool   `json:"revert,omitempty"`
}

DraggableConfig configures the Draggable hook.

type DropdownConfig struct {
	CloseOnEscape bool `json:"closeOnEscape,omitempty"`
	CloseOnClick  bool `json:"closeOnClick,omitempty"`
}

DropdownConfig configures the Dropdown hook.

type SortableConfig

type SortableConfig struct {
	Group      string `json:"group,omitempty"`
	Animation  int    `json:"animation,omitempty"`
	GhostClass string `json:"ghostClass,omitempty"`
	Handle     string `json:"handle,omitempty"`
	Disabled   bool   `json:"disabled,omitempty"`
}

SortableConfig configures the Sortable hook.

type TooltipConfig

type TooltipConfig struct {
	Content   string `json:"content"`
	Placement string `json:"placement,omitempty"` // top, bottom, left, right
	Delay     int    `json:"delay,omitempty"`     // ms
	Trigger   string `json:"trigger,omitempty"`   // hover, click, focus
}

TooltipConfig configures the Tooltip hook.

Jump to

Keyboard shortcuts

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