el

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

This file re-exports vdom attribute helpers for the el package.

Package el provides the UI DSL for Vango.

It re-exports HTML element constructors, attribute helpers, event helpers, and common VDOM utilities from github.com/vango-go/vango/pkg/vdom.

Typical usage:

import (
    "github.com/vango-go/vango/pkg/vango"
    . "github.com/vango-go/vango/el"
)

This keeps the DSL in a dedicated package while the reactive APIs live in vango.

This file re-exports vdom element constructors for the el package.

This file re-exports vdom event helpers for the el package.

This file re-exports vdom helper functions for the el package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Accept

func Accept(types string) vdom.Attr

func AccessKey

func AccessKey(key string) vdom.Attr

func Action

func Action(url string) vdom.Attr

func Allow

func Allow(value string) vdom.Attr

func Allowfullscreen

func Allowfullscreen(allowfullscreen ...bool) vdom.Attr

func Alt

func Alt(text string) vdom.Attr

func AriaAtomic

func AriaAtomic(atomic bool) vdom.Attr

func AriaBusy

func AriaBusy(busy bool) vdom.Attr

func AriaControls

func AriaControls(id string) vdom.Attr

func AriaCurrent

func AriaCurrent(value string) vdom.Attr

func AriaDescribedBy

func AriaDescribedBy(id string) vdom.Attr

func AriaDisabled

func AriaDisabled(disabled bool) vdom.Attr

func AriaExpanded

func AriaExpanded(expanded bool) vdom.Attr

func AriaHasPopup

func AriaHasPopup(value string) vdom.Attr

func AriaHidden

func AriaHidden(hidden bool) vdom.Attr

func AriaLabel

func AriaLabel(label string) vdom.Attr

func AriaLabelledBy

func AriaLabelledBy(id string) vdom.Attr

func AriaLive

func AriaLive(mode string) vdom.Attr

func AriaModal

func AriaModal(modal bool) vdom.Attr

func AriaPressed

func AriaPressed(pressed string) vdom.Attr

func AriaSelected

func AriaSelected(selected bool) vdom.Attr

func AriaValueMax

func AriaValueMax(value float64) vdom.Attr

func AriaValueMin

func AriaValueMin(value float64) vdom.Attr

func AriaValueNow

func AriaValueNow(value float64) vdom.Attr

func Async

func Async(async ...bool) vdom.Attr

func Attr

func Attr(key string, value any) vdom.Attr

Attr creates an arbitrary attribute by key. This is the primary extensibility escape hatch for attributes not covered by dedicated helpers (e.g. data-*, ARIA variants not yet wrapped, etc.).

func AttrIf

func AttrIf(condition bool, a vdom.Attr) vdom.Attr

func Autocomplete

func Autocomplete(value string) vdom.Attr

func Autofocus

func Autofocus(autofocus ...bool) vdom.Attr

func Autoplay

func Autoplay(autoplay ...bool) vdom.Attr

func Capture

func Capture(mode string) vdom.Attr

func Charset

func Charset(charset string) vdom.Attr

func Checked

func Checked(checked ...bool) vdom.Attr

func Class

func Class(classes ...string) vdom.Attr

func ClassIf

func ClassIf(condition bool, class string) vdom.Attr

func Classes

func Classes(classes ...any) vdom.Attr

func Cols

func Cols(n int) vdom.Attr

func Colspan

func Colspan(n int) vdom.Attr

func Content

func Content(content string) vdom.Attr

func ContentEditable

func ContentEditable(editable bool) vdom.Attr

func Controls

func Controls(controls ...bool) vdom.Attr

func Crossorigin

func Crossorigin(value string) vdom.Attr

func Data

func Data(key, value string) vdom.Attr

func DataAttr

func DataAttr(key, value string) vdom.Attr

func Decoding

func Decoding(mode string) vdom.Attr

func Defer_

func Defer_(deferAttr ...bool) vdom.Attr

func Dir

func Dir(dir string) vdom.Attr

