components

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Rendered for js/wasm

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func A

func A(children ...Node) Node

func B added in v0.2.0

func B(children ...Node) Node

func BindText

func BindText[T any](value func() T) Node

func Br added in v0.2.0

func Br() Node

func Button

func Button(children ...Node) Node

func Div

func Div(children ...Node) Node

func Elem

func Elem(name string, children ...Node) Node

func Form

func Form(children ...Node) Node

func H1

func H1(children ...Node) Node

func H2

func H2(children ...Node) Node

func H3

func H3(children ...Node) Node

func H4

func H4(children ...Node) Node

func H5

func H5(children ...Node) Node

func I added in v0.2.0

func I(children ...Node) Node

func Img

func Img(children ...Node) Node

func Input

func Input(children ...Node) Node

func Li

func Li(children ...Node) Node

func Ol

func Ol(children ...Node) Node

func P

func P(children ...Node) Node

func S added in v0.2.0

func S(children ...Node) Node

func Span

func Span(children ...Node) Node

func Text

func Text(content any) Node

func U added in v0.2.0

func U(children ...Node) Node

func Ul

func Ul(children ...Node) Node

Types

type Attr

type Attr = Attribute

type Attribute added in v0.2.0

type Attribute map[string]any

func (Attribute) Apply added in v0.2.0

func (a Attribute) Apply(parent any) (func() error, error)

type Event

type Event struct {
	// contains filtered or unexported fields
}

func (Event) CurrentTarget

func (e Event) CurrentTarget() js.Value

CurrentTarget returns the current target of the event.

func (Event) PreventDefault

func (e Event) PreventDefault()

PreventDefault prevents the default action associated with the event.

func (Event) StopPropagation

func (e Event) StopPropagation()

StopPropagation stops the event from propagating further.

func (Event) Target

func (e Event) Target() js.Value

Target returns the event target.

func (Event) Value

func (e Event) Value() js.Value

Value returns the underlying js.Value of the event.

type EventInput

type EventInput struct{ Event }

https://developer.mozilla.org/en-US/docs/Web/API/InputEvent

func (EventInput) Data

func (e EventInput) Data() string

Data returns the characters generated by the input event.

func (EventInput) InputType

func (e EventInput) InputType() string

InputType returns the type of input that generated the event.

func (EventInput) InputValue

func (e EventInput) InputValue() string

InputValue returns the current value of the input element.

type EventKeyboard

type EventKeyboard struct{ Event }

https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent

func (EventKeyboard) AltKey

func (e EventKeyboard) AltKey() bool

AltKey indicates whether the "Alt" key was pressed.

func (EventKeyboard) Code

func (e EventKeyboard) Code() string

Code returns the physical key on the keyboard.

func (EventKeyboard) CtrlKey

func (e EventKeyboard) CtrlKey() bool

CtrlKey indicates whether the "Control" key was pressed.

func (EventKeyboard) Key

func (e EventKeyboard) Key() string

Key returns the value of the key pressed by the user.

func (EventKeyboard) MetaKey

func (e EventKeyboard) MetaKey() bool

MetaKey indicates whether the "Meta" key was pressed.

func (EventKeyboard) Repeat

func (e EventKeyboard) Repeat() bool

Repeat indicates whether the key is being held down such that it is automatically repeating.

func (EventKeyboard) ShiftKey

func (e EventKeyboard) ShiftKey() bool

ShiftKey indicates whether the "Shift" key was pressed.

type EventMouse

type EventMouse struct{ Event }

https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent

func (EventMouse) ClientX

func (e EventMouse) ClientX() int

ClientX returns the horizontal coordinate of the mouse pointer.

func (EventMouse) ClientY

func (e EventMouse) ClientY() int

ClientY returns the vertical coordinate of the mouse pointer.

type On

type On map[string]any // map[string]func[T Event](*T)

func (On) Apply added in v0.2.0

func (o On) Apply(parent any) (func() error, error)

type Style

type Style map[string]any

func (Style) Apply added in v0.2.0

func (s Style) Apply(parent any) (func() error, error)

Jump to

Keyboard shortcuts

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