e

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Stylesheet = "stylesheet"

	AttrAccept          = "accept"
	AttrAcceptCharset   = "accept-charset"
	AttrAccesskey       = "accesskey"
	AttrAction          = "action"
	AttrAlign           = "align"
	AttrAllow           = "allow"
	AttrAlt             = "alt"
	AttrAs              = "as"
	AttrAsync           = "async"
	AttrAutocapitalize  = "autocapitalize"
	AttrAutocomplete    = "autocomplete"
	AttrAutoplay        = "autoplay"
	AttrCapture         = "capture"
	AttrCharset         = "charset"
	AttrChecked         = "checked"
	AttrCite            = "cite"
	AttrClass           = "class"
	AttrCols            = "cols"
	AttrColspan         = "colspan"
	AttrContent         = "content"
	AttrContenteditable = "contenteditable"
	AttrControls        = "controls"
	AttrCoords          = "coords"
	AttrCrossorigin     = "crossorigin"
	AttrData            = "data"
	AttrDatatestid      = "data-testid"
	AttrDatetime        = "datetime"
	AttrDecoding        = "decoding"
	AttrDefault         = "default"
	AttrDefer           = "defer"
	AttrDir             = "dir"
	AttrDirname         = "dirname"
	AttrDisabled        = "disabled"
	AttrDownload        = "download"
	AttrDraggable       = "draggable"
	AttrEnctype         = "enctype"
	AttrEnterkeyhint    = "enterkeyhint"
	AttrFor             = "for"
	AttrForm            = "form"
	AttrFormaction      = "formaction"
	AttrFormenctype     = "formenctype"
	AttrFormmethod      = "formmethod"
	AttrFormnovalidate  = "formnovalidate"
	AttrFormtarget      = "formtarget"
	AttrHeaders         = "headers"
	AttrHeight          = "height"
	AttrHidden          = "hidden"
	AttrHigh            = "high"
	AttrHref            = "href"
	AttrHreflang        = "hreflang"
	AttrHttpEquiv       = "http-equiv"
	AttrId              = "id"
	AttrIntegrity       = "integrity"
	AttrIntrinsicsize   = "intrinsicsize"
	AttrInputmode       = "inputmode"
	AttrIsmap           = "ismap"
	AttrItemprop        = "itemprop"
	AttrKind            = "kind"
	AttrLabel           = "label"
	AttrLang            = "lang"
	AttrLanguage        = "language"
	AttrLoading         = "loading"
	AttrList            = "list"
	AttrLoop            = "loop"
	AttrLow             = "low"
	AttrMax             = "max"
	AttrMaxlength       = "maxlength"
	AttrMinlength       = "minlength"
	AttrMedia           = "media"
	AttrMethod          = "method"
	AttrMin             = "min"
	AttrMultiple        = "multiple"
	AttrMuted           = "muted"
	AttrName            = "name"
	AttrNovalidate      = "novalidate"
	AttrOpen            = "open"
	AttrOptimum         = "optimum"
	AttrPattern         = "pattern"
	AttrPing            = "ping"
	AttrPlaceholder     = "placeholder"
	AttrPlaysinline     = "playsinline"
	AttrPoster          = "poster"
	AttrPreload         = "preload"
	AttrReadonly        = "readonly"
	AttrReferrerpolicy  = "referrerpolicy"
	AttrRel             = "rel"
	AttrRequired        = "required"
	AttrReversed        = "reversed"
	AttrRole            = "role"
	AttrRows            = "rows"
	AttrRowspan         = "rowspan"
	AttrSandbox         = "sandbox"
	AttrScrope          = "scope"
	AttrScoped          = "scoped"
	AttrSelected        = "selected"
	AttrShape           = "shape"
	AttrSize            = "size"
	AttrSizes           = "sizes"
	AttrSlot            = "slot"
	AttrSpan            = "span"
	AttrSpellcheck      = "spellcheck"
	AttrSrc             = "src"
	AttrSrcdoc          = "srcdoc"
	AttrSrclang         = "srclang"
	Attrsrcset          = "srcset"
	Attrstart           = "start"
	AttrStep            = "step"
	AttrStyle           = "style"
	AttrSummary         = "sumary"
	AttrTabIndex        = "tabindex"
	AttrTarget          = "target"
	AttrTitle           = "title"
	AttrTranslate       = "translate"
	AttrType            = "type"
	AttrUsemap          = "usemap"
	AttrValue           = "value"
	AttrWidth           = "width"
	AttrWrap            = "wrap"

	AttrProperty = "property"
	AttrVersion  = "version"
	AttrXmlns    = "xmlns"

	AsScript = "script"
	AsStyle  = "style"

	AutoCapitalizeCharacters = "characters"
	AutoCapitalizeNone       = "none"
	AutoCapitalizeOff        = "off"
	AutoCapitalizeOn         = "on"
	AutoCapitalizeSentences  = "sentences"
	AutoCapitalizeWords      = "words"

	AutoCompleteName        = "name"
	AutoCompleteNewPassword = "new-password"
	AutoCompleteOff         = "off"
	AutoCompleteOn          = "on"
	AutoCompleteUsername    = "username"

	CaptureUser        = "user"
	CaptureEnvironment = "environment"

	MethodPost   = "post"
	MethodGet    = "get"
	MethodDialog = "dialog"

	// Main root
	TagHtml = "html"

	// Document metadata
	TagBase  = "base"
	TagHead  = "head"
	TagLink  = "link"
	TagMeta  = "meta"
	TagStyle = "style"
	TagTitle = "title"

	// Sectioning root
	TagBody = "body"

	// Content sectioning
	TagAddress = "address"
	TagArticle = "article"
	TagAside   = "aside"
	TagFooter  = "footer"
	TagHeader  = "header"
	TagH1      = "h1"
	TagH2      = "h2"
	TagH3      = "h3"
	TagH4      = "h4"
	TagH5      = "h5"
	TagH6      = "h6"
	TagHgroup  = "hgroup"
	TagMain    = "main"
	TagNav     = "nav"
	TagSection = "section"
	TagSearch  = "search"

	// Text content
	TagBlockquote = "blockquote"
	TagDd         = "dd"
	TagDiv        = "div"
	TagDl         = "dl"
	TagDt         = "dt"
	TagFigcaption = "figcaption"
	TagFigure     = "figure"
	TagHr         = "hr"
	TagLi         = "li"
	TagMenu       = "menu"
	TagOl         = "ol"
	TagP          = "p"
	TagPre        = "pre"
	TagUl         = "ul"

	// Inline text semantics
	TagA      = "a"
	TagAbbr   = "abbr"
	TagB      = "b"
	TagBdi    = "bdi"
	TagBdo    = "bdo"
	TagBr     = "br"
	TagCite   = "cite"
	TagCode   = "code"
	TagData   = "data"
	TagDfn    = "dfn"
	TagEm     = "em"
	TagI      = "i"
	TagKbd    = "kbd"
	TagMark   = "mark"
	TagQ      = "q"
	TagRb     = "rb"
	TagRp     = "rp"
	TagRt     = "rt"
	TagRuby   = "ruby"
	TagS      = "s"
	TagSamp   = "samp"
	TagSmall  = "small"
	TagSpan   = "span"
	TagStrong = "strong"
	TagSub    = "sub"
	TagSup    = "sup"
	TagTime   = "time"
	TagU      = "u"
	TagVar    = "var"
	TagWbr    = "wbr"

	// Image and multimedia
	TagArea  = "area"
	TagAudio = "audio"
	TagImg   = "img"
	TagMap   = "map"
	TagTrack = "track"
	TagVideo = "video"

	// Embedded content
	TagEmbed       = "embed"
	TagFencedFrame = "fencedframe"
	TagIframe      = "iframe"
	TagObject      = "object"
	TagPicture     = "picture"
	TagPortal      = "portal"
	TagSource      = "source"

	// SVG and MathML
	TagSvg  = "svg"
	TagMath = "math"

	// Scripting
	TagCanvas   = "canvas"
	TagNoscript = "noscript"
	TagScript   = "script"

	// Demarcating edits
	TagDel = "del"
	TagIns = "ins"

	// Table content
	TagCaption  = "caption"
	TagCol      = "col"
	TagColgroup = "colgroup"
	TagTable    = "table"
	TagTbody    = "tbody"
	TagTd       = "td"
	TagTfoot    = "tfoot"
	TagTh       = "th"
	TagThead    = "thead"
	TagTr       = "tr"

	// Forms
	TagButton   = "button"
	TagDatalist = "datalist"
	TagFieldset = "fieldset"
	TagForm     = "form"
	TagInput    = "input"
	TagLabel    = "label"
	TagLegend   = "legend"
	TagMeter    = "meter"
	TagOptgroup = "optgroup"
	TagOption   = "option"
	TagOutput   = "output"
	TagProgress = "progress"
	TagSelect   = "select"
	TagTextarea = "textarea"

	// Interactive elements
	TagDetails = "details"
	TagDialog  = "dialog"
	TagSummary = "summary"

	// Web components
	TagSlot     = "slot"
	TagTemplate = "template"
)
View Source
const (
	AttrHXGet       = "hx-get"
	AttrHXPost      = "hx-post"
	AttrHXPushUrl   = "hx-push-url"
	AttrHXSelect    = "hx-select"
	AttrHXSelectOob = "hx-select-oob"
	AttrHXSwap      = "hx-swap"
	AttrHXSwapOob   = "hx-swap-oob"
	AttrHXTarget    = "hx-target"
	AttrHXTrigger   = "hx-trigger"
	AttrHXVals      = "hx-vals"

	AttrHXBoost       = "hx-boost"
	AttrHXConfirm     = "hx-confirm"
	AttrHXDelete      = "hx-delete"
	AttrHXDisable     = "hx-disable"
	AttrHXDisabledElt = "hx-disabled-elt"
	AttrHXDisinherit  = "hx-disinherit"
	AttrHXEncoding    = "hx-encoding"
	AttrHXExt         = "hx-ext"
	AttrHXHeaders     = "hx-headers"
	AttrHXHistory     = "hx-history"
	AttrHXHistoryElt  = "hx-history-elt"
	AttrHXInclude     = "hx-include"
	AttrHXIndicator   = "hx-indicator"
	AttrHXInherit     = "hx-inherit"
	AttrHXParams      = "hx-params"
	AttrHXPatch       = "hx-patch"
	AttrHXPreserve    = "hx-preserve"
	AttrHXPrompt      = "hx-prompt"
	AttrHXPut         = "hx-put"
	AttrHXReplaceUrl  = "hx-replace-url"
	AttrHXRequest     = "hx-request"
	AttrHXSync        = "hx-sync"
	AttrHXValidate    = "hx-validate"

	HXEvtAbort                 = "htmx:abort"
	HXEvtAfterOnLoad           = "htmx:afterOnLoad"
	HXEvtAfterProcessNode      = "htmx:afterProcessNode"
	HXEvtAfterRequest          = "htmx:afterRequest"
	HXEvtAfterSettle           = "htmx:afterSettle"
	HXEvtAfterSwap             = "htmx:afterSwap"
	HXEvtBeforeCleanupElement  = "htmx:beforeCleanupElement"
	HXEvtBeforeOnLoad          = "htmx:beforeOnLoad"
	HXEvtBeforeProcessNode     = "htmx:beforeProcessNode"
	HXEvtBeforeRequest         = "htmx:beforeRequest"
	HXEvtBeforeSwap            = "htmx:beforeSwap"
	HXEvtBeforeSend            = "htmx:beforeSend"
	HXEvtBeforeTransition      = "htmx:beforeTransition"
	HXEvtConfigRequest         = "htmx:configRequest"
	HXEvtConfirm               = "htmx:confirm"
	HXEvtHistoryCacheError     = "htmx:historyCacheError"
	HXEvtHistoryCacheMiss      = "htmx:historyCacheMiss"
	HXEvtHistoryCacheMissError = "htmx:historyCacheMissError"
	HXEvtHistoryCacheMissLoad  = "htmx:historyCacheMissLoad"
	HXEvtHistoryRestore        = "htmx:historyRestore"
	HXEvtBeforeHistorySave     = "htmx:beforeHistorySave"
	HXEvtLoad                  = "htmx:load"
	HXEvtNoSSESourceError      = "htmx:noSSESourceError"
	HXEvtOnLoadError           = "htmx:onLoadError"
	HXEvtOobAfterSwap          = "htmx:oobAfterSwap"
	HXEvtOobBeforeSwap         = "htmx:oobBeforeSwap"
	HXEvtOobErrorNotarget      = "htmx:oobErrorNoTarget"
	HXEvtPrompt                = "htmx:prompt"
	HXEvtPushedIntoHistory     = "htmx:pushedIntoHistory"
	HXEvtResponseError         = "htmx:responseError"
	HXEvtSendAbort             = "htmx:sendAbort"
	HXEvtSendError             = "htmx:sendError"
	HXEvtSseError              = "htmx:sseError"
	HXEvtSseOpen               = "htmx:sseOpen"
	HXEvtSwapError             = "htmx:swapError"
	HXEvtTargetError           = "htmx:targetError"
	HXEvtTimeout               = "htmx:timeout"
	HXEvtValidationValidate    = "htmx:validation:validate"
	HXEvtValidationFailed      = "htmx:validation:failed"
	HXEvtValidationHalted      = "htmx:validation:halted"
	HXEvtXhrAbort              = "htmx:xhr:abort"
	HXEvtXhrLoadend            = "htmx:xhr:loadend"
	HXEvtXhrLoadstart          = "htmx:xhr:loadstart"
	HXEvtXhrProgress           = "htmx:xhr:progress"

	HXSwapInnerHTML   = "innerHTML"
	HXSwapOuterHTML   = "outerHTML"
	HXSwapAfterbegin  = "afterbegin"
	HXSwapBeforebegin = "beforebegin"
	HXSwapBeforeend   = "beforeend"
	HXSwapAfterend    = "afterend"
	HXSwapDelete      = "delete"
	HXSwapNone        = "none"
)
View Source
const (
	ValFalse = "false"
	ValTrue  = "true"
)
View Source
const (
	PropOGTitle = "og:title"
	PropOGType  = "og:type"
	PropOGUrl   = "og:url"
	PropOGImage = "og:image"

	PropOGAudio           = "og:audio"
	PropOGDescription     = "og:description"
	PropOGDeterminer      = "og:determiner"
	PropOGLocale          = "og:locale"
	PropOGLocaleAlternate = "og:locale:alternate"
	PropOGSiteName        = "og:site_name"
	PropOGVideo           = "og:video"

	PropOGImageUrl       = "og:image:url"
	PropOGImageSecureUrl = "og:image:secure_url"
	PropOGImageType      = "og:image:type"
	PropOGImageWidth     = "og:image:width"
	PropOGImageHeight    = "og:image:height"
	PropOGImageAlt       = "og:image:alt"

	PropOGVideoUrl       = "og:video:url"
	PropOGVideoSecureUrl = "og:video:secure_url"
	PropOGVideoType      = "og:video:type"
	PropOGVideoWidth     = "og:video:width"
	PropOGVideoHeight    = "og:video:height"
	PropOGVideoAlt       = "og:video:alt"

	PropOGAudioSecureUrl = "og:audio:secure_url"
	PropOGAudioType      = "og:audio:type"
)
View Source
const (
	PropTwitterCard        = "twitter:card"
	PropTwitterSite        = "twitter:site"
	PropTwitterSiteId      = "twitter:site:id"
	PropTwitterCreator     = "twitter:creator"
	PropTwitterCreatorId   = "twitter:creator:id"
	PropTwitterDescription = "twitter:description"
	PropTwitterTitle       = "twitter:title"
	PropTwitterImage       = "twitter:image"
	PropTwitterImageAlt    = "twitter:image:alt"
)
View Source
const (
	AttrAriaHidden = "aria-hidden"
)