func Disabled

func Disabled(disabled ...bool) vdom.Attr

func Download

func Download(filename ...string) vdom.Attr

func Draggable

func Draggable() vdom.Attr

func Enctype

func Enctype(enctype string) vdom.Attr

func Enterkeyhint

func Enterkeyhint(hint string) vdom.Attr

func For

func For(id string) vdom.Attr

func FormAttr

func FormAttr(id string) vdom.Attr

func Formaction

func Formaction(url string) vdom.Attr

func HeadersAttr

func HeadersAttr(ids string) vdom.Attr

func Height

func Height(h int) vdom.Attr

func Hidden

func Hidden(hidden ...bool) vdom.Attr

func Hook

func Hook(name string, config any) vango.Attr

Hook attaches a client hook to an element.

func Href

func Href(url string) vdom.Attr

func Hreflang

func Hreflang(lang string) vdom.Attr

func HttpEquiv

func HttpEquiv(value string) vdom.Attr

func ID

func ID(id string) vdom.Attr

func Inputmode

func Inputmode(mode string) vdom.Attr

func Integrity

func Integrity(value string) vdom.Attr

func IsVoidElement

func IsVoidElement(tag string) bool

func JSIsland

func JSIsland(id string, props any) []vdom.Attr

func Key

func Key(key any) vdom.Attr

func Lang

func Lang(lang string) vdom.Attr

func List

func List(id string) vdom.Attr

func Loading

func Loading(mode string) vdom.Attr

func Loop

func Loop(loop ...bool) vdom.Attr

func Max

func Max(value string) vdom.Attr

func MaxLength

func MaxLength(n int) vdom.Attr

func Method

func Method(method string) vdom.Attr

func Min

func Min(value string) vdom.Attr

func MinLength

func MinLength(n int) vdom.Attr

func Multiple

func Multiple(multiple ...bool) vdom.Attr

func MutedAttr

func MutedAttr(muted ...bool) vdom.Attr

func Name

func Name(name string) vdom.Attr

func Novalidate

func Novalidate(novalidate ...bool) vdom.Attr

func OnEvent

func OnEvent(name string, handler func(vango.HookEvent)) vango.Attr

OnEvent attaches a hook event handler to an element.

func Open

func Open(open ...bool) vdom.Attr

func Pattern

func Pattern(pattern string) vdom.Attr

func Placeholder

func Placeholder(text string) vdom.Attr

func Playsinline

func Playsinline(playsinline ...bool) vdom.Attr

func Poster

func Poster(url string) vdom.Attr

func Preload

func Preload(mode string) vdom.Attr

func Readonly

func Readonly(readonly ...bool) vdom.Attr

func Rel

func Rel(rel string) vdom.Attr

func Required

func Required(required ...bool) vdom.Attr

func Role

func Role(role string) vdom.Attr

func Rows

func Rows(n int) vdom.Attr

func Rowspan

func Rowspan(n int) vdom.Attr

func Sandbox

func Sandbox(value string) vdom.Attr

func Scope

func Scope(scope string) vdom.Attr

func Selected

func Selected(selected ...bool) vdom.Attr

func SizesAttr

func SizesAttr(sizes string) vdom.Attr

func Spellcheck

func Spellcheck(check bool) vdom.Attr

func Src

func Src(url string) vdom.Attr

func Srcset

func Srcset(srcset string) vdom.Attr

func Step

func Step(value string) vdom.Attr

func StyleAttr

func StyleAttr(style string) vdom.Attr

func TabIndex

func TabIndex(index int) vdom.Attr

func Target

func Target(target string) vdom.Attr

func TestID

func TestID(id string) vdom.Attr

func TitleAttr

func TitleAttr(title string) vdom.Attr

func Type

func Type(t string) vdom.Attr

func Value

func Value(value string) vdom.Attr

func WASMComponent

func WASMComponent(id string, props any) []vdom.Attr

func WASMModule

