package
0.3.833
Repository: https://github.com/a-h/templ.git
Documentation: pkg.go.dev

# Packages

# Functions

NewExpression creates a Go expression.
NewPosition initialises a position.
NewRange creates a Range expression.
NewSourceMap creates a new lookup to map templ source code to items in the parsed template.
NewTemplateFileParser creates a new TemplateFileParser.
StripType takes the parser and throws away the return value.

# Constants

# Variables

# Structs

<hr noshade/>.
noshade={ templ.Bool(...) }.
CallTemplateExpression can be used to create and render a template using data.
case "Something":.
ChildrenExpression can be used to rended the children of a templ element.
<a href="test" \ if active { class="isActive" }.
href="".
color: #ffffff;.
CSS definition.
Diagnostic for template file.
<!DOCTYPE html>.
<a .../> or <div ...>...</div>.
Expression containing Go code.
href={ ..
background-color: { constants.BackgroundColor };.
for i, v := range p.Addresses { {! Address(v) } }.
GoCode is used within HTML elements, and allows arbitrary go code.
GoComment.
HTMLComment.
HTMLTemplate definition.
if p.Type == "test" && p.thing { }.
Source mapping to map from the source code of the template to the in-memory representation.
Range of text within a file.
ScriptTemplate is a script block.
<a { spread..
StringExpression is used within HTML elements, and for style values.
switch p.Type { case "Something": }.
TemplateFileGoExpression within a TemplateFile.
TemplElementExpression can be used to create and render a template using data.
Text node within the document.
Whitespace.

# Interfaces

CSSProperty is a CSS property and value pair.
A Node appears within a template, e.g.
TemplateFileNode can be a Template, CSS, Script or Go.

# Type aliases

TrailingSpace defines the whitespace that may trail behind the close of an element, a text node, or string expression.