Variables

This section is empty.

Functions

func F

func F[T any](fg func(T) Node, t T) func() Node

Types

type AttributeNode

type AttributeNode struct {
	Name  string
	Value string
}

func (*AttributeNode) Render

func (a *AttributeNode) Render(w io.Writer) error

func (*AttributeNode) Write added in v0.3.0

func (a *AttributeNode) Write(w io.Writer) (int, error)

type ElementNode

type ElementNode struct {
	Tag           string
	Children      []Node
	AllowOmission bool
}

func (*ElementNode) Render

func (e *ElementNode) Render(w io.Writer) error

func (*ElementNode) Write added in v0.3.0

func (e *ElementNode) Write(w io.Writer) (int, error)

type GroupNode

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

func (*GroupNode) Render

func (g *GroupNode) Render(w io.Writer) error

func (*GroupNode) Write added in v0.3.0

func (g *GroupNode) Write(w io.Writer) (int, error)

type Node

type Node interface {
	Render(w io.Writer) error
	Write(w io.Writer) (int, error)
}

func A

func A(children ...Node) Node

A creates an "a" node

func Abbr

func Abbr(children ...Node) Node

Abbr creates an "abbr" node

func Accept

func Accept(accept string) Node

Accept creates an "accept" attribute

func AcceptCharset added in v0.2.0