func WASMModule(path string) vdom.Attr

func Width

func Width(w int) vdom.Attr

func Wrap

func Wrap(mode string) vdom.Attr

Types

type Case

type Case[T comparable] = vdom.Case[T]

func Case_

func Case_[T comparable](value T, node *VNode) Case[T]

func Default

func Default[T comparable](node *VNode) Case[T]

type Component

type Component = vdom.Component

type EventHandler

type EventHandler = vdom.EventHandler

func OnAbort

func OnAbort(handler any) EventHandler

func OnAnimationCancel

func OnAnimationCancel(handler any) EventHandler

func OnAnimationEnd

func OnAnimationEnd(handler any) EventHandler

func OnAnimationIteration

func OnAnimationIteration(handler any) EventHandler

func OnAnimationStart

func OnAnimationStart(handler any) EventHandler

func OnBlur

func OnBlur(handler any) EventHandler

func OnCanPlay

func OnCanPlay(handler any) EventHandler

func OnCanPlayThrough

func OnCanPlayThrough(handler any) EventHandler

func OnChange

func OnChange(handler any) EventHandler

func OnClick

func OnClick(handler any) EventHandler

func OnContextMenu

func OnContextMenu(handler any) EventHandler

func OnCopy

func OnCopy(handler any) EventHandler

func OnCut

func OnCut(handler any) EventHandler

func OnDblClick

func OnDblClick(handler any) EventHandler

func OnDrag

func OnDrag(handler any) EventHandler

func OnDragEnd

func OnDragEnd(handler any) EventHandler

func OnDragEnter

func OnDragEnter(handler any) EventHandler

func OnDragLeave

func OnDragLeave(handler any) EventHandler

func OnDragOver

func OnDragOver(handler any) EventHandler

func OnDragStart

func OnDragStart(handler any) EventHandler

func OnDrop

func OnDrop(handler any) EventHandler

func OnDurationChange

func OnDurationChange(handler any) EventHandler

func OnEmptied

func OnEmptied(handler any) EventHandler

func OnEnded

func OnEnded(handler any) EventHandler

func OnError

func OnError(handler any) EventHandler

func OnFocus

func OnFocus(handler any) EventHandler

func OnFocusIn

func OnFocusIn(handler any) EventHandler

func OnFocusOut

func OnFocusOut(handler any) EventHandler

func OnInput

func OnInput(handler any) EventHandler

func OnInvalid

func OnInvalid(handler any) EventHandler

func OnKeyDown

func OnKeyDown(handler any) EventHandler

func OnKeyPress

func OnKeyPress(handler any) EventHandler

func OnKeyUp

func OnKeyUp(handler any) EventHandler

func OnLoad

func OnLoad(handler any) EventHandler

func OnLoadStart

func OnLoadStart(handler any) EventHandler

func OnLoadedData

func OnLoadedData(handler any) EventHandler

func OnLoadedMetadata

func OnLoadedMetadata(handler any) EventHandler

func OnMouseDown

func OnMouseDown(handler any) EventHandler

func OnMouseEnter

func OnMouseEnter(handler any) EventHandler

func OnMouseLeave

func OnMouseLeave(handler any) EventHandler

func OnMouseMove

func OnMouseMove(handler any) EventHandler

func OnMouseOut

func OnMouseOut(handler any) EventHandler

func OnMouseOver

func OnMouseOver(handler any) EventHandler

func OnMouseUp

func OnMouseUp(handler any) EventHandler

func OnPaste

func OnPaste(handler any) EventHandler

func OnPause

func OnPause(handler any) EventHandler

func OnPlay

func OnPlay(handler any) EventHandler

func OnPlaying

func OnPlaying(handler any) EventHandler

func OnPointerCancel

func OnPointerCancel(handler any) EventHandler

func OnPointerDown

func OnPointerDown(handler any) EventHandler

func OnPointerEnter

func OnPointerEnter(handler any) EventHandler

func OnPointerLeave

