Documentation ¶
Overview ¶
Package gomponents provides components of DOM nodes for Go, that can render to an HTML Document. The primary interface is a Node, which has a single function Render, which should render the Node to a string. Furthermore, NodeFunc is a function which implements the Node interface by calling itself on Render. All DOM elements and attributes can be created by using the El and Attr functions. The package also provides a lot of convenience functions for creating elements and attributes with the most commonly used parameters. If they don't suffice, a fallback to El and Attr is always possible.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node interface {
Render() string
}
Node is a DOM node that can Render itself to a string representation.
type NodeFunc ¶
type NodeFunc func() string
NodeFunc is render function that is also a Node.
func El ¶
El creates an element DOM Node with a name and child Nodes. Use this if no convenience creator exists.
Directories ¶
Path | Synopsis |
---|---|
Package attr provides shortcuts and helpers to common HTML attributes.
|
Package attr provides shortcuts and helpers to common HTML attributes. |
Package el provides shortcuts and helpers to common HTML elements.
|
Package el provides shortcuts and helpers to common HTML elements. |