func AcceptCharset() Node

AcceptCharset creates an "accept-charset" attribute

func AccessKey added in v0.2.0

func AccessKey(key string) Node

AccessKey creates an "accesskey" attribute

func Action

func Action(action string) Node

Action creates an "action" attribute

func Address

func Address(children ...Node) Node

Address creates an "address" node

func Align added in v0.3.0

func Align(align string) Node

Align creates an "align" attribute

func Allow added in v0.2.0

func Allow(policy string) Node

Allow creates an "allow" attribute

func Alt added in v0.2.0

func Alt(text string) Node

Alt creates an "alt" attribute

func Area

func Area(children ...Node) Node

Area creates a "area" node

func AriaHidden

func AriaHidden(hidden ...bool) Node

AriaHidden returns an aria-hidden attribute

func Article

func Article(children ...Node) Node

Article creates an "article" node

func As added in v0.2.0

func As(what string) Node

As creates an "as" attribute

func Aside

func Aside(children ...Node) Node

Aside creates an "aside" node

func Async added in v0.2.0

func Async(async ...bool) Node

Async creates an "async" attribute

func Attr

func Attr(name, value string) Node

Attr creates a new attribute

func Audi

func Audi(children ...Node) Node

Audio creates a "audio" node

func AutoCapitalize added in v0.2.0