func OnPointerLeave(handler any) EventHandler

func OnPointerMove

func OnPointerMove(handler any) EventHandler

func OnPointerUp

func OnPointerUp(handler any) EventHandler

func OnProgress

func OnProgress(handler any) EventHandler

func OnRateChange

func OnRateChange(handler any) EventHandler

func OnReset

func OnReset(handler any) EventHandler

func OnScroll

func OnScroll(handler any) EventHandler

func OnScrollEnd

func OnScrollEnd(handler any) EventHandler

func OnSeeked

func OnSeeked(handler any) EventHandler

func OnSeeking

func OnSeeking(handler any) EventHandler

func OnSelect

func OnSelect(handler any) EventHandler

func OnStalled

func OnStalled(handler any) EventHandler

func OnSubmit

func OnSubmit(handler any) EventHandler

func OnSuspend

func OnSuspend(handler any) EventHandler

func OnTimeUpdate

func OnTimeUpdate(handler any) EventHandler

func OnToggle

func OnToggle(handler any) EventHandler

func OnTouchCancel

func OnTouchCancel(handler any) EventHandler

func OnTouchEnd

func OnTouchEnd(handler any) EventHandler

func OnTouchMove

func OnTouchMove(handler any) EventHandler

func OnTouchStart

func OnTouchStart(handler any) EventHandler

func OnTransitionCancel

func OnTransitionCancel(handler any) EventHandler

func OnTransitionEnd

func OnTransitionEnd(handler any) EventHandler

func OnTransitionRun

func OnTransitionRun(handler any) EventHandler

func OnTransitionStart

func OnTransitionStart(handler any) EventHandler

func OnVolumeChange

func OnVolumeChange(handler any) EventHandler

func OnWaiting

func OnWaiting(handler any) EventHandler

func OnWheel

func OnWheel(handler any) EventHandler

type PathProvider

type PathProvider = vdom.PathProvider

PathProvider is the interface for context that provides current path. This is typically satisfied by server.Ctx.

type Props

type Props = vdom.Props

type ScriptsOption

type ScriptsOption = vdom.ScriptsOption

func WithCSRFToken

func WithCSRFToken(token string) ScriptsOption

func WithDebug

func WithDebug() ScriptsOption

func WithScriptPath

func WithScriptPath(path string) ScriptsOption

func WithoutDefer

func WithoutDefer() ScriptsOption

type TrustedHTML

type TrustedHTML = vdom.TrustedHTML

func SanitizeTrustedHTML

func SanitizeTrustedHTML(html string) TrustedHTML

func UnsafeTrustedHTML

func UnsafeTrustedHTML(html string) TrustedHTML

type VKind

type VKind = vdom.VKind

type VNode

type VNode = vdom.VNode

Type aliases for the VDOM primitives used by the DSL.

func A

func A(args ...any) *VNode

func Abbr

func Abbr(args ...any) *VNode

func Address

func Address(args ...any) *VNode

func Area

func Area(args ...any) *VNode

func Article

func Article(args ...any) *VNode

func Aside

func Aside(args ...any) *VNode

func Audio

func Audio(args ...any) *VNode

func B

func B(args ...any) *VNode

func Base

func Base(args ...any) *VNode

func Bdi

func Bdi(args ...any) *VNode

func Bdo

func Bdo(args ...any) *VNode

func Blockquote

func Blockquote(args ...any) *VNode

func Body

func Body(args ...any) *VNode

func Br

func Br(args ...any) *VNode

func Button

func Button(args ...any) *VNode

func Canvas

func Canvas(args ...any) *VNode

func Caption

func Caption(args ...any) *VNode

func Circle

func Circle(args ...any) *VNode

SVG child elements

func Cite

func Cite(args ...any) *VNode

func Code

func Code(args ...any) *VNode

func Col

func Col(args ...any) *VNode

func Colgroup

func Colgroup(args ...any) *VNode

func CustomElement

func CustomElement(tag string, args ...any) *VNode

