Documentation
¶
Index ¶
- func A(href string, children ...any) *Element
- func Article(children ...any) *Element
- func Aside(children ...any) *Element
- func Br() *Element
- func Button(children ...any) *Element
- func Canvas(children ...any) *Element
- func Code(children ...any) *Element
- func Details(children ...any) *Element
- func Dialog(children ...any) *Element
- func Div(children ...any) *Element
- func Fieldset(children ...any) *Element
- func Figcaption(children ...any) *Element
- func Figure(children ...any) *Element
- func Footer(children ...any) *Element
- func H1(children ...any) *Element
- func H2(children ...any) *Element
- func H3(children ...any) *Element
- func H4(children ...any) *Element
- func H5(children ...any) *Element
- func H6(children ...any) *Element
- func Header(children ...any) *Element
- func Hr() *Element
- func Input(typ string) *Element
- func Label(children ...any) *Element
- func Legend(children ...any) *Element
- func Li(children ...any) *Element
- func Main(children ...any) *Element
- func Mark(children ...any) *Element
- func Nav(children ...any) *Element
- func Ol(children ...any) *Element
- func Option(value, text string) *Element
- func P(children ...any) *Element
- func Pre(children ...any) *Element
- func Script(children ...any) *Element
- func Section(children ...any) *Element
- func SelectedOption(value, text string) *Element
- func Small(children ...any) *Element
- func Span(children ...any) *Element
- func Strong(children ...any) *Element
- func Style(children ...any) *Element
- func Summary(children ...any) *Element
- func Svg(children ...any) *Element
- func Table(children ...any) *Element
- func Tbody(children ...any) *Element
- func Td(children ...any) *Element
- func Tfoot(children ...any) *Element
- func Th(children ...any) *Element
- func Thead(children ...any) *Element
- func Tr(children ...any) *Element
- func Ul(children ...any) *Element
- func Use(children ...any) *Element
- type HTMLProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Figcaption ¶
func Figcaption(children ...any) *Element
func SelectedOption ¶
func SelectedOption(value, text string) *Element
Types ¶
type HTMLProvider ¶
type HTMLProvider interface {
RenderHTML() string
}
HTMLProvider is an optional capability: components that expose a static SSR HTML template fragment for injection by assetmin.
Implement in a component's html.go file (//go:build !wasm). Most components do NOT need this — only those with a static shell distinct from their dynamic Render() output.
Example in mycomponent/html.go:
//go:build !wasm
package mycomponent
import . "github.com/tinywasm/html"
func (c *MyComponent) RenderHTML() string {
return Div(clsRoot.AsAttr()).String()
}
For raw static HTML:
func (c *MyComponent) RenderHTML() string {
return `<div class="root"></div>`
}
Click to show internal directories.
Click to hide internal directories.