func AutoCapitalize(value string) Node

AutoCapitalize creates an "autocapitalize" attribute

func AutoComplete

func AutoComplete(autocomplete string) Node

AutoComplete creates an "autocomplete" attribute

func B

func B(children ...Node) Node

B creates a "b" node

func Base

func Base(children ...Node) Node

Base creates a "base" node

func Bdi

func Bdi(children ...Node) Node

Bdi creates a "bdi" node

func Bdo

func Bdo(children ...Node) Node

Bdo creates a "bdo" node

func Blockquote

func Blockquote(children ...Node) Node

Blockquote creates a "blockquote" node

func Body

func Body(children ...Node) Node

Body creates a "body" node

func Br

func Br(children ...Node) Node

Br creates a "br" node

func Button

func Button(children ...Node) Node

Button creates a "button" node

func Canvas

func Canvas(children ...Node) Node

Canvas creates a "canvas" node

func Caption

func Caption(children ...Node) Node

Caption creates a "caption" node

func Capture added in v0.2.0

func Capture(value string) Node

Capture creates a "capture" attribute

func Charset

func Charset(charset string) Node

Charset creates a "charset" attribute

func Checked

func Checked(checked ...bool) Node

Checked creates a "checked" attribute

func Cite

func Cite(children ...Node) Node