func DangerouslySetInnerHTML

func DangerouslySetInnerHTML(html vdom.TrustedHTML) *VNode

func DataElement

func DataElement(args ...any) *VNode

func Datalist

func Datalist(args ...any) *VNode

func Dd

func Dd(args ...any) *VNode

func Defs

func Defs(args ...any) *VNode

func Details

func Details(args ...any) *VNode

func Dfn

func Dfn(args ...any) *VNode

func Dialog

func Dialog(args ...any) *VNode

func Div

func Div(args ...any) *VNode

func Dl

func Dl(args ...any) *VNode

func Dt

func Dt(args ...any) *VNode

func Either

func Either(first, second *VNode) *VNode

func Ellipse

func Ellipse(args ...any) *VNode

func Em

func Em(args ...any) *VNode

func Embed

func Embed(args ...any) *VNode

func Fieldset

func Fieldset(args ...any) *VNode

func Figcaption

func Figcaption(args ...any) *VNode

func Figure

func Figure(args ...any) *VNode
func Footer(args ...any) *VNode

func Form

func Form(args ...any) *VNode

func Fragment

func Fragment(children ...any) *VNode

func G

func G(args ...any) *VNode

func Group

func Group(children ...any) *VNode

func H1

func H1(args ...any) *VNode

func H2

func H2(args ...any) *VNode

func H3

func H3(args ...any) *VNode

func H4

func H4(args ...any) *VNode

func H5

func H5(args ...any) *VNode

func H6

func H6(args ...any) *VNode
func Head(args ...any) *VNode
func Header(args ...any) *VNode

func Hgroup

func Hgroup(args ...any) *VNode

func Hide

func Hide(condition bool, node *VNode) *VNode

func Hr

func Hr(args ...any) *VNode

func Html

func Html(args ...any) *VNode

func I

func I(args ...any) *VNode

func If

func If(condition bool, node *VNode) *VNode

func IfElse

func IfElse(condition bool, ifTrue, ifFalse *VNode) *VNode

func IfLazy

func IfLazy(condition bool, fn func() *VNode) *VNode

func Iframe

func Iframe(args ...any) *VNode

func Img

func Img(args ...any) *VNode

func Input

func Input(args ...any) *VNode

func IslandPlaceholder

func IslandPlaceholder(children ...any) *VNode

func Kbd

func Kbd(args ...any) *VNode

func Label

func Label(args ...any) *VNode

func Legend

func Legend(args ...any) *VNode

func Li

func Li(args ...any) *VNode

func Line

func Line(args ...any) *VNode
func Link(path string, children ...any) *VNode

Link creates an anchor for client-side SPA navigation. When clicked, the thin client intercepts and sends a navigate event to the server instead of performing a full page reload.

Example: Link("/about", Text("About"))

func LinkEl

func LinkEl(args ...any) *VNode

func LinkPrefetch

func LinkPrefetch(path string, children ...any) *VNode

LinkPrefetch creates an SPA link that prefetches the target on hover. This provides faster navigation by loading the page before click.

Example: LinkPrefetch("/about", Text("About"))

func Main

func Main(args ...any) *VNode

func Map_

func Map_(args ...any) *VNode

func Mark

func Mark(args ...any) *VNode

func Math

func Math(args ...any) *VNode

func Maybe

func Maybe(node *VNode) *VNode
func Menu(args ...any) *VNode

func Meta

func Meta(args ...any) *VNode

func Meter

func Meter(args ...any) *VNode
func Nav(args ...any) *VNode
func NavLink(ctx PathProvider, path string, children ...any) *VNode

NavLink creates an SPA link with "active" class when path matches. The active class is applied server-side based on the current route. This is the recommended helper for navigation menus.

Example:

Nav(
    NavLink(ctx, "/", Text("Home")),
    NavLink(ctx, "/about", Text("About")),
)
func NavLinkPrefix(ctx PathProvider, path string, children ...any) *VNode

