Documentation ¶
Overview ¶
Package components provides high-level components and helpers that are composed of low-level elements and attributes.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Classes ¶ added in v0.12.0
Classes is a map of strings to booleans, which Renders to an attribute with name "class". The attribute value is a sorted, space-separated string of all the map keys, for which the corresponding map value is true.
Example ¶
e := g.El("div", Classes{"party-hat": true, "boring-hat": false}) _ = e.Render(os.Stdout)
Output: <div class="party-hat"></div>
func (Classes) String ¶ added in v0.12.0
String satisfies fmt.Stringer.
Click to show internal directories.
Click to hide internal directories.