Cite creates a "cite" node

func Class

func Class(value string) Node

Class creates a "class" attribute

func Code

func Code(children ...Node) Node

Code creates a "code" node

func Col

func Col(children ...Node) Node

Col creates a "col" node

func Colgroup

func Colgroup(children ...Node) Node

Colgroup creates a "colgroup" node

func Cols added in v0.2.0

func Cols(cols int) Node

Cols creates a "cols" attribute

func Content

func Content(value string) Node

Content creates a "content" attribute

func Data

func Data(children ...Node) Node

Data creates a "data" node

func Datalist

func Datalist(children ...Node) Node

Datalist creates a "datalist" node

func Dd

func Dd(children ...Node) Node

Dd creates a "dd" node

func Defer

func Defer(d ...bool) Node

Defer creates a "defer" attribute

func Del

func Del(children ...Node) Node

Del creates a "del" node

func Details

func Details(children ...Node) Node

Details creates a "details" node

func Dfn

func Dfn(children ...Node) Node

Dfn creates a "dfn" node

func Dialog

func Dialog(children ...Node) Node

Dialog creates a "dialog" node

func Disabled

func Disabled(disabled ...bool) Node

Disabled creates a "disabled" attribute

func Div

func Div(children ...Node) Node

Div creates a "div" node

func Dl

func Dl(children ...Node) Node

Dl creates a "dl" node

func Doctype

func Doctype() Node

Doctype creates a "<!DOCTYPE html>" node

func Draggable

func Draggable(draggable ...bool) Node

Draggable creates a "draggable" attribute

func Dt

func Dt(children ...Node) Node

Dt creates a "dt" node

func E

func E(tag string, children ...Node) Node

E creates a new element

func Em

func Em(children ...Node) Node

Em creates a "em" node

func Embed

func Embed(children ...Node) Node

Embed creates an "embed" node

func Fencedframe

func Fencedframe(children ...Node) Node

Fencedframe creates a "fencedframe" node

func Fieldset

func Fieldset(children ...Node) Node

Fieldset creates a "fieldset" node

func Figcaption

func Figcaption(children ...Node) Node

Figcaption creates a "figcaption" node

func Figure

func Figure(children ...Node) Node

Figure creates a "figure" node

func Footer(children ...Node) Node

Footer creates a "footer" node

func For

func For(id string) Node

For creates a "for" attribute

func Form

func Form(children ...Node) Node

Form creates a "form" node

func FormAttr added in v0.3.0

func FormAttr(form string) Node

FormAttr creates a "form" attribute

func Formaction added in v0.3.0

func Formaction(action string) Node

Formaction creates a "formaction" attribute

func Formenctype added in v0.3.0

func Formenctype(enctype string) Node

Formenctype creates a "formenctype" attribute

func Formmethod added in v0.3.0

func Formmethod(method string) Node

Formmethod creates a "formmethod" attribute

func Formnovalidate added in v0.3.0

func Formnovalidate(novalidate ...bool) Node

Formnovalidate creates a "formnovalidate" attribute

func Formtarget added in v0.3.0

func Formtarget(target string) Node

Formtarget creates a "formtarget" attribute

func Group

func Group(children ...Node) Node

Group creates a group of nodes

func H1

func H1(children ...Node) Node

H1 creates an "h1" node

func H2

func H2(children ...Node) Node

H2 creates an "h2" node

func H3

func H3(children ...Node) Node

H3 creates an "h3" node

func H4

func H4(children ...Node) Node

H4 creates an "h4" node

func H5

func H5(children ...Node) Node

H5 creates an "h5" node

func H6

func H6(children ...Node) Node

H6 creates an "h6" node

func HX

func HX(message string) Node

HXConfirm creates an hx-confirm attribute

func HXBoost

func HXBoost(boost ...bool) Node

HXBoost creates an hx-boost attribute

func HXDelete

func HXDelete(url string) Node

HXDelete creates an hx-delete attribute

func HXDisable

func HXDisable() Node

HXDisable creates an hx-disable attribute

func HXDisabledElt

func HXDisabledElt(target string) Node

HXDisabledElt creates an hx-disabled-elt attribute

func HXDisinherit

func HXDisinherit(target string) Node

HXDisinherit creates an hx-disinherit attribute

func HXEncoding

func HXEncoding(encoding string) Node

HXEncoding creates an hx-encoding attribute

func HXExt

func HXExt(ext string) Node

HXExt creates an hx-ext attribute

func HXGet

func HXGet(url string) Node

HXGet creates an hx-get attribute

func HXHeaders

func HXHeaders(headers string) Node

HXHeaders creates an hx-headers attribute

func HXHistory

func HXHistory(enable bool) Node

HXHistory creates an hx- attribute

func HXHistoryElt

func HXHistoryElt() Node

HXHistoryElt creates an hx-history-elt attribute

func HXInclude

func HXInclude(selector string) Node

HXInclude creates an hx-include attribute

func HXIndicator

func HXIndicator(selector string) Node

