Documentation
¶
Index ¶
- func Bind(attr string, v string) htm.Mod
- func BindValue(value htm.TypedValue) htm.Mod
- func Cloak(v ...bool) htm.Mod
- func Data(value ...htm.TypedValue) htm.Mod
- func Effect(v string) htm.Mod
- func For(v string) htm.Mod
- func HTML(v string) htm.Mod
- func ID(v string) htm.Mod
- func If(v string) htm.Mod
- func Ignore(v ...bool) htm.Mod
- func Init(value ...htm.TypedValue) htm.Mod
- func Key(v string) htm.Mod
- func Model(v string) htm.Mod
- func ModelValue(modifiers string, v htm.TypedValue) htm.Mod
- func Modelable(v string) htm.Mod
- func On(event string, v string) htm.Mod
- func Ref(name string) htm.Mod
- func SetBind(n *htm.Node, attr string, v string)
- func SetBindValue(n *htm.Node, value htm.TypedValue)
- func SetCloak(n *htm.Node, v ...bool)
- func SetData(n *htm.Node, value ...htm.TypedValue)
- func SetEffect(n *htm.Node, v string)
- func SetFor(n *htm.Node, v string)
- func SetHTML(n *htm.Node, v string)
- func SetID(n *htm.Node, v string)
- func SetIf(n *htm.Node, v string)
- func SetIgnore(n *htm.Node, v ...bool)
- func SetInit(n *htm.Node, value ...htm.TypedValue)
- func SetKey(n *htm.Node, v string)
- func SetModel(n *htm.Node, v string)
- func SetModelValue(n *htm.Node, modifiers string, v htm.TypedValue)
- func SetModelable(n *htm.Node, v string)
- func SetOn(n *htm.Node, event string, v string)
- func SetRef(n *htm.Node, name string)
- func SetShow(n *htm.Node, v string)
- func SetTeleport(n *htm.Node, selector string)
- func SetText(n *htm.Node, v string)
- func SetTransition(n *htm.Node, modifier ...string)
- func SetTransitionStage(n *htm.Node, stage string, classes string)
- func Show(v string) htm.Mod
- func Teleport(selector string) htm.Mod
- func Text(v string) htm.Mod
- func Transition(modifier ...string) htm.Mod
- func TransitionStage(stage string, classes string) htm.Mod
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BindValue ¶
func BindValue(value htm.TypedValue) htm.Mod
BindValue applies an object of attributes to the element (e.g. x-bind="{...}").
func Data ¶
func Data(value ...htm.TypedValue) htm.Mod
Data defines a chunk of HTML as an Alpine component and provides the reactive data for that component.
func For ¶
For allows to iterate over an array or object to create DOM elements. Must be used on a <template> tag.
func If ¶
If allows to toggle an element in and out of the DOM based on a JS expression. Must be used on a <template> tag.
func Init ¶
func Init(value ...htm.TypedValue) htm.Mod
Init runs an expression when the component is initialized.
func ModelValue ¶
func ModelValue(modifiers string, v htm.TypedValue) htm.Mod
ModelValue binds the value of an input element to a specific data property. It also allows to pass optional modifiers.
func Modelable ¶
Modelable allows to expose any Alpine property as the target of an x-model directive.
func SetBindValue ¶
func SetBindValue(n *htm.Node, value htm.TypedValue)
SetBindValue sets the x-bind attribute (object syntax) on the node.
func SetData ¶
func SetData(n *htm.Node, value ...htm.TypedValue)
SetData sets the x-data attribute on the node.
func SetInit ¶
func SetInit(n *htm.Node, value ...htm.TypedValue)
SetInit sets the x-init attribute on the node.
func SetModelValue ¶
func SetModelValue(n *htm.Node, modifiers string, v htm.TypedValue)
SetModelValue sets the x-model attribute on the node. It also allows to pass optional modifiers.
func SetModelable ¶
SetModelable sets the x-modelable attribute on the node.
func SetTeleport ¶
SetTeleport sets the x-teleport attribute on the node.
func SetTransition ¶
SetTransition sets the x-transition attribute on the node.
func SetTransitionStage ¶
SetTransitionStage applies specific transition classes (e.g. x-transition:enter="..."). Stages: enter, enter-start, enter-end, leave, leave-start, leave-end.
func Show ¶
Show toggles the visibility of an element based on the truthiness of a JavaScript expression.
func Teleport ¶
Teleport allows to transport part of template to another part of the DOM. selector: the DOM selector to append the content to (e.g. "body").
func Transition ¶
Transition enables standard transitions on an element.
Types ¶
This section is empty.