NavLinkPrefix is like NavLink but matches path prefixes. Use for nav items that should be active for all sub-routes.

Example:

NavLinkPrefix(ctx, "/admin", Text("Admin"))
// Active on /admin, /admin/users, /admin/settings, etc.

func Noscript

func Noscript(args ...any) *VNode

func Nothing

func Nothing() *VNode

func Object

func Object(args ...any) *VNode

func Ol

func Ol(args ...any) *VNode

func Optgroup

func Optgroup(args ...any) *VNode

func Option

func Option(args ...any) *VNode

func Output

func Output(args ...any) *VNode

func P

func P(args ...any) *VNode

func Param

func Param(args ...any) *VNode

func Path

func Path(args ...any) *VNode

func Picture

func Picture(args ...any) *VNode

func Polygon

func Polygon(args ...any) *VNode

func Polyline

func Polyline(args ...any) *VNode

func Pre

func Pre(args ...any) *VNode

func Progress

func Progress(args ...any) *VNode

func Q

func Q(args ...any) *VNode

func Range

func Range[T any](items []T, fn func(item T, index int) *VNode) []*VNode

func RangeKeyed

func RangeKeyed[T any](items []T, key func(item T) any, fn func(item T) *VNode) []*VNode

func RangeMap

func RangeMap[K comparable, V any](m map[K]V, fn func(key K, value V) *VNode) []*VNode

func Raw

func Raw(html vdom.TrustedHTML) *VNode

func Rect

func Rect(args ...any) *VNode

func Repeat

func Repeat(n int, fn func(i int) *VNode) []*VNode

func Rp

func Rp(args ...any) *VNode

func Rt

func Rt(args ...any) *VNode

func Ruby

func Ruby(args ...any) *VNode

func S

func S(args ...any) *VNode

func Samp

func Samp(args ...any) *VNode

func Script

func Script(args ...any) *VNode

func Section

func Section(args ...any) *VNode

func Select

func Select(args ...any) *VNode

func Show

func Show(condition bool, node *VNode) *VNode

func ShowWhen

func ShowWhen(condition bool, fn func() *VNode) *VNode

func Slot

func Slot(args ...any) *VNode

func Small

func Small(args ...any) *VNode

func Source

func Source(args ...any) *VNode

func Span

func Span(args ...any) *VNode

func Strong

func Strong(args ...any) *VNode

func Style

func Style(args ...any) *VNode

func Sub

func Sub(args ...any) *VNode

func Summary

func Summary(args ...any) *VNode

func Sup

func Sup(args ...any) *VNode

func Svg

func Svg(args ...any) *VNode

func Switch

func Switch[T comparable](value T, cases ...Case[T]) *VNode

func Table

func Table(args ...any) *VNode

func Tbody

func Tbody(args ...any) *VNode

func Td

func Td(args ...any) *VNode

func Template

func Template(args ...any) *VNode

func Text

func Text(content string) *VNode

func Textarea

func Textarea(args ...any) *VNode

func Textf

func Textf(format string, args ...any) *VNode

func Tfoot

func Tfoot(args ...any) *VNode

func Th

func Th(args ...any) *VNode

func Thead

func Thead(args ...any) *VNode

func Time_

func Time_(args ...any) *VNode

func Title

func Title(args ...any) *VNode

func TitleEl

func TitleEl(args ...any) *VNode

func Tr

func Tr(args ...any) *VNode

func Track

func Track(args ...any) *VNode

func U

func U(args ...any) *VNode

func Ul

func Ul(args ...any) *VNode

func Unless

func Unless(condition bool, node *VNode) *VNode

func Use

func Use(args ...any) *VNode

func VangoScripts

func VangoScripts(opts ...ScriptsOption) *VNode

func Var

func Var(args ...any) *VNode

func Video

func Video(args ...any) *VNode

func Wbr

func Wbr(args ...any) *VNode

func When

func When(condition bool, fn func() *VNode) *VNode

Jump to

Keyboard shortcuts

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