HXIndicator creates an hx-indicator attribute

func HXInherit

func HXInherit(attr string) Node

HXInherit creates an hx-inherit attribute

func HXOn

func HXOn(event, script string) Node

HXOn creates an hx-on:event attribute

func HXParams

func HXParams(params string) Node

HXParams creates an hx-params attribute

func HXPatch

func HXPatch(url string) Node

HXPatch creates an hx-patch attribute

func HXPost

func HXPost(url string) Node

HXPost creates an hx-post attribute

func HXPreserve

func HXPreserve(preserve bool) Node

HXPreserve creates an hx-preserve attribute

func HXPrompt

func HXPrompt(prompt string) Node

HXPrompt creates an hx-prompt attribute

func HXPushUrl

func HXPushUrl(push string) Node

HXPushUrl creates an hx-push-url attribute

func HXPut

func HXPut(url string) Node

HXPut creates an hx-put attribute

func HXReplaceUrl

func HXReplaceUrl(replace string) Node

HXReplaceUrl creates an hx-replace-url attribute

func HXRequest

func HXRequest(config string) Node

HXRequest creates an hx-request attribute

func HXSelect

func HXSelect(target string) Node

HXSelect creates an hx-select attribute

func HXSelectOob

func HXSelectOob(target string) Node

HXSelectOob creates an hx-select-oob attribute

func HXSwap

func HXSwap(target string) Node

HXSwap creates an hx-swap attribute

func HXSwapOob

func HXSwapOob(target string) Node

HXSwapOob creates an hx-swap-oob attribute

func HXSync

func HXSync(selector string) Node

HXSync creates an hx-sync attribute

func HXTarget

func HXTarget(target string) Node

HXTarget creates an hx-target attribute

func HXTrigger

func HXTrigger(trigger string) Node

HXTrigger creates an hx-trigger attribute

func HXValidate

func HXValidate(validate bool) Node

HXValidate creates an hx-validate attribute

func HXVals

func HXVals(vals string) Node

HXVals creates an hx-vals attribute

func Head(children ...Node) Node

Head creates a "head" node

func Header(children ...Node) Node

Header creates a "header" node

func Height added in v0.2.0

func Height(height string) Node

Height creates a "height" attribute

func Hgroup

func Hgroup(children ...Node) Node

HGroup creates an "hgroup" node

func Hidden

func Hidden(hidden ...bool) Node

Hidden creates a "hidden" attribute

func Hr

func Hr(children ...Node) Node

Hr creates a "hr" node

func Href

func Href(value string) Node

Href creates an "href" attribute

func Html

func Html(children ...Node) Node

Html creates an "html" node

func I

func I(children ...Node) Node

I creates a "i" node

func Id

func Id(value string) Node

Id creates an "id" attribute

func If

func If(condition bool, value Node) Node

If conditionally renders a node

func Iff

func Iff(condition bool, f func() Node) Node

Iff conditionally creates a node

func Iframe

func Iframe(children ...Node) Node

Iframe creates an "iframe" node

func Img

func Img(children ...Node) Node

Img creates a "img" node

func Input

func Input(children ...Node) Node

Input creates an "input" node

func Ins

func Ins(children ...Node) Node

Ins creates a "ins" node

func Integrity added in v0.2.0

func Integrity(value string) Node

Integrity creates an "integrity" node

func Kbd

func Kbd(children ...Node) Node

Kbd creates a "kbd" node

func Label

func Label(children ...Node) Node

Label creates a "label" node

func Lang

func Lang(lang string) Node

Lang creates a "lang" attribute

func Legend

func Legend(children ...Node) Node

Legend creates a "legend" node

func Li

func Li(children ...Node) Node

Li creates a "li" node

func Link(children ...Node) Node

Link creates a "link" node

func Main

func Main(children ...Node) Node

Main creates a "main" node

func Map

func Map(children ...Node) Node

Map creates a "map" node

func Mapf

func Mapf[T any](values []T, f func(t T) Node) Node

Mapf maps a set of values to nodes

func Mark

func Mark(children ...Node) Node

Mark creates a "mark" node

func Math

func Math(children ...Node) Node

Math creates a "math" node

func Max added in v0.2.0

func Max(value string) Node

Max creates a "max" attribute

func MaxLength added in v0.2.0

func MaxLength(value int) Node

MaxLength creates a "maxlength" attribute

func Menu(children ...Node) Node

Menu creates a "menu" node

func Meta

func Meta(children ...Node) Node

Meta creates a "meta" node

func MetaCharset

func MetaCharset(value string) Node

MetaCharset creates a <meta charset="value"> node

func MetaDescription

func MetaDescription(value string) Node

MetaDescription creates a <meta name="description" content="value"> node

func MetaKeywords

func MetaKeywords(value string) Node

MetaKeywords creates a <meta name="keywords" content="value"> node

func MetaViewport

func MetaViewport(value string) Node

MetaViewport creates a <meta name="viewport" content="value" > node

func Meter

func Meter(children ...Node) Node

Meter creates a "meter" node

func Method added in v0.2.0

func Method(method string) Node

Method creates a "method" attribute

func Min added in v0.2.0

func Min(value string) Node

Min creates a "min" attribute

func MinLength added in v0.2.0

func MinLength(value int) Node

MinLength creates a "minlength" attribute

func Name

func Name(value string) Node

Name creates a "name" attribute

func Nav(children ...Node) Node

Nav creates a "nav" node

func NoValidate added in v0.2.0

func NoValidate(novalidate ...bool) Node

NoValidate creates a "novalidate" attribute

func Noscript

func Noscript(children ...Node) Node

Noscript creates a "noscript" node

func OGAudio

func OGAudio(value string) Node

OGAudio creates an og:audio meta tag

func OGAudioSecureUrl

func OGAudioSecureUrl(url string) Node

OGAudioSecureUrl creates an og:audio:secure_url meta tag

func OGAudioType

func OGAudioType(value string) Node

OGAudioType creates an og:audio:type meta tag

func OGDescription

func OGDescription(description string) Node

OGDescription creates an og:description meta tag

func OGDeterminer

func OGDeterminer(value string) Node

OGDeterminer creates an og:determiner meta tag

func OGImage

func OGImage(value string) Node

OGImage creates an og:image meta tag

func OGImageAlt

func OGImageAlt(alt string) Node

OGImageAlt creates an og:image:alt meta tag

func OGImageHeight

func OGImageHeight(height string) Node

OGImageHeight creates an og:image:height meta tag

func OGImageSecureUrl

func OGImageSecureUrl(url string) Node

OGImageSecureUrl creates an og:image:secure_url meta tag

func OGImageType

func OGImageType(value string) Node

OGImageType creates an og:image:type meta tag

func OGImageUrl

func OGImageUrl(url string) Node

OGImageUrl creates an og:image:url meta tag

func OGImageWidth

func OGImageWidth(width string) Node

OGImageWidth creates an og:image:width meta tag

func OGLocale

func OGLocale(locale string) Node

OGLocale creates an og:locale meta tag

func OGLocaleAlternate

func OGLocaleAlternate(value string) Node

OGLocaleAlternate creates an og:locale:alternate meta tag

func OGSiteName

func OGSiteName(name string) Node

OGSiteName creates an og:site_name meta tag

func OGTitle

func OGTitle(title string) Node

OGTitle creates an og:title meta tag

func OGType

func OGType(value string) Node

OGType creates an og:type meta tag

func OGUrl

func OGUrl(url string) Node

OGUrl creates an og:url meta tag

func OGVideo

func OGVideo(value string) Node

OGVideo creates an og:video meta tag

func OGVideoAlt

func OGVideoAlt(alt string) Node

OGVideoAlt creates an og:video:alt meta tag

func OGVideoHeight

func OGVideoHeight(height string) Node

OGVideoHeight creates an og:video:height meta tag

func OGVideoSecureUrl

func OGVideoSecureUrl(url string) Node

OGVideoSecureUrl creates an og:video:secure_url meta tag

func OGVideoType

func OGVideoType(value string) Node

OGVideoType creates an og:video:type meta tag

func OGVideoUrl

func OGVideoUrl(vurllue string) Node

OGVideoUrl creates an og:video:url meta tag

func OGVideoWidth

func OGVideoWidth(width string) Node

OGVideoWidth creates an og:video:width meta tag

func Object

func Object(children ...Node) Node

Object creates an "object" node

func Ol

func Ol(children ...Node) Node

Ol creates a "ol" node

func Optgroup

func Optgroup(children ...Node) Node

Optgroup creates a "optgroup" node

func Option

func Option(children ...Node) Node

Option creates a "option" node

func Output

func Output(children ...Node) Node

Output creates a "output" node

func P

func P(children ...Node) Node

P creates a "p" node

func Pattern added in v0.2.0

func Pattern(pattern string) Node

Pattern creates a "pattern" attributew

func Picture

func Picture(children ...Node) Node

Picture creates a "picture" node

func Placeholder

func Placeholder(placeholder string) Node

Placeholder creates a "placeholder" attribute

func Portal

func Portal(children ...Node) Node

Portal creates a "portal" node

func Pre

func Pre(children ...Node) Node

Pre creates a "pre" node

func Progress

func Progress(children ...Node) Node

Progress creates a "progress" node

func Property

func Property(value string) Node

Property creates a "property" attribute

func Q

func Q(children ...Node) Node

Q creates a "q" node

func Raw

func Raw(text string) Node

func Readonly

func Readonly(readonly ...bool) Node

Readonly creates a "readonly" attribute

func Rel

func Rel(value string) Node

Rel creates a "rel" attribute

func RelStylesheet

func RelStylesheet() Node

RelStylesheet creates a rel="stylesheet" attribute

func Required

func Required(required ...bool) Node

Required creates a "required" attribute

func Role

func Role(role string) Node

Role creates a "role" attribute

func Rows added in v0.2.0

func Rows(rows int) Node

Rows creates a "rows" attribute

func Rp

func Rp(children ...Node) Node

Rp creates a "rp" node

func Rt

func Rt(children ...Node) Node

Rt creates a "rt" node

func Ruby

func Ruby(children ...Node) Node

Ruby creates a "ruby" node

func S

func S(children ...Node) Node

S creates a "s" node

func Samp

func Samp(children ...Node) Node

Samp creates a "samp" node

func Script

func Script(children ...Node) Node

Script creates a "script" node

func Search(children ...Node) Node

Search creates a "search" node

func Section

func Section(children ...Node) Node

Section creates a "section" node

func Select

func Select(children ...Node) Node

Select creates a "select" node

func Slot

func Slot(children ...Node) Node

Slot creates a "slot" node

func Small

func Small(children ...Node) Node

Small creates a "small" node

func Source

func Source(children ...Node) Node

Source creates a "source" node

func Span

func Span(children ...Node) Node

Span creates a "span" node

func Src

func Src(value string) Node

Src creates a "src" attribure

func Strong

func Strong(children ...Node) Node

Strong creates a "strong" node

func Style

func Style(children ...Node) Node

Style creates a "style" node

func StyleAttr

func StyleAttr(style string) Node

StyleAttr creates a "style" attribute

func Sub

func Sub(children ...Node) Node

Sub creates a "sub" node

func Summary

func Summary(children ...Node) Node

Summary creates a "summary" node

func Sup

func Sup(children ...Node) Node

Sup creates a "sup" node

func Svg

func Svg(children ...Node) Node

Svg creates an "svg" node

func TabIndex

func TabIndex(tabindex int) Node

Tabindex creates a "tabindex" attribute

func Table

func Table(children ...Node) Node

Table creates a "table" node

func Target

func Target(target string) Node

Target creates a "target" attribute

func TargetBlank

func TargetBlank() Node

TargetBlank creates a target="_blank" attribute

func Tbody

func Tbody(children ...Node) Node

Tbody creates a "tbody" node

func Td

func Td(children ...Node) Node

Td creates a "td" node

func Template

func Template(children ...Node) Node

Template creates a "template" node

func TestId

func TestId(value string) Node

TestId creates a "data-testid" attribute

func Text

func Text(value string) Node

Text creates a new text node

func Textarea

func Textarea(children ...Node) Node

Textarea creates a "textarea" node

func Tfoot

func Tfoot(children ...Node) Node

Tfoot creates a "tfoot" node

func Th

func Th(children ...Node) Node

Th creates a "th" node

func Thead

func Thead(children ...Node) Node

Thead creates a "thead" node

func Time

func Time(children ...Node) Node

Time creates a "time" node

func Title

func Title(children ...Node) Node

Title creates a "title" node

func Tr

func Tr(children ...Node) Node

Tr creates a "tr" node

func Track

func Track(children ...Node) Node

Track creates a "track" node

func TwitterCard

func TwitterCard(value string) Node

TwitterCard creates a twitter:card meta tag

func TwitterCreator

func TwitterCreator(value string) Node

TwitterCreator creates a twitter:creator meta tag

func TwitterCreatorId

func TwitterCreatorId(value string) Node

TwitterCreatorId creates a twitter:creator:id meta tag

func TwitterDescription

func TwitterDescription(value string) Node

TwitterDescription creates a twitter:description meta tag

func TwitterImage

func TwitterImage(value string) Node

TwitterImage creates a twitter:image meta tag

func TwitterImageAlt

func TwitterImageAlt(value string) Node

TwitterImageAlt creates a twitter:image:alt meta tag

func TwitterSite

func TwitterSite(value string) Node

TwitterSite creates a twitter:site meta tag

func TwitterSiteId

func TwitterSiteId(value string) Node

TwitterSiteId creates a twitter:site:id meta tag

func TwitterTitle

func TwitterTitle(value string) Node

TwitterTitle creates a twitter:title meta tag

func Type

func Type(value string) Node

Type creates a "type" attribute

func U

func U(children ...Node) Node

U creates a "u" node

func Ul

func Ul(children ...Node) Node

Ul creates a "ul" node

func Value

func Value(value string) Node

Value creates a "value" attribute

func Var

func Var(children ...Node) Node

Var creates a "var" node

func Video

func Video(children ...Node) Node

Video creates a "video" node

func Wbr

func Wbr(children ...Node) Node

Wbr creates a "wbr" node

func Width added in v0.2.0

func Width(width string) Node

Width creates a "width" attribute

type RawNode

type RawNode struct {
	Bytes []byte
}

func (*RawNode) Render

func (n *RawNode) Render(w io.Writer) error

func (*RawNode) Write added in v0.3.0

func (n *RawNode) Write(w io.Writer) (int, error)

type TextNode

type TextNode struct {
	Value string
}

func (*TextNode) Render

func (t *TextNode) Render(w io.Writer) error

func (*TextNode) Write added in v0.3.0

func (t *TextNode) Write(w io.Writer) (int, error)

Jump to

Keyboard shortcuts

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