rephtml

package module
v0.1.0-beta Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: MIT Imports: 11 Imported by: 0

README

rephtml

rephtml is a fluent Go package for building HTML documents from typed components. Regular HTML element components implement the Element interface and can render themselves through Render or HTML without requiring callers to manage an explicit preparation step. The document root uses error-returning render methods so document structure errors are not hidden.

The package is designed around small composable structs:

  • NewHtmlFile creates the document root and owns the final file output.
  • AddToHead and AddToBody place components into generated <head> and <body> sections.
  • Add composes child elements into container elements.
  • HTML and Render prepare regular element components internally before returning output.
  • Text methods escape normal text content by default.
  • Attribute setters escape attribute values by default.
  • StyleElement.Text and Script.Text intentionally preserve raw CSS and JavaScript content.
  • WriteToFile writes a human-readable formatted HTML file.
  • Render, RenderString, RenderFormatted, and RenderFormattedString return generated HTML plus any document error.

Installation

go get github.com/lechefran/rephtml

Quick Start

package main

import rephtml "github.com/lechefran/rephtml"

func main() {
	html := rephtml.NewHtmlFile().Lang("en")

	html.AddToHead(rephtml.NewTitle().Text("Sales Report"))
	html.AddToHead(rephtml.NewStyleElement().Text(`
body {
	font-family: Arial, sans-serif;
	color: #1f2933;
}
main {
	max-width: 720px;
	margin: 40px auto;
}
`))

	table := rephtml.NewTable().
		Headers([]string{"Region", "Revenue", "Growth"}).
		AddRow([]string{"North", "$125,000", "12%"}).
		AddRow([]string{"South", "$98,000", "8%"})

	html.AddToBody(rephtml.NewMain().
		Add(rephtml.NewH1().Text("Sales Report")).
		Add(rephtml.NewP().Text("Quarterly regional performance")).
		Add(table))

	if err := html.WriteToFile("report.html"); err != nil {
		panic(err)
	}
}

Rendering Elements

Regular elements prepare themselves when you call HTML, Render, or String. You do not need to call Prepare before reading output.

package main

import (
	"fmt"

	rephtml "github.com/lechefran/rephtml"
)

func main() {
	paragraph := rephtml.NewP().Text(`A&B < C`)

	fmt.Println(paragraph.HTML())
	fmt.Println(string(paragraph.Render()))
}

Output:

<p>A&amp;B &lt; C</p>
<p>A&amp;B &lt; C</p>

Containers also render their current child state automatically:

card := rephtml.NewSection().
	AriaLabel("Invoice summary").
	Add(rephtml.NewH2().Text("Invoice #1042")).
	Add(rephtml.NewP().Text("Payment due Friday"))

fmt.Println(card.HTML())

Rendering Documents

HtmlFile returns errors from render methods because document structure can be invalid. Use RenderString for compact HTML, RenderFormattedString for readable output, and WriteToFile for files.

html := rephtml.NewHtmlFile().Lang("en")
html.AddToHead(rephtml.NewMeta().Charset("utf-8"))
html.AddToHead(rephtml.NewTitle().Text("Dashboard"))
html.AddToBody(
	rephtml.NewMain().
		Add(rephtml.NewH1().Text("Dashboard")).
		Add(rephtml.NewP().Text("Operational overview")),
)

compact, err := html.RenderString()
if err != nil {
	panic(err)
}

formatted, err := html.RenderFormattedString()
if err != nil {
	panic(err)
}

fmt.Println(compact)
fmt.Println(formatted)

AddToHead and AddToBody enforce simple document structure. For example, adding a body-only element to the head records an error that render/write methods return:

html := rephtml.NewHtmlFile()
html.AddToHead(rephtml.NewP().Text("not allowed in head"))

if err := html.Err(); err != nil {
	fmt.Println(err)
}

Composition Examples

Build structured tables when you need explicit table sections:

table := rephtml.NewTable().
	AddCaption(rephtml.NewCaption().Text("Quarterly revenue")).
	AddThead(
		rephtml.NewThead().AddTr(
			rephtml.NewTr().
				AddTh(rephtml.NewTh().Add(rephtml.NewSpan().Text("Region"))).
				AddTh(rephtml.NewTh().Add(rephtml.NewSpan().Text("Revenue"))),
		),
	).
	AddTbody(
		rephtml.NewTbody().AddTr(
			rephtml.NewTr().
				AddTd(rephtml.NewTd().Add(rephtml.NewSpan().Text("North"))).
				AddTd(rephtml.NewTd().Add(rephtml.NewSpan().Text("$125,000"))),
		),
	)

fmt.Println(table.HTML())

Build forms with the same composable Add pattern:

form := rephtml.NewForm().
	Action("/search").
	Method("get").
	Add(rephtml.NewLabel().For("q").Text("Search")).
	Add(rephtml.NewInput().
		Type("search").
		Id("q").
		Name("q").
		Placeholder("Orders, customers, invoices")).
	Add(rephtml.NewButton().Type("submit").Text("Run search"))

fmt.Println(form.HTML())

CSS Rules

Use StyleElement.Text when you already have CSS text. Use StyleMap for both inline styles and generated CSS rules; property names are emitted exactly as written, so custom properties and vendor prefixes work without package changes. CSS at-rules use dedicated builders such as NewMediaRule, NewKeyframesRule, NewFontFaceRule, NewImportRule, and NewCharsetRule.

body := rephtml.NewStyleRule("body")
body.Props = rephtml.StyleMap{
	"background":  "#f7f7fb",
	"color":       "#1f2937",
	"font-family": "Arial, sans-serif",
	"margin":      "0",
}

mainWide := rephtml.NewStyleRule("main")
mainWide.Props = rephtml.StyleMap{
	"max-width": "960px",
}

html.AddToHead(rephtml.NewStyleElement().
	Type("text/css").
	AddRule(body).
	AddRule(rephtml.NewMediaRule("(min-width: 800px)").AddRule(mainWide)))

Inline styles use the same StyleMap and render in stable key order:

button := rephtml.NewButton().
	Text("Save").
	Style(rephtml.StyleMap{
		"background":    "#2563eb",
		"border":        "0",
		"border-radius": "4px",
		"color":         "#fff",
		"padding":       "0.5rem 0.75rem",
	})

fmt.Println(button.HTML())

Formatting and Escaping

rephtml escapes normal text and attribute values so characters like <, >, &, and quotes do not corrupt the generated HTML. Raw-text elements that commonly contain code, such as <style> and <script>, keep their content unescaped.

For regular elements, call HTML() or Render() directly:

paragraph := rephtml.NewP().Text("Hello")
fmt.Println(paragraph.HTML())

Raw CSS and JavaScript are preserved intentionally:

style := rephtml.NewStyleElement().Text(`
.notice > strong {
	color: #b91c1c;
}
`)

script := rephtml.NewScript().Text(`console.log("ready <now>");`)

WriteToFile and RenderFormatted format documents generated by rephtml with indentation and return filesystem or document structure errors. That formatter is intentionally scoped to rephtml output rather than exposed as a general-purpose HTML formatter. CSS inside <style> blocks is also indented for readability, while whitespace-sensitive blocks such as <pre> and <textarea> are preserved.

Examples

The examples above are self-contained and use the root package import path: github.com/lechefran/rephtml.

Supported Elements

Document Structure
  • <html> - Root element
  • <head> - Document head
  • <body> - Document body
  • <title> - Document title
  • <base> - Base URL
  • <link> - External resource link
  • <meta> - Metadata
  • <style> - Internal CSS
Content Sectioning
  • <header> - Header section
  • <nav> - Navigation section
  • <main> - Main content
  • <section> - Generic section
  • <article> - Article content
  • <aside> - Sidebar content
  • <footer> - Footer section
  • <address> - Contact information
  • <h1> through <h6> - Headings
  • <hgroup> - Heading group
Text Content
  • <div> - Generic container
  • <p> - Paragraph
  • <hr> - Horizontal rule
  • <pre> - Preformatted text
  • <blockquote> - Block quotation
  • <ol> - Ordered list
  • <ul> - Unordered list
  • <menu> - Menu list
  • <li> - List item
  • <dl> - Description list
  • <dt> - Description term
  • <dd> - Description details
  • <figure> - Figure with caption
  • <figcaption> - Figure caption
  • <search> - Search section
Inline Text Semantics
  • <a> - Anchor/link
  • <abbr> - Abbreviation
  • <b> - Bold text
  • <bdi> - Bidirectional isolate
  • <bdo> - Bidirectional override
  • <br> - Line break
  • <cite> - Citation
  • <code> - Code
  • <data> - Machine-readable data
  • <dfn> - Definition
  • <em> - Emphasis
  • <i> - Italic
  • <kbd> - Keyboard input
  • <mark> - Highlighted text
  • <q> - Inline quotation
  • <ruby> - Ruby annotation
  • <rb> - Ruby base
  • <rt> - Ruby text
  • <rtc> - Ruby text container
  • <rp> - Ruby parentheses
  • <s> - Strikethrough
  • <samp> - Sample output
  • <small> - Small text
  • <span> - Generic inline container
  • <strong> - Strong importance
  • <sub> - Subscript
  • <sup> - Superscript
  • <time> - Date/time
  • <u> - Underline
  • <var> - Variable
  • <wbr> - Word break opportunity
Image and Multimedia
  • <area> - Image map area
  • <audio> - Audio content
  • <img> - Image
  • <map> - Image map
  • <track> - Media track
  • <video> - Video content
Embedded Content
  • <embed> - External content
  • <iframe> - Inline frame
  • <object> - External object
  • <picture> - Responsive image container
  • <portal> - Portal element
  • <source> - Media source
SVG and MathML
  • <svg> - SVG graphics
  • <math> - MathML mathematics
Scripting
  • <canvas> - Graphics canvas
  • <noscript> - No script fallback
  • <script> - Script
Demarcating Edits
  • <del> - Deleted text
  • <ins> - Inserted text
Table Content
  • <table> - Table
  • <caption> - Table caption
  • <colgroup> - Column group
  • <col> - Table column
  • <tbody> - Table body
  • <thead> - Table head
  • <tfoot> - Table foot
  • <tr> - Table row
  • <td> - Table data cell
  • <th> - Table header cell
Forms
  • <form> - Form
  • <label> - Form label
  • <input> - Form input
  • <button> - Button
  • <select> - Selection list
  • <datalist> - Data list options
  • <optgroup> - Option group
  • <option> - Option
  • <textarea> - Text area
  • <output> - Form output
  • <progress> - Progress indicator
  • <meter> - Scalar measurement
  • <fieldset> - Form field grouping
  • <legend> - Fieldset legend
Interactive Elements
  • <details> - Disclosure widget
  • <summary> - Details summary
  • <dialog> - Dialog box
Web Components
  • <slot> - Web component slot
  • <template> - Template element

Total Elements: 118 HTML elements (excluding deprecated ones)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Abbr

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

Abbr represents the Abbr component or supporting type.

func NewAbbr

func NewAbbr() *Abbr

NewAbbr creates a new Abbr component.

func (*Abbr) AddStyle

func (a *Abbr) AddStyle(k, v string) *Abbr

AddStyle adds one inline CSS declaration to the Abbr component.

func (*Abbr) AddStyles

func (a *Abbr) AddStyles(m StyleMap) *Abbr

AddStyles adds multiple inline CSS declarations to the Abbr component.

func (*Abbr) Bytes

func (a *Abbr) Bytes() []byte

Bytes returns a defensive copy of the rendered Abbr bytes.

func (*Abbr) HTML

func (a *Abbr) HTML() string

HTML returns freshly prepared Abbr HTML as a string.

func (*Abbr) IsBodyElement

func (a *Abbr) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Abbr) Prepare

func (a *Abbr) Prepare()

Prepare renders the Abbr component into its internal buffer.

func (*Abbr) Render

func (a *Abbr) Render() []byte

Render returns freshly prepared Abbr HTML bytes.

func (*Abbr) String

func (a *Abbr) String() string

String returns freshly prepared Abbr HTML as a string.

func (*Abbr) Style

func (a *Abbr) Style(m StyleMap) *Abbr

Style replaces the inline CSS declarations on the Abbr component.

func (*Abbr) Text

func (a *Abbr) Text(s string) *Abbr

Text sets or appends text content on the Abbr component.

func (*Abbr) Title

func (a *Abbr) Title(s string) *Abbr

Title sets the title value on the Abbr component.

type Address

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

Address represents the Address component or supporting type.

func NewAddress

func NewAddress() *Address

NewAddress creates a new Address component.

func (*Address) Add

func (ad *Address) Add(e Element) *Address

Add appends child content to the Address component.

func (*Address) AddStyle

func (ad *Address) AddStyle(k, v string) *Address

AddStyle adds one inline CSS declaration to the Address component.

func (*Address) AddStyles

func (ad *Address) AddStyles(mp StyleMap) *Address

AddStyles adds multiple inline CSS declarations to the Address component.

func (*Address) Bytes

func (ad *Address) Bytes() []byte

Bytes returns a defensive copy of the rendered Address bytes.

func (*Address) HTML

func (a *Address) HTML() string

HTML returns freshly prepared Address HTML as a string.

func (*Address) IsBodyElement

func (ad *Address) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Address) Prepare

func (ad *Address) Prepare()

Prepare renders the Address component into its internal buffer.

func (*Address) Render

func (a *Address) Render() []byte

Render returns freshly prepared Address HTML bytes.

func (*Address) String

func (a *Address) String() string

String returns freshly prepared Address HTML as a string.

func (*Address) Style

func (ad *Address) Style(mp StyleMap) *Address

Style replaces the inline CSS declarations on the Address component.

type Anchor

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

Anchor represents the Anchor component or supporting type.

func NewAnchor

func NewAnchor() *Anchor

NewAnchor creates a new Anchor component.

func (*Anchor) AddStyle

func (a *Anchor) AddStyle(k, v string) *Anchor

AddStyle adds one inline CSS declaration to the Anchor component.

func (*Anchor) Bytes

func (a *Anchor) Bytes() []byte

Bytes returns a defensive copy of the rendered Anchor bytes.

func (*Anchor) HTML

func (a *Anchor) HTML() string

HTML returns freshly prepared Anchor HTML as a string.

func (*Anchor) IsBodyElement

func (a *Anchor) IsBodyElement()

IsBodyElement implements BodyElement interface

func (a *Anchor) Link(s string) *Anchor

Link sets the link value on the Anchor component.

func (*Anchor) Prepare

func (a *Anchor) Prepare()

Prepare renders the Anchor component into its internal buffer.

func (*Anchor) Render

func (a *Anchor) Render() []byte

Render returns freshly prepared Anchor HTML bytes.

func (*Anchor) String

func (a *Anchor) String() string

String returns freshly prepared Anchor HTML as a string.

func (*Anchor) Style

func (a *Anchor) Style(m StyleMap) *Anchor

Style replaces the inline CSS declarations on the Anchor component.

func (*Anchor) Text

func (a *Anchor) Text(s string) *Anchor

Text sets or appends text content on the Anchor component.

type Area

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

Area represents the Area component or supporting type.

func NewArea

func NewArea() *Area

NewArea creates a new Area component.

func (*Area) AddStyle

func (a *Area) AddStyle(k, v string) *Area

AddStyle adds one inline CSS declaration to the Area component.

func (*Area) AddStyles

func (a *Area) AddStyles(m StyleMap) *Area

AddStyles adds multiple inline CSS declarations to the Area component.

func (*Area) Alt

func (a *Area) Alt(alt string) *Area

Alt sets the alt value on the Area component.

func (*Area) Bytes

func (a *Area) Bytes() []byte

Bytes returns a defensive copy of the rendered Area bytes.

func (*Area) Coords

func (a *Area) Coords(coords string) *Area

Coords sets the coords value on the Area component.

func (*Area) HTML

func (a *Area) HTML() string

HTML returns freshly prepared Area HTML as a string.

func (*Area) Href

func (a *Area) Href(href string) *Area

Href sets the href value on the Area component.

func (*Area) IsBodyElement

func (a *Area) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Area) Prepare

func (a *Area) Prepare()

Prepare renders the Area component into its internal buffer.

func (*Area) Render

func (a *Area) Render() []byte

Render returns freshly prepared Area HTML bytes.

func (*Area) Shape

func (a *Area) Shape(shape string) *Area

Shape sets the shape value on the Area component.

func (*Area) String

func (a *Area) String() string

String returns freshly prepared Area HTML as a string.

func (*Area) Style

func (a *Area) Style(m StyleMap) *Area

Style replaces the inline CSS declarations on the Area component.

func (*Area) Target

func (a *Area) Target(target string) *Area

Target sets the target value on the Area component.

type Article

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

Article represents the Article component or supporting type.

func NewArticle

func NewArticle() *Article

NewArticle creates a new Article component.

func (*Article) Add

func (a *Article) Add(e Element) *Article

Add appends child content to the Article component.

func (*Article) AddStyle

func (a *Article) AddStyle(k, v string) *Article

AddStyle adds one inline CSS declaration to the Article component.

func (*Article) AddStyles

func (a *Article) AddStyles(mp StyleMap) *Article

AddStyles adds multiple inline CSS declarations to the Article component.

func (*Article) Bytes

func (a *Article) Bytes() []byte

Bytes returns a defensive copy of the rendered Article bytes.

func (*Article) HTML

func (a *Article) HTML() string

HTML returns freshly prepared Article HTML as a string.

func (*Article) IsBodyElement

func (a *Article) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Article) Prepare

func (a *Article) Prepare()

Prepare renders the Article component into its internal buffer.

func (*Article) Render

func (a *Article) Render() []byte

Render returns freshly prepared Article HTML bytes.

func (*Article) String

func (a *Article) String() string

String returns freshly prepared Article HTML as a string.

func (*Article) Style

func (a *Article) Style(mp StyleMap) *Article

Style replaces the inline CSS declarations on the Article component.

type Aside

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

Aside represents the Aside component or supporting type.

func NewAside

func NewAside() *Aside

NewAside creates a new Aside component.

func (*Aside) Add

func (as *Aside) Add(e Element) *Aside

Add appends child content to the Aside component.

func (*Aside) AddStyle

func (as *Aside) AddStyle(k, v string) *Aside

AddStyle adds one inline CSS declaration to the Aside component.

func (*Aside) AddStyles

func (as *Aside) AddStyles(mp StyleMap) *Aside

AddStyles adds multiple inline CSS declarations to the Aside component.

func (*Aside) Bytes

func (as *Aside) Bytes() []byte

Bytes returns a defensive copy of the rendered Aside bytes.

func (*Aside) HTML

func (a *Aside) HTML() string

HTML returns freshly prepared Aside HTML as a string.

func (*Aside) IsBodyElement

func (as *Aside) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Aside) Prepare

func (as *Aside) Prepare()

Prepare renders the Aside component into its internal buffer.

func (*Aside) Render

func (a *Aside) Render() []byte

Render returns freshly prepared Aside HTML bytes.

func (*Aside) String

func (a *Aside) String() string

String returns freshly prepared Aside HTML as a string.

func (*Aside) Style

func (as *Aside) Style(mp StyleMap) *Aside

Style replaces the inline CSS declarations on the Aside component.

type Audio

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

Audio represents the Audio component or supporting type.

func NewAudio

func NewAudio() *Audio

NewAudio creates a new Audio component.

func (*Audio) Add

func (a *Audio) Add(e Element) *Audio

Add appends child content to the Audio component.

func (*Audio) AddStyle

func (a *Audio) AddStyle(k, v string) *Audio

AddStyle adds one inline CSS declaration to the Audio component.

func (*Audio) AddStyles

func (a *Audio) AddStyles(m StyleMap) *Audio

AddStyles adds multiple inline CSS declarations to the Audio component.

func (*Audio) Autoplay

func (a *Audio) Autoplay(autoplay bool) *Audio

Autoplay sets the autoplay value on the Audio component.

func (*Audio) Bytes

func (a *Audio) Bytes() []byte

Bytes returns a defensive copy of the rendered Audio bytes.

func (*Audio) Controls

func (a *Audio) Controls(controls bool) *Audio

Controls sets the controls value on the Audio component.

func (*Audio) HTML

func (a *Audio) HTML() string

HTML returns freshly prepared Audio HTML as a string.

func (*Audio) IsBodyElement

func (a *Audio) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Audio) Loop

func (a *Audio) Loop(loop bool) *Audio

Loop sets the loop value on the Audio component.

func (*Audio) Muted

func (a *Audio) Muted(muted bool) *Audio

Muted sets the muted value on the Audio component.

func (*Audio) Preload

func (a *Audio) Preload(preload string) *Audio

Preload sets the preload value on the Audio component.

func (*Audio) Prepare

func (a *Audio) Prepare()

Prepare renders the Audio component into its internal buffer.

func (*Audio) Render

func (a *Audio) Render() []byte

Render returns freshly prepared Audio HTML bytes.

func (*Audio) Src

func (a *Audio) Src(src string) *Audio

Src sets the src value on the Audio component.

func (*Audio) String

func (a *Audio) String() string

String returns freshly prepared Audio HTML as a string.

func (*Audio) Style

func (a *Audio) Style(m StyleMap) *Audio

Style replaces the inline CSS declarations on the Audio component.

type B

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

B represents the B component or supporting type.

func NewB

func NewB() *B

NewB creates a new B component.

func (*B) AddStyle

func (b *B) AddStyle(k, v string) *B

AddStyle adds one inline CSS declaration to the B component.

func (*B) AddStyles

func (b *B) AddStyles(m StyleMap) *B

AddStyles adds multiple inline CSS declarations to the B component.

func (*B) Bytes

func (b *B) Bytes() []byte

Bytes returns a defensive copy of the rendered B bytes.

func (*B) HTML

func (b *B) HTML() string

HTML returns freshly prepared B HTML as a string.

func (*B) IsBodyElement

func (b *B) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*B) Prepare

func (b *B) Prepare()

Prepare renders the B component into its internal buffer.

func (*B) Render

func (b *B) Render() []byte

Render returns freshly prepared B HTML bytes.

func (*B) String

func (b *B) String() string

String returns freshly prepared B HTML as a string.

func (*B) Style

func (b *B) Style(m StyleMap) *B

Style replaces the inline CSS declarations on the B component.

func (*B) Text

func (b *B) Text(s string) *B

Text sets or appends text content on the B component.

type Base

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

Base represents the HTML base element for document base URL

func NewBase

func NewBase() *Base

NewBase creates a new Base element

func (*Base) AddStyle

func (b *Base) AddStyle(k, v string) *Base

AddStyle adds a single CSS property

func (*Base) AddStyles

func (b *Base) AddStyles(m StyleMap) *Base

AddStyles adds multiple CSS properties

func (*Base) Bytes

func (b *Base) Bytes() []byte

Bytes returns the buffer contents

func (*Base) HTML

func (b *Base) HTML() string

HTML returns freshly prepared Base HTML as a string.

func (*Base) Href

func (b *Base) Href(href string) *Base

Href sets the href attribute

func (*Base) IsHeadElement

func (b *Base) IsHeadElement()

IsHeadElement implements HeadElement interface

func (*Base) Prepare

func (b *Base) Prepare()

Prepare builds the HTML for the base element

func (*Base) Render

func (b *Base) Render() []byte

Render returns freshly prepared Base HTML bytes.

func (*Base) String

func (b *Base) String() string

String returns freshly prepared Base HTML as a string.

func (*Base) Style

func (b *Base) Style(m StyleMap) *Base

Style replaces all styles

func (*Base) Target

func (b *Base) Target(target string) *Base

Target sets the target attribute

type Bdi

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

Bdi represents the bdi component or supporting type.

func NewBdi

func NewBdi() *Bdi

NewBdi creates a new bdi component.

func (*Bdi) AddStyle

func (d *Bdi) AddStyle(k, v string) *Bdi

AddStyle adds one inline CSS declaration to the Bdi component.

func (*Bdi) AddStyles

func (d *Bdi) AddStyles(m StyleMap) *Bdi

AddStyles adds multiple inline CSS declarations to the Bdi component.

func (*Bdi) Bytes

func (d *Bdi) Bytes() []byte

Bytes returns a defensive copy of the rendered Bdi bytes.

func (*Bdi) HTML

func (b *Bdi) HTML() string

HTML returns freshly prepared Bdi HTML as a string.

func (*Bdi) IsBodyElement

func (d *Bdi) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Bdi) Prepare

func (d *Bdi) Prepare()

Prepare renders the Bdi component into its internal buffer.

func (*Bdi) Render

func (b *Bdi) Render() []byte

Render returns freshly prepared Bdi HTML bytes.

func (*Bdi) String

func (b *Bdi) String() string

String returns freshly prepared Bdi HTML as a string.

func (*Bdi) Style

func (d *Bdi) Style(m StyleMap) *Bdi

Style replaces the inline CSS declarations on the Bdi component.

func (*Bdi) Text

func (d *Bdi) Text(s string) *Bdi

Text sets or appends text content on the Bdi component.

type Bdo

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

Bdo represents the bdo component or supporting type.

func NewBdo

func NewBdo() *Bdo

NewBdo creates a new bdo component.

func (*Bdo) AddStyle

func (d *Bdo) AddStyle(k, v string) *Bdo

AddStyle adds one inline CSS declaration to the Bdo component.

func (*Bdo) AddStyles

func (d *Bdo) AddStyles(m StyleMap) *Bdo

AddStyles adds multiple inline CSS declarations to the Bdo component.

func (*Bdo) Bytes

func (d *Bdo) Bytes() []byte

Bytes returns a defensive copy of the rendered Bdo bytes.

func (*Bdo) HTML

func (b *Bdo) HTML() string

HTML returns freshly prepared Bdo HTML as a string.

func (*Bdo) IsBodyElement

func (d *Bdo) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Bdo) Prepare

func (d *Bdo) Prepare()

Prepare renders the Bdo component into its internal buffer.

func (*Bdo) Render

func (b *Bdo) Render() []byte

Render returns freshly prepared Bdo HTML bytes.

func (*Bdo) String

func (b *Bdo) String() string

String returns freshly prepared Bdo HTML as a string.

func (*Bdo) Style

func (d *Bdo) Style(m StyleMap) *Bdo

Style replaces the inline CSS declarations on the Bdo component.

func (*Bdo) Text

func (d *Bdo) Text(s string) *Bdo

Text sets or appends text content on the Bdo component.

type Blockquote

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

Blockquote represents the Blockquote component or supporting type.

func NewBlockquote

func NewBlockquote() *Blockquote

NewBlockquote creates a new Blockquote component.

func (*Blockquote) AddStyle

func (b *Blockquote) AddStyle(k, v string) *Blockquote

AddStyle adds one inline CSS declaration to the Blockquote component.

func (*Blockquote) AddStyles

func (b *Blockquote) AddStyles(m StyleMap) *Blockquote

AddStyles adds multiple inline CSS declarations to the Blockquote component.

func (*Blockquote) Bytes

func (b *Blockquote) Bytes() []byte

Bytes returns a defensive copy of the rendered Blockquote bytes.

func (*Blockquote) Cite

func (b *Blockquote) Cite(c string) *Blockquote

Cite sets the cite value on the Blockquote component.

func (*Blockquote) HTML

func (b *Blockquote) HTML() string

HTML returns freshly prepared Blockquote HTML as a string.

func (*Blockquote) IsBodyElement

func (b *Blockquote) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Blockquote) Prepare

func (b *Blockquote) Prepare()

Prepare renders the Blockquote component into its internal buffer.

func (*Blockquote) Render

func (b *Blockquote) Render() []byte

Render returns freshly prepared Blockquote HTML bytes.

func (*Blockquote) String

func (b *Blockquote) String() string

String returns freshly prepared Blockquote HTML as a string.

func (*Blockquote) Style

func (b *Blockquote) Style(m StyleMap) *Blockquote

Style replaces the inline CSS declarations on the Blockquote component.

func (*Blockquote) Text

func (b *Blockquote) Text(str string) *Blockquote

Text sets or appends text content on the Blockquote component.

type Body

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

Body represents the HTML body element for document content

func NewBody

func NewBody() *Body

NewBody creates a new Body element

func (*Body) Add

func (b *Body) Add(e Element) *Body

Add adds content to the body element

func (*Body) AddStyle

func (b *Body) AddStyle(k, v string) *Body

AddStyle adds a single CSS property

func (*Body) AddStyles

func (b *Body) AddStyles(m StyleMap) *Body

AddStyles adds multiple CSS properties

func (*Body) Bytes

func (b *Body) Bytes() []byte

Bytes returns the buffer contents

func (*Body) HTML

func (b *Body) HTML() string

HTML returns freshly prepared Body HTML as a string.

func (*Body) IsBodyElement

func (b *Body) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Body) OnLoad

func (b *Body) OnLoad(onLoad string) *Body

OnLoad sets the onload attribute

func (*Body) OnUnload

func (b *Body) OnUnload(onUnload string) *Body

OnUnload sets the onunload attribute

func (*Body) Prepare

func (b *Body) Prepare()

Prepare builds the HTML for the body element

func (*Body) Render

func (b *Body) Render() []byte

Render returns freshly prepared Body HTML bytes.

func (*Body) String

func (b *Body) String() string

String returns freshly prepared Body HTML as a string.

func (*Body) Style

func (b *Body) Style(m StyleMap) *Body

Style replaces all styles

type BodyElement

type BodyElement interface {
	Element
	IsBodyElement()
}

BodyElement is HTML content that can be appended to a document body.

type Br

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

Br represents the Br component or supporting type.

func NewBr

func NewBr() *Br

NewBr creates a new Br component.

func (*Br) AddStyle

func (br *Br) AddStyle(k, v string) *Br

AddStyle adds one inline CSS declaration to the Br component.

func (*Br) AddStyles

func (br *Br) AddStyles(m StyleMap) *Br

AddStyles adds multiple inline CSS declarations to the Br component.

func (*Br) Bytes

func (br *Br) Bytes() []byte

Bytes returns a defensive copy of the rendered Br bytes.

func (*Br) HTML

func (b *Br) HTML() string

HTML returns freshly prepared Br HTML as a string.

func (*Br) IsBodyElement

func (br *Br) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Br) Prepare

func (br *Br) Prepare()

Prepare renders the Br component into its internal buffer.

func (*Br) Render

func (b *Br) Render() []byte

Render returns freshly prepared Br HTML bytes.

func (*Br) String

func (b *Br) String() string

String returns freshly prepared Br HTML as a string.

func (*Br) Style

func (br *Br) Style(m StyleMap) *Br

Style replaces the inline CSS declarations on the Br component.

type Button

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

Button represents the HTML button element for clickable buttons

func NewButton

func NewButton() *Button

NewButton creates a new Button element

func (*Button) Add

func (b *Button) Add(e Element) *Button

Add adds content to the button element

func (*Button) AddStyle

func (b *Button) AddStyle(k, v string) *Button

AddStyle adds a single CSS property

func (*Button) AddStyles

func (b *Button) AddStyles(m StyleMap) *Button

AddStyles adds multiple CSS properties

func (*Button) Autofocus

func (b *Button) Autofocus(autofocus bool) *Button

Autofocus sets the autofocus attribute

func (*Button) Bytes

func (b *Button) Bytes() []byte

Bytes returns the buffer contents

func (*Button) Disabled

func (b *Button) Disabled(disabled bool) *Button

Disabled sets the disabled attribute

func (*Button) Form

func (b *Button) Form(form string) *Button

Form sets the form attribute

func (*Button) FormAction

func (b *Button) FormAction(formAction string) *Button

FormAction sets the formaction attribute

func (*Button) FormEnctype

func (b *Button) FormEnctype(formEnctype string) *Button

FormEnctype sets the formenctype attribute

func (*Button) FormMethod

func (b *Button) FormMethod(formMethod string) *Button

FormMethod sets the formmethod attribute

func (*Button) FormNovalidate

func (b *Button) FormNovalidate(formNovalidate bool) *Button

FormNovalidate sets the formnovalidate attribute

func (*Button) FormTarget

func (b *Button) FormTarget(formTarget string) *Button

FormTarget sets the formtarget attribute

func (*Button) HTML

func (b *Button) HTML() string

HTML returns freshly prepared Button HTML as a string.

func (*Button) IsBodyElement

func (b *Button) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Button) Name

func (b *Button) Name(name string) *Button

Name sets the name attribute

func (*Button) Prepare

func (b *Button) Prepare()

Prepare builds the HTML for the button element

func (*Button) Render

func (b *Button) Render() []byte

Render returns freshly prepared Button HTML bytes.

func (*Button) String

func (b *Button) String() string

String returns freshly prepared Button HTML as a string.

func (*Button) Style

func (b *Button) Style(m StyleMap) *Button

Style replaces all styles

func (*Button) Text

func (b *Button) Text(text string) *Button

Text adds text content to the button element

func (*Button) Type

func (b *Button) Type(buttonType string) *Button

Type sets the type attribute

func (*Button) Value

func (b *Button) Value(value string) *Button

Value sets the value attribute

type CSSRule

type CSSRule interface {
	Element
	IsCSSRule()
}

CSSRule represents renderable CSS that can be placed inside a style element.

type Canvas

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

Canvas represents the Canvas component or supporting type.

func NewCanvas

func NewCanvas() *Canvas

NewCanvas creates a new Canvas component.

func (*Canvas) Add

func (c *Canvas) Add(e Element) *Canvas

Add appends child content to the Canvas component.

func (*Canvas) AddStyle

func (c *Canvas) AddStyle(k, v string) *Canvas

AddStyle adds one inline CSS declaration to the Canvas component.

func (*Canvas) AddStyles

func (c *Canvas) AddStyles(m StyleMap) *Canvas

AddStyles adds multiple inline CSS declarations to the Canvas component.

func (*Canvas) Bytes

func (c *Canvas) Bytes() []byte

Bytes returns a defensive copy of the rendered Canvas bytes.

func (*Canvas) HTML

func (c *Canvas) HTML() string

HTML returns freshly prepared Canvas HTML as a string.

func (*Canvas) Height

func (c *Canvas) Height(height string) *Canvas

Height sets the height value on the Canvas component.

func (*Canvas) IsBodyElement

func (c *Canvas) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Canvas) Prepare

func (c *Canvas) Prepare()

Prepare renders the Canvas component into its internal buffer.

func (*Canvas) Render

func (c *Canvas) Render() []byte

Render returns freshly prepared Canvas HTML bytes.

func (*Canvas) String

func (c *Canvas) String() string

String returns freshly prepared Canvas HTML as a string.

func (*Canvas) Style

func (c *Canvas) Style(m StyleMap) *Canvas

Style replaces the inline CSS declarations on the Canvas component.

func (*Canvas) Width

func (c *Canvas) Width(width string) *Canvas

Width sets the width value on the Canvas component.

type Caption

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

Caption represents the Caption component or supporting type.

func NewCaption

func NewCaption() *Caption

NewCaption creates a new Caption component.

func (*Caption) AddClass

func (c *Caption) AddClass(s string) *Caption

AddClass sets the addclass value on the Caption component.

func (*Caption) AddClasses

func (c *Caption) AddClasses(s []string) *Caption

AddClasses sets the addclasses value on the Caption component.

func (*Caption) AddId

func (c *Caption) AddId(s string) *Caption

AddId sets the addid value on the Caption component.

func (*Caption) AddStyle

func (c *Caption) AddStyle(k, v string) *Caption

AddStyle adds one inline CSS declaration to the Caption component.

func (*Caption) AddStyles

func (c *Caption) AddStyles(m StyleMap) *Caption

AddStyles adds multiple inline CSS declarations to the Caption component.

func (*Caption) Bytes

func (c *Caption) Bytes() []byte

Bytes returns a defensive copy of the rendered Caption bytes.

func (*Caption) Class

func (c *Caption) Class(s []string) *Caption

Class sets the class value on the Caption component.

func (*Caption) HTML

func (c *Caption) HTML() string

HTML returns freshly prepared Caption HTML as a string.

func (*Caption) Id

func (c *Caption) Id(s string) *Caption

Id sets the id value on the Caption component.

func (*Caption) IsBodyElement

func (c *Caption) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Caption) Prepare

func (c *Caption) Prepare()

Prepare renders the Caption component into its internal buffer.

func (*Caption) Render

func (c *Caption) Render() []byte

Render returns freshly prepared Caption HTML bytes.

func (*Caption) String

func (c *Caption) String() string

String returns freshly prepared Caption HTML as a string.

func (*Caption) Styles

func (c *Caption) Styles(m StyleMap) *Caption

Styles replaces the inline CSS declarations on the Caption component.

func (*Caption) Text

func (c *Caption) Text(text string) *Caption

Text sets or appends text content on the Caption component.

type CharsetRule

type CharsetRule struct {
	Charset string
	// contains filtered or unexported fields
}

CharsetRule represents a CSS @charset rule.

func NewCharsetRule

func NewCharsetRule(charset string) *CharsetRule

NewCharsetRule creates a new @charset rule.

func (*CharsetRule) Bytes

func (c *CharsetRule) Bytes() []byte

Bytes returns a defensive copy of the rendered CharsetRule bytes.

func (*CharsetRule) HTML

func (c *CharsetRule) HTML() string

HTML returns freshly prepared CharsetRule HTML as a string.

func (*CharsetRule) IsCSSRule

func (c *CharsetRule) IsCSSRule()

IsCSSRule marks CharsetRule as CSS content for style elements.

func (*CharsetRule) Prepare

func (c *CharsetRule) Prepare()

Prepare renders the CharsetRule component into its internal buffer.

func (*CharsetRule) Render

func (c *CharsetRule) Render() []byte

Render returns freshly prepared CharsetRule HTML bytes.

func (*CharsetRule) String

func (c *CharsetRule) String() string

String returns freshly prepared CharsetRule HTML as a string.

type Cite

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

Cite represents the Cite component or supporting type.

func NewCite

func NewCite() *Cite

NewCite creates a new Cite component.

func (*Cite) AddStyle

func (c *Cite) AddStyle(k, v string) *Cite

AddStyle adds one inline CSS declaration to the Cite component.

func (*Cite) AddStyles

func (c *Cite) AddStyles(m StyleMap) *Cite

AddStyles adds multiple inline CSS declarations to the Cite component.

func (*Cite) Bytes

func (c *Cite) Bytes() []byte

Bytes returns a defensive copy of the rendered Cite bytes.

func (*Cite) HTML

func (c *Cite) HTML() string

HTML returns freshly prepared Cite HTML as a string.

func (*Cite) IsBodyElement

func (c *Cite) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Cite) Prepare

func (c *Cite) Prepare()

Prepare renders the Cite component into its internal buffer.

func (*Cite) Render

func (c *Cite) Render() []byte

Render returns freshly prepared Cite HTML bytes.

func (*Cite) String

func (c *Cite) String() string

String returns freshly prepared Cite HTML as a string.

func (*Cite) Style

func (c *Cite) Style(m StyleMap) *Cite

Style replaces the inline CSS declarations on the Cite component.

func (*Cite) Text

func (c *Cite) Text(s string) *Cite

Text sets or appends text content on the Cite component.

type Code

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

Code represents the Code component or supporting type.

func NewCode

func NewCode() *Code

NewCode creates a new Code component.

func (*Code) AddStyle

func (c *Code) AddStyle(k, v string) *Code

AddStyle adds one inline CSS declaration to the Code component.

func (*Code) AddStyles

func (c *Code) AddStyles(m StyleMap) *Code

AddStyles adds multiple inline CSS declarations to the Code component.

func (*Code) Bytes

func (c *Code) Bytes() []byte

Bytes returns a defensive copy of the rendered Code bytes.

func (*Code) HTML

func (c *Code) HTML() string

HTML returns freshly prepared Code HTML as a string.

func (*Code) IsBodyElement

func (c *Code) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Code) Prepare

func (c *Code) Prepare()

Prepare renders the Code component into its internal buffer.

func (*Code) Render

func (c *Code) Render() []byte

Render returns freshly prepared Code HTML bytes.

func (*Code) String

func (c *Code) String() string

String returns freshly prepared Code HTML as a string.

func (*Code) Style

func (c *Code) Style(m StyleMap) *Code

Style replaces the inline CSS declarations on the Code component.

func (*Code) Text

func (c *Code) Text(s string) *Code

Text sets or appends text content on the Code component.

type Col

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

Col represents the Col component or supporting type.

func NewCol

func NewCol() *Col

NewCol creates a new Col component.

func (*Col) AddClass

func (col *Col) AddClass(s string) *Col

AddClass sets the addclass value on the Col component.

func (*Col) AddClasses

func (col *Col) AddClasses(s []string) *Col

AddClasses sets the addclasses value on the Col component.

func (*Col) AddId

func (col *Col) AddId(s string) *Col

AddId sets the addid value on the Col component.

func (*Col) AddStyle

func (col *Col) AddStyle(k, v string) *Col

AddStyle adds one inline CSS declaration to the Col component.

func (*Col) AddStyles

func (col *Col) AddStyles(m StyleMap) *Col

AddStyles adds multiple inline CSS declarations to the Col component.

func (*Col) Bytes

func (col *Col) Bytes() []byte

Bytes returns a defensive copy of the rendered Col bytes.

func (*Col) Class

func (col *Col) Class(s []string) *Col

Class sets the class value on the Col component.

func (*Col) HTML

func (c *Col) HTML() string

HTML returns freshly prepared Col HTML as a string.

func (*Col) Id

func (col *Col) Id(s string) *Col

Id sets the id value on the Col component.

func (*Col) IsBodyElement

func (col *Col) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Col) Prepare

func (col *Col) Prepare()

Prepare renders the Col component into its internal buffer.

func (*Col) Render

func (c *Col) Render() []byte

Render returns freshly prepared Col HTML bytes.

func (*Col) Span

func (col *Col) Span(s int) *Col

Span sets the span value on the Col component.

func (*Col) String

func (c *Col) String() string

String returns freshly prepared Col HTML as a string.

func (*Col) Styles

func (col *Col) Styles(m StyleMap) *Col

Styles replaces the inline CSS declarations on the Col component.

type Colgroup

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

Colgroup represents the Colgroup component or supporting type.

func NewColgroup

func NewColgroup() *Colgroup

NewColgroup creates a new Colgroup component.

func (*Colgroup) Add

func (cg *Colgroup) Add(e Element) *Colgroup

Add appends child content to the Colgroup component.

func (*Colgroup) AddClass

func (cg *Colgroup) AddClass(s string) *Colgroup

AddClass sets the addclass value on the Colgroup component.

func (*Colgroup) AddClasses

func (cg *Colgroup) AddClasses(s []string) *Colgroup

AddClasses sets the addclasses value on the Colgroup component.

func (*Colgroup) AddId

func (cg *Colgroup) AddId(s string) *Colgroup

AddId sets the addid value on the Colgroup component.

func (*Colgroup) AddStyle

func (cg *Colgroup) AddStyle(k, v string) *Colgroup

AddStyle adds one inline CSS declaration to the Colgroup component.

func (*Colgroup) AddStyles

func (cg *Colgroup) AddStyles(m StyleMap) *Colgroup

AddStyles adds multiple inline CSS declarations to the Colgroup component.

func (*Colgroup) Bytes

func (cg *Colgroup) Bytes() []byte

Bytes returns a defensive copy of the rendered Colgroup bytes.

func (*Colgroup) Class

func (cg *Colgroup) Class(s []string) *Colgroup

Class sets the class value on the Colgroup component.

func (*Colgroup) HTML

func (c *Colgroup) HTML() string

HTML returns freshly prepared Colgroup HTML as a string.

func (*Colgroup) Id

func (cg *Colgroup) Id(s string) *Colgroup

Id sets the id value on the Colgroup component.

func (*Colgroup) IsBodyElement

func (cg *Colgroup) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Colgroup) Prepare

func (cg *Colgroup) Prepare()

Prepare renders the Colgroup component into its internal buffer.

func (*Colgroup) Render

func (c *Colgroup) Render() []byte

Render returns freshly prepared Colgroup HTML bytes.

func (*Colgroup) Span

func (cg *Colgroup) Span(s int) *Colgroup

Span sets the span value on the Colgroup component.

func (*Colgroup) String

func (c *Colgroup) String() string

String returns freshly prepared Colgroup HTML as a string.

func (*Colgroup) Styles

func (cg *Colgroup) Styles(m StyleMap) *Colgroup

Styles replaces the inline CSS declarations on the Colgroup component.

type Comment

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

Comment represents the Comment component or supporting type.

func NewComment

func NewComment() *Comment

NewComment creates a new Comment component.

func (*Comment) Bytes

func (c *Comment) Bytes() []byte

Bytes returns a defensive copy of the rendered Comment bytes.

func (*Comment) HTML

func (c *Comment) HTML() string

HTML returns freshly prepared Comment HTML as a string.

func (*Comment) IsBodyElement

func (c *Comment) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Comment) Prepare

func (c *Comment) Prepare()

Prepare renders the Comment component into its internal buffer.

func (*Comment) Render

func (c *Comment) Render() []byte

Render returns freshly prepared Comment HTML bytes.

func (*Comment) String

func (c *Comment) String() string

String returns freshly prepared Comment HTML as a string.

func (*Comment) Text

func (c *Comment) Text(s string) *Comment

Text sets or appends text content on the Comment component.

type Data

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

Data represents the Data component or supporting type.

func NewData

func NewData() *Data

NewData creates a new Data component.

func (*Data) AddStyle

func (d *Data) AddStyle(k, v string) *Data

AddStyle adds one inline CSS declaration to the Data component.

func (*Data) AddStyles

func (d *Data) AddStyles(m StyleMap) *Data

AddStyles adds multiple inline CSS declarations to the Data component.

func (*Data) Bytes

func (d *Data) Bytes() []byte

Bytes returns a defensive copy of the rendered Data bytes.

func (*Data) HTML

func (d *Data) HTML() string

HTML returns freshly prepared Data HTML as a string.

func (*Data) IsBodyElement

func (d *Data) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Data) Prepare

func (d *Data) Prepare()

Prepare renders the Data component into its internal buffer.

func (*Data) Render

func (d *Data) Render() []byte

Render returns freshly prepared Data HTML bytes.

func (*Data) String

func (d *Data) String() string

String returns freshly prepared Data HTML as a string.

func (*Data) Style

func (d *Data) Style(m StyleMap) *Data

Style replaces the inline CSS declarations on the Data component.

func (*Data) Text

func (d *Data) Text(s string) *Data

Text sets or appends text content on the Data component.

func (*Data) Value

func (d *Data) Value(s string) *Data

Value sets the value value on the Data component.

type Datalist

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

Datalist represents the HTML datalist element for predefined options

func NewDatalist

func NewDatalist() *Datalist

NewDatalist creates a new Datalist element

func (*Datalist) Add

func (d *Datalist) Add(e Element) *Datalist

Add adds content to the datalist element

func (*Datalist) AddStyle

func (d *Datalist) AddStyle(k, v string) *Datalist

AddStyle adds a single CSS property

func (*Datalist) AddStyles

func (d *Datalist) AddStyles(m StyleMap) *Datalist

AddStyles adds multiple CSS properties

func (*Datalist) Bytes

func (d *Datalist) Bytes() []byte

Bytes returns the buffer contents

func (*Datalist) HTML

func (d *Datalist) HTML() string

HTML returns freshly prepared Datalist HTML as a string.

func (*Datalist) Id

func (d *Datalist) Id(id string) *Datalist

Id sets the id attribute

func (*Datalist) IsBodyElement

func (d *Datalist) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Datalist) Prepare

func (d *Datalist) Prepare()

Prepare builds the HTML for the datalist element

func (*Datalist) Render

func (d *Datalist) Render() []byte

Render returns freshly prepared Datalist HTML bytes.

func (*Datalist) String

func (d *Datalist) String() string

String returns freshly prepared Datalist HTML as a string.

func (*Datalist) Style

func (d *Datalist) Style(m StyleMap) *Datalist

Style replaces all styles

type Dd

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

Dd represents the Dd component or supporting type.

func NewDd

func NewDd() *Dd

NewDd creates a new Dd component.

func (*Dd) Add

func (d *Dd) Add(e Element) *Dd

Add appends child content to the Dd component.

func (*Dd) AddStyle

func (d *Dd) AddStyle(k, v string) *Dd

AddStyle adds one inline CSS declaration to the Dd component.

func (*Dd) AddStyles

func (d *Dd) AddStyles(m StyleMap) *Dd

AddStyles adds multiple inline CSS declarations to the Dd component.

func (*Dd) Bytes

func (d *Dd) Bytes() []byte

Bytes returns a defensive copy of the rendered Dd bytes.

func (*Dd) HTML

func (d *Dd) HTML() string

HTML returns freshly prepared Dd HTML as a string.

func (*Dd) IsBodyElement

func (d *Dd) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Dd) Prepare

func (d *Dd) Prepare()

Prepare renders the Dd component into its internal buffer.

func (*Dd) Render

func (d *Dd) Render() []byte

Render returns freshly prepared Dd HTML bytes.

func (*Dd) String

func (d *Dd) String() string

String returns freshly prepared Dd HTML as a string.

func (*Dd) Style

func (d *Dd) Style(m StyleMap) *Dd

Style replaces the inline CSS declarations on the Dd component.

type Del

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

Del represents the HTML del element for marking deleted text

func NewDel

func NewDel() *Del

NewDel creates a new Del element

func (*Del) Add

func (d *Del) Add(e Element) *Del

Add adds content to the del element

func (*Del) AddStyle

func (d *Del) AddStyle(k, v string) *Del

AddStyle adds a single CSS property

func (*Del) AddStyles

func (d *Del) AddStyles(m StyleMap) *Del

AddStyles adds multiple CSS properties

func (*Del) Bytes

func (d *Del) Bytes() []byte

Bytes returns the buffer contents

func (*Del) Cite

func (d *Del) Cite(url string) *Del

Cite sets the cite attribute

func (*Del) Datetime

func (d *Del) Datetime(datetime string) *Del

Datetime sets the datetime attribute

func (*Del) HTML

func (d *Del) HTML() string

HTML returns freshly prepared Del HTML as a string.

func (*Del) IsBodyElement

func (d *Del) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Del) Prepare

func (d *Del) Prepare()

Prepare builds the HTML for the del element

func (*Del) Render

func (d *Del) Render() []byte

Render returns freshly prepared Del HTML bytes.

func (*Del) String

func (d *Del) String() string

String returns freshly prepared Del HTML as a string.

func (*Del) Style

func (d *Del) Style(m StyleMap) *Del

Style replaces all styles

type Details

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

Details represents the HTML details element for creating a disclosure widget

func NewDetails

func NewDetails() *Details

NewDetails creates a new Details element

func (*Details) Add

func (d *Details) Add(e Element) *Details

Add adds content to the details element

func (*Details) AddStyle

func (d *Details) AddStyle(k, v string) *Details

AddStyle adds a single CSS property

func (*Details) AddStyles

func (d *Details) AddStyles(m StyleMap) *Details

AddStyles adds multiple CSS properties

func (*Details) Bytes

func (d *Details) Bytes() []byte

Bytes returns the buffer contents

func (*Details) HTML

func (d *Details) HTML() string

HTML returns freshly prepared Details HTML as a string.

func (*Details) IsBodyElement

func (d *Details) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Details) Open

func (d *Details) Open(open bool) *Details

Open sets the open attribute

func (*Details) Prepare

func (d *Details) Prepare()

Prepare builds the HTML for the details element

func (*Details) Render

func (d *Details) Render() []byte

Render returns freshly prepared Details HTML bytes.

func (*Details) String

func (d *Details) String() string

String returns freshly prepared Details HTML as a string.

func (*Details) Style

func (d *Details) Style(m StyleMap) *Details

Style replaces all styles

type Dfn

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

Dfn represents the Dfn component or supporting type.

func NewDfn

func NewDfn() *Dfn

NewDfn creates a new Dfn component.

func (*Dfn) AddStyle

func (d *Dfn) AddStyle(k, v string) *Dfn

AddStyle adds one inline CSS declaration to the Dfn component.

func (*Dfn) AddStyles

func (d *Dfn) AddStyles(m StyleMap) *Dfn

AddStyles adds multiple inline CSS declarations to the Dfn component.

func (*Dfn) Bytes

func (d *Dfn) Bytes() []byte

Bytes returns a defensive copy of the rendered Dfn bytes.

func (*Dfn) HTML

func (d *Dfn) HTML() string

HTML returns freshly prepared Dfn HTML as a string.

func (*Dfn) IsBodyElement

func (d *Dfn) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Dfn) Prepare

func (d *Dfn) Prepare()

Prepare renders the Dfn component into its internal buffer.

func (*Dfn) Render

func (d *Dfn) Render() []byte

Render returns freshly prepared Dfn HTML bytes.

func (*Dfn) String

func (d *Dfn) String() string

String returns freshly prepared Dfn HTML as a string.

func (*Dfn) Style

func (d *Dfn) Style(m StyleMap) *Dfn

Style replaces the inline CSS declarations on the Dfn component.

func (*Dfn) Text

func (d *Dfn) Text(s string) *Dfn

Text sets or appends text content on the Dfn component.

func (*Dfn) Title

func (d *Dfn) Title(s string) *Dfn

Title sets the title value on the Dfn component.

type Dialog

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

Dialog represents the HTML dialog element for creating modal dialogs

func NewDialog

func NewDialog() *Dialog

NewDialog creates a new Dialog element

func (*Dialog) Add

func (d *Dialog) Add(e Element) *Dialog

Add adds content to the dialog element

func (*Dialog) AddStyle

func (d *Dialog) AddStyle(k, v string) *Dialog

AddStyle adds a single CSS property

func (*Dialog) AddStyles

func (d *Dialog) AddStyles(m StyleMap) *Dialog

AddStyles adds multiple CSS properties

func (*Dialog) Bytes

func (d *Dialog) Bytes() []byte

Bytes returns the buffer contents

func (*Dialog) HTML

func (d *Dialog) HTML() string

HTML returns freshly prepared Dialog HTML as a string.

func (*Dialog) IsBodyElement

func (d *Dialog) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Dialog) Open

func (d *Dialog) Open(open bool) *Dialog

Open sets the open attribute

func (*Dialog) Prepare

func (d *Dialog) Prepare()

Prepare builds the HTML for the dialog element

func (*Dialog) Render

func (d *Dialog) Render() []byte

Render returns freshly prepared Dialog HTML bytes.

func (*Dialog) String

func (d *Dialog) String() string

String returns freshly prepared Dialog HTML as a string.

func (*Dialog) Style

func (d *Dialog) Style(m StyleMap) *Dialog

Style replaces all styles

type Div

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

Div represents the Div component or supporting type.

func NewDiv

func NewDiv() *Div

NewDiv creates a new Div component.

func (*Div) Add

func (d *Div) Add(e Element) *Div

Add appends child content to the Div component.

func (*Div) AddStyles

func (d *Div) AddStyles(m StyleMap) *Div

AddStyles adds multiple inline CSS declarations to the Div component.

func (*Div) Bytes

func (d *Div) Bytes() []byte

Bytes returns a defensive copy of the rendered Div bytes.

func (*Div) HTML

func (d *Div) HTML() string

HTML returns freshly prepared Div HTML as a string.

func (*Div) IsBodyElement

func (d *Div) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Div) Prepare

func (d *Div) Prepare()

Prepare renders the Div component into its internal buffer.

func (*Div) Render

func (d *Div) Render() []byte

Render returns freshly prepared Div HTML bytes.

func (*Div) String

func (d *Div) String() string

String returns freshly prepared Div HTML as a string.

type Dl

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

Dl represents the Dl component or supporting type.

func NewDl

func NewDl() *Dl

NewDl creates a new Dl component.

func (*Dl) Add

func (d *Dl) Add(e Element) *Dl

Add appends child content to the Dl component.

func (*Dl) AddStyle

func (d *Dl) AddStyle(k, v string) *Dl

AddStyle adds one inline CSS declaration to the Dl component.

func (*Dl) AddStyles

func (d *Dl) AddStyles(m StyleMap) *Dl

AddStyles adds multiple inline CSS declarations to the Dl component.

func (*Dl) Bytes

func (d *Dl) Bytes() []byte

Bytes returns a defensive copy of the rendered Dl bytes.

func (*Dl) HTML

func (d *Dl) HTML() string

HTML returns freshly prepared Dl HTML as a string.

func (*Dl) IsBodyElement

func (d *Dl) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Dl) Prepare

func (d *Dl) Prepare()

Prepare renders the Dl component into its internal buffer.

func (*Dl) Render

func (d *Dl) Render() []byte

Render returns freshly prepared Dl HTML bytes.

func (*Dl) String

func (d *Dl) String() string

String returns freshly prepared Dl HTML as a string.

func (*Dl) Style

func (d *Dl) Style(m StyleMap) *Dl

Style replaces the inline CSS declarations on the Dl component.

type Dt

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

Dt represents the Dt component or supporting type.

func NewDt

func NewDt() *Dt

NewDt creates a new Dt component.

func (*Dt) Add

func (d *Dt) Add(e Element) *Dt

Add appends child content to the Dt component.

func (*Dt) AddStyle

func (d *Dt) AddStyle(k, v string) *Dt

AddStyle adds one inline CSS declaration to the Dt component.

func (*Dt) AddStyles

func (d *Dt) AddStyles(m StyleMap) *Dt

AddStyles adds multiple inline CSS declarations to the Dt component.

func (*Dt) Bytes

func (d *Dt) Bytes() []byte

Bytes returns a defensive copy of the rendered Dt bytes.

func (*Dt) HTML

func (d *Dt) HTML() string

HTML returns freshly prepared Dt HTML as a string.

func (*Dt) IsBodyElement

func (d *Dt) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Dt) Prepare

func (d *Dt) Prepare()

Prepare renders the Dt component into its internal buffer.

func (*Dt) Render

func (d *Dt) Render() []byte

Render returns freshly prepared Dt HTML bytes.

func (*Dt) String

func (d *Dt) String() string

String returns freshly prepared Dt HTML as a string.

func (*Dt) Style

func (d *Dt) Style(m StyleMap) *Dt

Style replaces the inline CSS declarations on the Dt component.

type Element

type Element interface {
	Render() []byte
	HTML() string
}

Element is renderable HTML content that can be appended to other elements.

Render and HTML prepare the element internally before returning output, so callers do not need to call Prepare before reading rendered bytes.

type Em

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

Em represents the em component or supporting type.

func NewEm

func NewEm() *Em

NewEm creates a new em component.

func (*Em) AddStyle

func (e *Em) AddStyle(k, v string) *Em

AddStyle adds one inline CSS declaration to the Em component.

func (*Em) AddStyles

func (e *Em) AddStyles(m StyleMap) *Em

AddStyles adds multiple inline CSS declarations to the Em component.

func (*Em) Bytes

func (e *Em) Bytes() []byte

Bytes returns a defensive copy of the rendered Em bytes.

func (*Em) HTML

func (e *Em) HTML() string

HTML returns freshly prepared Em HTML as a string.

func (*Em) IsBodyElement

func (e *Em) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Em) Prepare

func (e *Em) Prepare()

Prepare renders the Em component into its internal buffer.

func (*Em) Render

func (e *Em) Render() []byte

Render returns freshly prepared Em HTML bytes.

func (*Em) String

func (e *Em) String() string

String returns freshly prepared Em HTML as a string.

func (*Em) Style

func (e *Em) Style(m StyleMap) *Em

Style replaces the inline CSS declarations on the Em component.

func (*Em) Text

func (e *Em) Text(s string) *Em

Text sets or appends text content on the Em component.

type Embed

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

Embed represents the Embed component or supporting type.

func NewEmbed

func NewEmbed() *Embed

NewEmbed creates a new Embed component.

func (*Embed) AddStyle

func (e *Embed) AddStyle(k, v string) *Embed

AddStyle adds one inline CSS declaration to the Embed component.

func (*Embed) AddStyles

func (e *Embed) AddStyles(m StyleMap) *Embed

AddStyles adds multiple inline CSS declarations to the Embed component.

func (*Embed) Bytes

func (e *Embed) Bytes() []byte

Bytes returns a defensive copy of the rendered Embed bytes.

func (*Embed) HTML

func (e *Embed) HTML() string

HTML returns freshly prepared Embed HTML as a string.

func (*Embed) Height

func (e *Embed) Height(height string) *Embed

Height sets the height value on the Embed component.

func (*Embed) IsBodyElement

func (e *Embed) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Embed) Prepare

func (e *Embed) Prepare()

Prepare renders the Embed component into its internal buffer.

func (*Embed) Render

func (e *Embed) Render() []byte

Render returns freshly prepared Embed HTML bytes.

func (*Embed) Src

func (e *Embed) Src(src string) *Embed

Src sets the src value on the Embed component.

func (*Embed) String

func (e *Embed) String() string

String returns freshly prepared Embed HTML as a string.

func (*Embed) Style

func (e *Embed) Style(m StyleMap) *Embed

Style replaces the inline CSS declarations on the Embed component.

func (*Embed) Type

func (e *Embed) Type(embedType string) *Embed

Type sets the type value on the Embed component.

func (*Embed) Width

func (e *Embed) Width(width string) *Embed

Width sets the width value on the Embed component.

type Fieldset

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

Fieldset represents the HTML fieldset element for grouping form controls

func NewFieldset

func NewFieldset() *Fieldset

NewFieldset creates a new Fieldset element

func (*Fieldset) Add

func (f *Fieldset) Add(e Element) *Fieldset

Add adds content to the fieldset element

func (*Fieldset) AddStyle

func (f *Fieldset) AddStyle(k, v string) *Fieldset

AddStyle adds a single CSS property

func (*Fieldset) AddStyles

func (f *Fieldset) AddStyles(m StyleMap) *Fieldset

AddStyles adds multiple CSS properties

func (*Fieldset) Bytes

func (f *Fieldset) Bytes() []byte

Bytes returns the buffer contents

func (*Fieldset) Disabled

func (f *Fieldset) Disabled(disabled bool) *Fieldset

Disabled sets the disabled attribute

func (*Fieldset) Form

func (f *Fieldset) Form(form string) *Fieldset

Form sets the form attribute

func (*Fieldset) HTML

func (f *Fieldset) HTML() string

HTML returns freshly prepared Fieldset HTML as a string.

func (*Fieldset) IsBodyElement

func (f *Fieldset) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Fieldset) Name

func (f *Fieldset) Name(name string) *Fieldset

Name sets the name attribute

func (*Fieldset) Prepare

func (f *Fieldset) Prepare()

Prepare builds the HTML for the fieldset element

func (*Fieldset) Render

func (f *Fieldset) Render() []byte

Render returns freshly prepared Fieldset HTML bytes.

func (*Fieldset) String

func (f *Fieldset) String() string

String returns freshly prepared Fieldset HTML as a string.

func (*Fieldset) Style

func (f *Fieldset) Style(m StyleMap) *Fieldset

Style replaces all styles

type Figcaption

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

Figcaption represents the Figcaption component or supporting type.

func NewFigcaption

func NewFigcaption() *Figcaption

NewFigcaption creates a new Figcaption component.

func (*Figcaption) Add

func (f *Figcaption) Add(e Element) *Figcaption

Add appends child content to the Figcaption component.

func (*Figcaption) AddStyle

func (f *Figcaption) AddStyle(k, v string) *Figcaption

AddStyle adds one inline CSS declaration to the Figcaption component.

func (*Figcaption) AddStyles

func (f *Figcaption) AddStyles(m StyleMap) *Figcaption

AddStyles adds multiple inline CSS declarations to the Figcaption component.

func (*Figcaption) Bytes

func (f *Figcaption) Bytes() []byte

Bytes returns a defensive copy of the rendered Figcaption bytes.

func (*Figcaption) HTML

func (f *Figcaption) HTML() string

HTML returns freshly prepared Figcaption HTML as a string.

func (*Figcaption) IsBodyElement

func (f *Figcaption) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Figcaption) Prepare

func (f *Figcaption) Prepare()

Prepare renders the Figcaption component into its internal buffer.

func (*Figcaption) Render

func (f *Figcaption) Render() []byte

Render returns freshly prepared Figcaption HTML bytes.

func (*Figcaption) String

func (f *Figcaption) String() string

String returns freshly prepared Figcaption HTML as a string.

func (*Figcaption) Style

func (f *Figcaption) Style(m StyleMap) *Figcaption

Style replaces the inline CSS declarations on the Figcaption component.

type Figure

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

Figure represents the Figure component or supporting type.

func NewFigure

func NewFigure() *Figure

NewFigure creates a new Figure component.

func (*Figure) Add

func (f *Figure) Add(e Element) *Figure

Add appends child content to the Figure component.

func (*Figure) AddStyle

func (f *Figure) AddStyle(k, v string) *Figure

AddStyle adds one inline CSS declaration to the Figure component.

func (*Figure) AddStyles

func (f *Figure) AddStyles(m StyleMap) *Figure

AddStyles adds multiple inline CSS declarations to the Figure component.

func (*Figure) Bytes

func (f *Figure) Bytes() []byte

Bytes returns a defensive copy of the rendered Figure bytes.

func (*Figure) HTML

func (f *Figure) HTML() string

HTML returns freshly prepared Figure HTML as a string.

func (*Figure) IsBodyElement

func (f *Figure) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Figure) Prepare

func (f *Figure) Prepare()

Prepare renders the Figure component into its internal buffer.

func (*Figure) Render

func (f *Figure) Render() []byte

Render returns freshly prepared Figure HTML bytes.

func (*Figure) String

func (f *Figure) String() string

String returns freshly prepared Figure HTML as a string.

func (*Figure) Style

func (f *Figure) Style(m StyleMap) *Figure

Style replaces the inline CSS declarations on the Figure component.

type FontFaceRule

type FontFaceRule struct {
	Props StyleMap
	// contains filtered or unexported fields
}

FontFaceRule represents a CSS @font-face declaration block.

func NewFontFaceRule

func NewFontFaceRule() *FontFaceRule

NewFontFaceRule creates a new @font-face rule.

func (*FontFaceRule) AddStyle

func (f *FontFaceRule) AddStyle(k, v string) *FontFaceRule

AddStyle adds one font descriptor to the rule.

func (*FontFaceRule) AddStyles

func (f *FontFaceRule) AddStyles(styles StyleMap) *FontFaceRule

AddStyles adds font descriptors to the rule.

func (*FontFaceRule) Bytes

func (f *FontFaceRule) Bytes() []byte

Bytes returns a defensive copy of the rendered FontFaceRule bytes.

func (*FontFaceRule) HTML

func (f *FontFaceRule) HTML() string

HTML returns freshly prepared FontFaceRule HTML as a string.

func (*FontFaceRule) IsCSSRule

func (f *FontFaceRule) IsCSSRule()

IsCSSRule marks FontFaceRule as CSS content for style elements.

func (*FontFaceRule) Prepare

func (f *FontFaceRule) Prepare()

Prepare renders the FontFaceRule component into its internal buffer.

func (*FontFaceRule) Render

func (f *FontFaceRule) Render() []byte

Render returns freshly prepared FontFaceRule HTML bytes.

func (*FontFaceRule) String

func (f *FontFaceRule) String() string

String returns freshly prepared FontFaceRule HTML as a string.

func (*FontFaceRule) Style

func (f *FontFaceRule) Style(styles StyleMap) *FontFaceRule

Style replaces font descriptors on the rule.

type FontFeatureValuesRule

type FontFeatureValuesRule struct {
	Family  string
	Content string
	// contains filtered or unexported fields
}

FontFeatureValuesRule represents a CSS @font-feature-values block.

func NewFontFeatureValuesRule

func NewFontFeatureValuesRule(family string) *FontFeatureValuesRule

NewFontFeatureValuesRule creates a new @font-feature-values rule.

func (*FontFeatureValuesRule) Bytes

func (f *FontFeatureValuesRule) Bytes() []byte

Bytes returns a defensive copy of the rendered FontFeatureValuesRule bytes.

func (*FontFeatureValuesRule) HTML

func (f *FontFeatureValuesRule) HTML() string

HTML returns freshly prepared FontFeatureValuesRule HTML as a string.

func (*FontFeatureValuesRule) IsCSSRule

func (f *FontFeatureValuesRule) IsCSSRule()

IsCSSRule marks FontFeatureValuesRule as CSS content for style elements.

func (*FontFeatureValuesRule) Prepare

func (f *FontFeatureValuesRule) Prepare()

Prepare renders the FontFeatureValuesRule component into its internal buffer.

func (*FontFeatureValuesRule) Render

func (f *FontFeatureValuesRule) Render() []byte

Render returns freshly prepared FontFeatureValuesRule HTML bytes.

func (*FontFeatureValuesRule) String

func (f *FontFeatureValuesRule) String() string

String returns freshly prepared FontFeatureValuesRule HTML as a string.

func (*FontFeatureValuesRule) Text

Text replaces the raw @font-feature-values block content.

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

Footer represents the Footer component or supporting type.

func NewFooter

func NewFooter() *Footer

NewFooter creates a new Footer component.

func (*Footer) Add

func (f *Footer) Add(e Element) *Footer

Add appends child content to the Footer component.

func (*Footer) AddStyle

func (f *Footer) AddStyle(k, v string) *Footer

AddStyle adds one inline CSS declaration to the Footer component.

func (*Footer) AddStyles

func (f *Footer) AddStyles(mp StyleMap) *Footer

AddStyles adds multiple inline CSS declarations to the Footer component.

func (*Footer) Bytes

func (f *Footer) Bytes() []byte

Bytes returns a defensive copy of the rendered Footer bytes.

func (*Footer) HTML

func (f *Footer) HTML() string

HTML returns freshly prepared Footer HTML as a string.

func (*Footer) IsBodyElement

func (f *Footer) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Footer) Prepare

func (f *Footer) Prepare()

Prepare renders the Footer component into its internal buffer.

func (*Footer) Render

func (f *Footer) Render() []byte

Render returns freshly prepared Footer HTML bytes.

func (*Footer) String

func (f *Footer) String() string

String returns freshly prepared Footer HTML as a string.

func (*Footer) Style

func (f *Footer) Style(mp StyleMap) *Footer

Style replaces the inline CSS declarations on the Footer component.

type Form

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

Form represents the HTML form element for user input

func NewForm

func NewForm() *Form

NewForm creates a new Form element

func (*Form) AcceptCharset

func (f *Form) AcceptCharset(acceptcharset string) *Form

AcceptCharset sets the accept-charset attribute

func (*Form) Action

func (f *Form) Action(action string) *Form

Action sets the action attribute

func (*Form) Add

func (f *Form) Add(e Element) *Form

Add adds content to the form element

func (*Form) AddStyle

func (f *Form) AddStyle(k, v string) *Form

AddStyle adds a single CSS property

func (*Form) AddStyles

func (f *Form) AddStyles(m StyleMap) *Form

AddStyles adds multiple CSS properties

func (*Form) Autocomplete

func (f *Form) Autocomplete(autocomplete string) *Form

Autocomplete sets the autocomplete attribute

func (*Form) Bytes

func (f *Form) Bytes() []byte

Bytes returns the buffer contents

func (*Form) Enctype

func (f *Form) Enctype(enctype string) *Form

Enctype sets the enctype attribute

func (*Form) HTML

func (f *Form) HTML() string

HTML returns freshly prepared Form HTML as a string.

func (*Form) IsBodyElement

func (f *Form) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Form) Method

func (f *Form) Method(method string) *Form

Method sets the method attribute

func (*Form) Name

func (f *Form) Name(name string) *Form

Name sets the name attribute

func (*Form) Novalidate

func (f *Form) Novalidate(novalidate bool) *Form

Novalidate sets the novalidate attribute

func (*Form) Prepare

func (f *Form) Prepare()

Prepare builds the HTML for the form element

func (*Form) Render

func (f *Form) Render() []byte

Render returns freshly prepared Form HTML bytes.

func (*Form) String

func (f *Form) String() string

String returns freshly prepared Form HTML as a string.

func (*Form) Style

func (f *Form) Style(m StyleMap) *Form

Style replaces all styles

func (*Form) Target

func (f *Form) Target(target string) *Form

Target sets the target attribute

type H1

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

H1 represents the H1 component or supporting type.

func NewH1

func NewH1() *H1

NewH1 creates a new H1 component.

func (*H1) AddStyle

func (h *H1) AddStyle(k, v string) *H1

AddStyle adds one inline CSS declaration to the H1 component.

func (*H1) Bytes

func (h *H1) Bytes() []byte

Bytes returns a defensive copy of the rendered H1 bytes.

func (*H1) HTML

func (h *H1) HTML() string

HTML returns freshly prepared H1 HTML as a string.

func (*H1) IsBodyElement

func (h *H1) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*H1) Prepare

func (h *H1) Prepare()

Prepare renders the H1 component into its internal buffer.

func (*H1) Render

func (h *H1) Render() []byte

Render returns freshly prepared H1 HTML bytes.

func (*H1) String

func (h *H1) String() string

String returns freshly prepared H1 HTML as a string.

func (*H1) Style

func (h *H1) Style(m StyleMap) *H1

Style replaces the inline CSS declarations on the H1 component.

func (*H1) Text

func (h *H1) Text(s string) *H1

Text sets or appends text content on the H1 component.

type H2

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

H2 represents the H2 component or supporting type.

func NewH2

func NewH2() *H2

NewH2 creates a new H2 component.

func (*H2) AddStyle

func (h *H2) AddStyle(k, v string) *H2

AddStyle adds one inline CSS declaration to the H2 component.

func (*H2) Bytes

func (h *H2) Bytes() []byte

Bytes returns a defensive copy of the rendered H2 bytes.

func (*H2) HTML

func (h *H2) HTML() string

HTML returns freshly prepared H2 HTML as a string.

func (*H2) IsBodyElement

func (h *H2) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*H2) Prepare

func (h *H2) Prepare()

Prepare renders the H2 component into its internal buffer.

func (*H2) Render

func (h *H2) Render() []byte

Render returns freshly prepared H2 HTML bytes.

func (*H2) String

func (h *H2) String() string

String returns freshly prepared H2 HTML as a string.

func (*H2) Style

func (h *H2) Style(m StyleMap) *H2

Style replaces the inline CSS declarations on the H2 component.

func (*H2) Text

func (h *H2) Text(s string) *H2

Text sets or appends text content on the H2 component.

type H3

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

H3 represents the H3 component or supporting type.

func NewH3

func NewH3() *H3

NewH3 creates a new H3 component.

func (*H3) AddStyle

func (h *H3) AddStyle(k, v string) *H3

AddStyle adds one inline CSS declaration to the H3 component.

func (*H3) Bytes

func (h *H3) Bytes() []byte

Bytes returns a defensive copy of the rendered H3 bytes.

func (*H3) HTML

func (h *H3) HTML() string

HTML returns freshly prepared H3 HTML as a string.

func (*H3) IsBodyElement

func (h *H3) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*H3) Prepare

func (h *H3) Prepare()

Prepare renders the H3 component into its internal buffer.

func (*H3) Render

func (h *H3) Render() []byte

Render returns freshly prepared H3 HTML bytes.

func (*H3) String

func (h *H3) String() string

String returns freshly prepared H3 HTML as a string.

func (*H3) Style

func (h *H3) Style(m StyleMap) *H3

Style replaces the inline CSS declarations on the H3 component.

func (*H3) Text

func (h *H3) Text(s string) *H3

Text sets or appends text content on the H3 component.

type H4

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

H4 represents the H4 component or supporting type.

func NewH4

func NewH4() *H4

NewH4 creates a new H4 component.

func (*H4) AddStyle

func (h *H4) AddStyle(k, v string) *H4

AddStyle adds one inline CSS declaration to the H4 component.

func (*H4) Bytes

func (h *H4) Bytes() []byte

Bytes returns a defensive copy of the rendered H4 bytes.

func (*H4) HTML

func (h *H4) HTML() string

HTML returns freshly prepared H4 HTML as a string.

func (*H4) IsBodyElement

func (h *H4) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*H4) Prepare

func (h *H4) Prepare()

Prepare renders the H4 component into its internal buffer.

func (*H4) Render

func (h *H4) Render() []byte

Render returns freshly prepared H4 HTML bytes.

func (*H4) String

func (h *H4) String() string

String returns freshly prepared H4 HTML as a string.

func (*H4) Style

func (h *H4) Style(m StyleMap) *H4

Style replaces the inline CSS declarations on the H4 component.

func (*H4) Text

func (h *H4) Text(s string) *H4

Text sets or appends text content on the H4 component.

type H5

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

H5 represents the H5 component or supporting type.

func NewH5

func NewH5() *H5

NewH5 creates a new H5 component.

func (*H5) AddStyle

func (h *H5) AddStyle(k, v string) *H5

AddStyle adds one inline CSS declaration to the H5 component.

func (*H5) Bytes

func (h *H5) Bytes() []byte

Bytes returns a defensive copy of the rendered H5 bytes.

func (*H5) HTML

func (h *H5) HTML() string

HTML returns freshly prepared H5 HTML as a string.

func (*H5) IsBodyElement

func (h *H5) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*H5) Prepare

func (h *H5) Prepare()

Prepare renders the H5 component into its internal buffer.

func (*H5) Render

func (h *H5) Render() []byte

Render returns freshly prepared H5 HTML bytes.

func (*H5) String

func (h *H5) String() string

String returns freshly prepared H5 HTML as a string.

func (*H5) Style

func (h *H5) Style(m StyleMap) *H5

Style replaces the inline CSS declarations on the H5 component.

func (*H5) Text

func (h *H5) Text(s string) *H5

Text sets or appends text content on the H5 component.

type H6

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

H6 represents the H6 component or supporting type.

func NewH6

func NewH6() *H6

NewH6 creates a new H6 component.

func (*H6) AddStyle

func (h *H6) AddStyle(k, v string) *H6

AddStyle adds one inline CSS declaration to the H6 component.

func (*H6) Bytes

func (h *H6) Bytes() []byte

Bytes returns a defensive copy of the rendered H6 bytes.

func (*H6) HTML

func (h *H6) HTML() string

HTML returns freshly prepared H6 HTML as a string.

func (*H6) IsBodyElement

func (h *H6) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*H6) Prepare

func (h *H6) Prepare()

Prepare renders the H6 component into its internal buffer.

func (*H6) Render

func (h *H6) Render() []byte

Render returns freshly prepared H6 HTML bytes.

func (*H6) String

func (h *H6) String() string

String returns freshly prepared H6 HTML as a string.

func (*H6) Style

func (h *H6) Style(m StyleMap) *H6

Style replaces the inline CSS declarations on the H6 component.

func (*H6) Text

func (h *H6) Text(s string) *H6

Text sets or appends text content on the H6 component.

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

Head represents the HTML head element for document metadata

func NewHead

func NewHead() *Head

NewHead creates a new Head element

func (*Head) Add

func (h *Head) Add(e Element) *Head

Add adds content to the head element

func (*Head) AddStyle

func (h *Head) AddStyle(k, v string) *Head

AddStyle adds a single CSS property

func (*Head) AddStyles

func (h *Head) AddStyles(m StyleMap) *Head

AddStyles adds multiple CSS properties

func (*Head) Bytes

func (h *Head) Bytes() []byte

Bytes returns the buffer contents

func (*Head) HTML

func (h *Head) HTML() string

HTML returns freshly prepared Head HTML as a string.

func (*Head) Prepare

func (h *Head) Prepare()

Prepare builds the HTML for the head element

func (*Head) Render

func (h *Head) Render() []byte

Render returns freshly prepared Head HTML bytes.

func (*Head) String

func (h *Head) String() string

String returns freshly prepared Head HTML as a string.

func (*Head) Style

func (h *Head) Style(m StyleMap) *Head

Style replaces all styles

type HeadElement

type HeadElement interface {
	Element
	IsHeadElement()
}

HeadElement is HTML content that can be appended to a document head.

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

Header represents the Header component or supporting type.

func NewHeader

func NewHeader() *Header

NewHeader creates a new Header component.

func (*Header) Add

func (h *Header) Add(e Element) *Header

Add appends child content to the Header component.

func (*Header) AddStyle

func (h *Header) AddStyle(k, v string) *Header

AddStyle adds one inline CSS declaration to the Header component.

func (*Header) AddStyles

func (h *Header) AddStyles(m StyleMap) *Header

AddStyles adds multiple inline CSS declarations to the Header component.

func (*Header) Bytes

func (h *Header) Bytes() []byte

Bytes returns a defensive copy of the rendered Header bytes.

func (*Header) HTML

func (h *Header) HTML() string

HTML returns freshly prepared Header HTML as a string.

func (*Header) IsBodyElement

func (h *Header) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Header) Prepare

func (h *Header) Prepare()

Prepare renders the Header component into its internal buffer.

func (*Header) Render

func (h *Header) Render() []byte

Render returns freshly prepared Header HTML bytes.

func (*Header) String

func (h *Header) String() string

String returns freshly prepared Header HTML as a string.

func (*Header) Style

func (h *Header) Style(m StyleMap) *Header

Style replaces the inline CSS declarations on the Header component.

type Hgroup

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

Hgroup represents the Hgroup component or supporting type.

func NewHgroup

func NewHgroup() *Hgroup

NewHgroup creates a new Hgroup component.

func (*Hgroup) Add

func (h *Hgroup) Add(e Element) *Hgroup

Add appends child content to the Hgroup component.

func (*Hgroup) AddStyle

func (h *Hgroup) AddStyle(k, v string) *Hgroup

AddStyle adds one inline CSS declaration to the Hgroup component.

func (*Hgroup) AddStyles

func (h *Hgroup) AddStyles(m StyleMap) *Hgroup

AddStyles adds multiple inline CSS declarations to the Hgroup component.

func (*Hgroup) Bytes

func (h *Hgroup) Bytes() []byte

Bytes returns a defensive copy of the rendered Hgroup bytes.

func (*Hgroup) HTML

func (h *Hgroup) HTML() string

HTML returns freshly prepared Hgroup HTML as a string.

func (*Hgroup) IsBodyElement

func (h *Hgroup) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Hgroup) Prepare

func (h *Hgroup) Prepare()

Prepare renders the Hgroup component into its internal buffer.

func (*Hgroup) Render

func (h *Hgroup) Render() []byte

Render returns freshly prepared Hgroup HTML bytes.

func (*Hgroup) String

func (h *Hgroup) String() string

String returns freshly prepared Hgroup HTML as a string.

func (*Hgroup) Style

func (h *Hgroup) Style(m StyleMap) *Hgroup

Style replaces the inline CSS declarations on the Hgroup component.

type Hr

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

Hr represents the Hr component or supporting type.

func NewHr

func NewHr() *Hr

NewHr creates a new Hr component.

func (*Hr) AddStyle

func (h *Hr) AddStyle(k, v string) *Hr

AddStyle adds one inline CSS declaration to the Hr component.

func (*Hr) AddStyles

func (h *Hr) AddStyles(m StyleMap) *Hr

AddStyles adds multiple inline CSS declarations to the Hr component.

func (*Hr) Bytes

func (h *Hr) Bytes() []byte

Bytes returns a defensive copy of the rendered Hr bytes.

func (*Hr) HTML

func (h *Hr) HTML() string

HTML returns freshly prepared Hr HTML as a string.

func (*Hr) IsBodyElement

func (h *Hr) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Hr) Prepare

func (h *Hr) Prepare()

Prepare renders the Hr component into its internal buffer.

func (*Hr) Render

func (h *Hr) Render() []byte

Render returns freshly prepared Hr HTML bytes.

func (*Hr) String

func (h *Hr) String() string

String returns freshly prepared Hr HTML as a string.

func (*Hr) Style

func (h *Hr) Style(m StyleMap) *Hr

Style replaces the inline CSS declarations on the Hr component.

type HtmlFile

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

HtmlFile represents the HTML element for the document root

func NewHtmlFile

func NewHtmlFile() *HtmlFile

NewHtmlFile creates a new HtmlFile element

func (*HtmlFile) Add

func (h *HtmlFile) Add(e Element) *HtmlFile

Add adds content to the html element

func (*HtmlFile) AddStyle

func (h *HtmlFile) AddStyle(k, v string) *HtmlFile

AddStyle adds a single CSS property

func (*HtmlFile) AddStyles

func (h *HtmlFile) AddStyles(m StyleMap) *HtmlFile

AddStyles adds multiple CSS properties

func (*HtmlFile) AddToBody

func (h *HtmlFile) AddToBody(e Element) *HtmlFile

AddToBody sets the addtobody value on the HtmlFile component.

func (*HtmlFile) AddToHead

func (h *HtmlFile) AddToHead(e Element) *HtmlFile

AddToHead sets the addtohead value on the HtmlFile component.

func (*HtmlFile) Bytes

func (h *HtmlFile) Bytes() []byte

Bytes returns the buffer contents

func (*HtmlFile) ContextMenu

func (h *HtmlFile) ContextMenu(contextMenu string) *HtmlFile

ContextMenu sets the contextmenu attribute

func (*HtmlFile) Dir

func (h *HtmlFile) Dir(dir string) *HtmlFile

Dir sets the dir attribute

func (*HtmlFile) Err

func (h *HtmlFile) Err() error

Err returns document structure or rendering errors recorded while building.

func (*HtmlFile) Lang

func (h *HtmlFile) Lang(lang string) *HtmlFile

Lang sets the lang attribute

func (*HtmlFile) Manifest

func (h *HtmlFile) Manifest(manifest string) *HtmlFile

Manifest sets the manifest attribute

func (*HtmlFile) Prepare

func (h *HtmlFile) Prepare()

Prepare builds the HTML for the html element

func (*HtmlFile) Render

func (h *HtmlFile) Render() ([]byte, error)

Render returns the compact HTML document bytes.

func (*HtmlFile) RenderFormatted

func (h *HtmlFile) RenderFormatted() ([]byte, error)

RenderFormatted returns human-readable formatted HTML document bytes.

func (*HtmlFile) RenderFormattedString

func (h *HtmlFile) RenderFormattedString() (string, error)

RenderFormattedString returns formatted HTML as a string.

func (*HtmlFile) RenderString

func (h *HtmlFile) RenderString() (string, error)

RenderString returns the compact HTML document as a string.

func (*HtmlFile) Style

func (h *HtmlFile) Style(m StyleMap) *HtmlFile

Style replaces all styles

func (*HtmlFile) WriteToFile

func (h *HtmlFile) WriteToFile(path string) error

WriteToFile writes the formatted HTML document to path.

func (*HtmlFile) XmlLang

func (h *HtmlFile) XmlLang(xmlLang string) *HtmlFile

XmlLang sets the xml:lang attribute

func (*HtmlFile) Xmlns

func (h *HtmlFile) Xmlns(xmlns string) *HtmlFile

Xmlns sets the xmlns attribute

type I

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

I represents the I component or supporting type.

func NewI

func NewI() *I

NewI creates a new I component.

func (*I) AddStyle

func (i *I) AddStyle(k, v string) *I

AddStyle adds one inline CSS declaration to the I component.

func (*I) AddStyles

func (i *I) AddStyles(m StyleMap) *I

AddStyles adds multiple inline CSS declarations to the I component.

func (*I) Bytes

func (i *I) Bytes() []byte

Bytes returns a defensive copy of the rendered I bytes.

func (*I) HTML

func (i *I) HTML() string

HTML returns freshly prepared I HTML as a string.

func (*I) IsBodyElement

func (i *I) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*I) Prepare

func (i *I) Prepare()

Prepare renders the I component into its internal buffer.

func (*I) Render

func (i *I) Render() []byte

Render returns freshly prepared I HTML bytes.

func (*I) String

func (i *I) String() string

String returns freshly prepared I HTML as a string.

func (*I) Style

func (i *I) Style(m StyleMap) *I

Style replaces the inline CSS declarations on the I component.

func (*I) Text

func (i *I) Text(s string) *I

Text sets or appends text content on the I component.

type Iframe

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

Iframe represents the Iframe component or supporting type.

func NewIframe

func NewIframe() *Iframe

NewIframe creates a new Iframe component.

func (*Iframe) AddStyle

func (i *Iframe) AddStyle(k, v string) *Iframe

AddStyle adds one inline CSS declaration to the Iframe component.

func (*Iframe) AddStyles

func (i *Iframe) AddStyles(m StyleMap) *Iframe

AddStyles adds multiple inline CSS declarations to the Iframe component.

func (*Iframe) Allow

func (i *Iframe) Allow(allow string) *Iframe

Allow sets the allow value on the Iframe component.

func (*Iframe) Allowfullscreen

func (i *Iframe) Allowfullscreen(allowfullscreen bool) *Iframe

Allowfullscreen sets the allowfullscreen value on the Iframe component.

func (*Iframe) Bytes

func (i *Iframe) Bytes() []byte

Bytes returns a defensive copy of the rendered Iframe bytes.

func (*Iframe) HTML

func (i *Iframe) HTML() string

HTML returns freshly prepared Iframe HTML as a string.

func (*Iframe) Height

func (i *Iframe) Height(height string) *Iframe

Height sets the height value on the Iframe component.

func (*Iframe) IsBodyElement

func (i *Iframe) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Iframe) Loading

func (i *Iframe) Loading(loading string) *Iframe

Loading sets the loading value on the Iframe component.

func (*Iframe) Name

func (i *Iframe) Name(name string) *Iframe

Name sets the name value on the Iframe component.

func (*Iframe) Prepare

func (i *Iframe) Prepare()

Prepare renders the Iframe component into its internal buffer.

func (*Iframe) Referrerpolicy

func (i *Iframe) Referrerpolicy(referrerpolicy string) *Iframe

Referrerpolicy sets the referrerpolicy value on the Iframe component.

func (*Iframe) Render

func (i *Iframe) Render() []byte

Render returns freshly prepared Iframe HTML bytes.

func (*Iframe) Sandbox

func (i *Iframe) Sandbox(sandbox string) *Iframe

Sandbox sets the sandbox value on the Iframe component.

func (*Iframe) Src

func (i *Iframe) Src(src string) *Iframe

Src sets the src value on the Iframe component.

func (*Iframe) Srcdoc

func (i *Iframe) Srcdoc(srcdoc string) *Iframe

Srcdoc sets the srcdoc value on the Iframe component.

func (*Iframe) String

func (i *Iframe) String() string

String returns freshly prepared Iframe HTML as a string.

func (*Iframe) Style

func (i *Iframe) Style(m StyleMap) *Iframe

Style replaces the inline CSS declarations on the Iframe component.

func (*Iframe) Width

func (i *Iframe) Width(width string) *Iframe

Width sets the width value on the Iframe component.

type Img

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

Img represents the Img component or supporting type.

func NewImg

func NewImg() *Img

NewImg creates a new Img component.

func (*Img) AddStyle

func (i *Img) AddStyle(k, v string) *Img

AddStyle adds one inline CSS declaration to the Img component.

func (*Img) AddStyles

func (i *Img) AddStyles(m StyleMap) *Img

AddStyles adds multiple inline CSS declarations to the Img component.

func (*Img) Alt

func (i *Img) Alt(alt string) *Img

Alt sets the alt value on the Img component.

func (*Img) Bytes

func (i *Img) Bytes() []byte

Bytes returns a defensive copy of the rendered Img bytes.

func (*Img) HTML

func (i *Img) HTML() string

HTML returns freshly prepared Img HTML as a string.

func (*Img) Height

func (i *Img) Height(height string) *Img

Height sets the height value on the Img component.

func (*Img) IsBodyElement

func (i *Img) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Img) Prepare

func (i *Img) Prepare()

Prepare renders the Img component into its internal buffer.

func (*Img) Render

func (i *Img) Render() []byte

Render returns freshly prepared Img HTML bytes.

func (*Img) Src

func (i *Img) Src(src string) *Img

Src sets the src value on the Img component.

func (*Img) String

func (i *Img) String() string

String returns freshly prepared Img HTML as a string.

func (*Img) Style

func (i *Img) Style(m StyleMap) *Img

Style replaces the inline CSS declarations on the Img component.

func (*Img) Title

func (i *Img) Title(title string) *Img

Title sets the title value on the Img component.

func (*Img) Width

func (i *Img) Width(width string) *Img

Width sets the width value on the Img component.

type ImportRule

type ImportRule struct {
	Href       string
	Conditions []string
	// contains filtered or unexported fields
}

ImportRule represents a CSS @import rule.

func NewImportRule

func NewImportRule(href string) *ImportRule

NewImportRule creates a new @import rule.

func (*ImportRule) Bytes

func (i *ImportRule) Bytes() []byte

Bytes returns a defensive copy of the rendered ImportRule bytes.

func (*ImportRule) Condition

func (i *ImportRule) Condition(condition string) *ImportRule

Condition appends an import condition such as media, layer, or supports.

func (*ImportRule) ConditionsList

func (i *ImportRule) ConditionsList(conditions []string) *ImportRule

ConditionsList replaces import conditions.

func (*ImportRule) HTML

func (i *ImportRule) HTML() string

HTML returns freshly prepared ImportRule HTML as a string.

func (*ImportRule) IsCSSRule

func (i *ImportRule) IsCSSRule()

IsCSSRule marks ImportRule as CSS content for style elements.

func (*ImportRule) Prepare

func (i *ImportRule) Prepare()

Prepare renders the ImportRule component into its internal buffer.

func (*ImportRule) Render

func (i *ImportRule) Render() []byte

Render returns freshly prepared ImportRule HTML bytes.

func (*ImportRule) String

func (i *ImportRule) String() string

String returns freshly prepared ImportRule HTML as a string.

type Input

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

Input represents the HTML input element for user input

func NewInput

func NewInput() *Input

NewInput creates a new Input element

func (*Input) Accept

func (i *Input) Accept(accept string) *Input

Accept sets the accept attribute

func (*Input) AddStyle

func (i *Input) AddStyle(k, v string) *Input

AddStyle adds a single CSS property

func (*Input) AddStyles

func (i *Input) AddStyles(m StyleMap) *Input

AddStyles adds multiple CSS properties

func (*Input) Autocomplete

func (i *Input) Autocomplete(autocomplete string) *Input

Autocomplete sets the autocomplete attribute

func (*Input) Autofocus

func (i *Input) Autofocus(autofocus bool) *Input

Autofocus sets the autofocus attribute

func (*Input) Bytes

func (i *Input) Bytes() []byte

Bytes returns the buffer contents

func (*Input) Checked

func (i *Input) Checked(checked bool) *Input

Checked sets the checked attribute

func (*Input) Disabled

func (i *Input) Disabled(disabled bool) *Input

Disabled sets the disabled attribute

func (*Input) Form

func (i *Input) Form(form string) *Input

Form sets the form attribute

func (*Input) HTML

func (i *Input) HTML() string

HTML returns freshly prepared Input HTML as a string.

func (*Input) Id

func (i *Input) Id(id string) *Input

Id sets the id attribute

func (*Input) IsBodyElement

func (i *Input) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Input) Max

func (i *Input) Max(max string) *Input

Max sets the max attribute

func (*Input) Maxlength

func (i *Input) Maxlength(maxlength string) *Input

Maxlength sets the maxlength attribute

func (*Input) Min

func (i *Input) Min(min string) *Input

Min sets the min attribute

func (*Input) Minlength

func (i *Input) Minlength(minlength string) *Input

Minlength sets the minlength attribute

func (*Input) Multiple

func (i *Input) Multiple(multiple bool) *Input

Multiple sets the multiple attribute

func (*Input) Name

func (i *Input) Name(name string) *Input

Name sets the name attribute

func (*Input) Pattern

func (i *Input) Pattern(pattern string) *Input

Pattern sets the pattern attribute

func (*Input) Placeholder

func (i *Input) Placeholder(placeholder string) *Input

Placeholder sets the placeholder attribute

func (*Input) Prepare

func (i *Input) Prepare()

Prepare builds the HTML for the input element

func (*Input) Readonly

func (i *Input) Readonly(readonly bool) *Input

Readonly sets the readonly attribute

func (*Input) Render

func (i *Input) Render() []byte

Render returns freshly prepared Input HTML bytes.

func (*Input) Required

func (i *Input) Required(required bool) *Input

Required sets the required attribute

func (*Input) Size

func (i *Input) Size(size string) *Input

Size sets the size attribute

func (*Input) Step

func (i *Input) Step(step string) *Input

Step sets the step attribute

func (*Input) String

func (i *Input) String() string

String returns freshly prepared Input HTML as a string.

func (*Input) Style

func (i *Input) Style(m StyleMap) *Input

Style replaces all styles

func (*Input) Type

func (i *Input) Type(inputtype string) *Input

Type sets the type attribute

func (*Input) Value

func (i *Input) Value(value string) *Input

Value sets the value attribute

type Ins

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

Ins represents the HTML ins element for marking inserted text

func NewIns

func NewIns() *Ins

NewIns creates a new Ins element

func (*Ins) Add

func (i *Ins) Add(e Element) *Ins

Add adds content to the ins element

func (*Ins) AddStyle

func (i *Ins) AddStyle(k, v string) *Ins

AddStyle adds a single CSS property

func (*Ins) AddStyles

func (i *Ins) AddStyles(m StyleMap) *Ins

AddStyles adds multiple CSS properties

func (*Ins) Bytes

func (i *Ins) Bytes() []byte

Bytes returns the buffer contents

func (*Ins) Cite

func (i *Ins) Cite(url string) *Ins

Cite sets the cite attribute

func (*Ins) Datetime

func (i *Ins) Datetime(datetime string) *Ins

Datetime sets the datetime attribute

func (*Ins) HTML

func (i *Ins) HTML() string

HTML returns freshly prepared Ins HTML as a string.

func (*Ins) IsBodyElement

func (i *Ins) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Ins) Prepare

func (i *Ins) Prepare()

Prepare builds the HTML for the ins element

func (*Ins) Render

func (i *Ins) Render() []byte

Render returns freshly prepared Ins HTML bytes.

func (*Ins) String

func (i *Ins) String() string

String returns freshly prepared Ins HTML as a string.

func (*Ins) Style

func (i *Ins) Style(m StyleMap) *Ins

Style replaces all styles

type Kbd

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

Kbd represents the Kbd component or supporting type.

func NewKbd

func NewKbd() *Kbd

NewKbd creates a new Kbd component.

func (*Kbd) AddStyle

func (k *Kbd) AddStyle(key, v string) *Kbd

AddStyle adds one inline CSS declaration to the Kbd component.

func (*Kbd) AddStyles

func (k *Kbd) AddStyles(m StyleMap) *Kbd

AddStyles adds multiple inline CSS declarations to the Kbd component.

func (*Kbd) Bytes

func (k *Kbd) Bytes() []byte

Bytes returns a defensive copy of the rendered Kbd bytes.

func (*Kbd) HTML

func (k *Kbd) HTML() string

HTML returns freshly prepared Kbd HTML as a string.

func (*Kbd) IsBodyElement

func (k *Kbd) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Kbd) Prepare

func (k *Kbd) Prepare()

Prepare renders the Kbd component into its internal buffer.

func (*Kbd) Render

func (k *Kbd) Render() []byte

Render returns freshly prepared Kbd HTML bytes.

func (*Kbd) String

func (k *Kbd) String() string

String returns freshly prepared Kbd HTML as a string.

func (*Kbd) Style

func (k *Kbd) Style(m StyleMap) *Kbd

Style replaces the inline CSS declarations on the Kbd component.

func (*Kbd) Text

func (k *Kbd) Text(s string) *Kbd

Text sets or appends text content on the Kbd component.

type KeyframeBlock

type KeyframeBlock struct {
	Selector string
	Props    StyleMap
	// contains filtered or unexported fields
}

KeyframeBlock represents one keyframe selector block inside @keyframes.

func NewKeyframeBlock

func NewKeyframeBlock(selector string) *KeyframeBlock

NewKeyframeBlock creates a new keyframe selector block.

func (*KeyframeBlock) AddStyle

func (k *KeyframeBlock) AddStyle(prop, value string) *KeyframeBlock

AddStyle adds one CSS declaration to the keyframe block.

func (*KeyframeBlock) AddStyles

func (k *KeyframeBlock) AddStyles(styles StyleMap) *KeyframeBlock

AddStyles adds CSS declarations to the keyframe block.

func (*KeyframeBlock) Bytes

func (k *KeyframeBlock) Bytes() []byte

Bytes returns a defensive copy of the rendered KeyframeBlock bytes.

func (*KeyframeBlock) HTML

func (k *KeyframeBlock) HTML() string

HTML returns freshly prepared KeyframeBlock HTML as a string.

func (*KeyframeBlock) Prepare

func (k *KeyframeBlock) Prepare()

Prepare renders the KeyframeBlock component into its internal buffer.

func (*KeyframeBlock) Render

func (k *KeyframeBlock) Render() []byte

Render returns freshly prepared KeyframeBlock HTML bytes.

func (*KeyframeBlock) String

func (k *KeyframeBlock) String() string

String returns freshly prepared KeyframeBlock HTML as a string.

func (*KeyframeBlock) Style

func (k *KeyframeBlock) Style(styles StyleMap) *KeyframeBlock

Style replaces CSS declarations on the keyframe block.

type KeyframesRule

type KeyframesRule struct {
	Name   string
	Frames []*KeyframeBlock
	// contains filtered or unexported fields
}

KeyframesRule represents a CSS @keyframes rule.

func NewKeyframesRule

func NewKeyframesRule(name string) *KeyframesRule

NewKeyframesRule creates a new @keyframes rule.

func (*KeyframesRule) AddBlock

func (k *KeyframesRule) AddBlock(frame *KeyframeBlock) *KeyframesRule

AddBlock appends one keyframe block.

func (*KeyframesRule) AddFrame

func (k *KeyframesRule) AddFrame(selector string, props StyleMap) *KeyframesRule

AddFrame appends one keyframe selector block.

func (*KeyframesRule) Bytes

func (k *KeyframesRule) Bytes() []byte

Bytes returns a defensive copy of the rendered KeyframesRule bytes.

func (*KeyframesRule) HTML

func (k *KeyframesRule) HTML() string

HTML returns freshly prepared KeyframesRule HTML as a string.

func (*KeyframesRule) IsCSSRule

func (k *KeyframesRule) IsCSSRule()

IsCSSRule marks KeyframesRule as CSS content for style elements.

func (*KeyframesRule) Prepare

func (k *KeyframesRule) Prepare()

Prepare renders the KeyframesRule component into its internal buffer.

func (*KeyframesRule) Render

func (k *KeyframesRule) Render() []byte

Render returns freshly prepared KeyframesRule HTML bytes.

func (*KeyframesRule) String

func (k *KeyframesRule) String() string

String returns freshly prepared KeyframesRule HTML as a string.

type Label

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

Label represents the HTML label element for form controls

func NewLabel

func NewLabel() *Label

NewLabel creates a new Label element

func (*Label) Add

func (l *Label) Add(e Element) *Label

Add adds content to the label element

func (*Label) AddStyle

func (l *Label) AddStyle(k, v string) *Label

AddStyle adds a single CSS property

func (*Label) AddStyles

func (l *Label) AddStyles(m StyleMap) *Label

AddStyles adds multiple CSS properties

func (*Label) Bytes

func (l *Label) Bytes() []byte

Bytes returns the buffer contents

func (*Label) For

func (l *Label) For(forattr string) *Label

For sets the for attribute

func (*Label) Form

func (l *Label) Form(form string) *Label

Form sets the form attribute

func (*Label) HTML

func (l *Label) HTML() string

HTML returns freshly prepared Label HTML as a string.

func (*Label) IsBodyElement

func (l *Label) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Label) Prepare

func (l *Label) Prepare()

Prepare builds the HTML for the label element

func (*Label) Render

func (l *Label) Render() []byte

Render returns freshly prepared Label HTML bytes.

func (*Label) String

func (l *Label) String() string

String returns freshly prepared Label HTML as a string.

func (*Label) Style

func (l *Label) Style(m StyleMap) *Label

Style replaces all styles

func (*Label) Text

func (l *Label) Text(text string) *Label

Text adds text content to the label element

type Legend

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

Legend represents the HTML legend element for fieldset captions

func NewLegend

func NewLegend() *Legend

NewLegend creates a new Legend element

func (*Legend) Add

func (l *Legend) Add(e Element) *Legend

Add adds content to the legend element

func (*Legend) AddStyle

func (l *Legend) AddStyle(k, v string) *Legend

AddStyle adds a single CSS property

func (*Legend) AddStyles

func (l *Legend) AddStyles(m StyleMap) *Legend

AddStyles adds multiple CSS properties

func (*Legend) Bytes

func (l *Legend) Bytes() []byte

Bytes returns the buffer contents

func (*Legend) HTML

func (l *Legend) HTML() string

HTML returns freshly prepared Legend HTML as a string.

func (*Legend) IsBodyElement

func (l *Legend) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Legend) Prepare

func (l *Legend) Prepare()

Prepare builds the HTML for the legend element

func (*Legend) Render

func (l *Legend) Render() []byte

Render returns freshly prepared Legend HTML bytes.

func (*Legend) String

func (l *Legend) String() string

String returns freshly prepared Legend HTML as a string.

func (*Legend) Style

func (l *Legend) Style(m StyleMap) *Legend

Style replaces all styles

func (*Legend) Text

func (l *Legend) Text(text string) *Legend

Text adds text content to the legend element

type Li

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

Li represents the Li component or supporting type.

func NewLi

func NewLi() *Li

NewLi creates a new Li component.

func (*Li) Add

func (l *Li) Add(e Element) *Li

Add appends child content to the Li component.

func (*Li) AddStyle

func (l *Li) AddStyle(k, v string) *Li

AddStyle adds one inline CSS declaration to the Li component.

func (*Li) AddStyles

func (l *Li) AddStyles(m StyleMap) *Li

AddStyles adds multiple inline CSS declarations to the Li component.

func (*Li) Bytes

func (l *Li) Bytes() []byte

Bytes returns a defensive copy of the rendered Li bytes.

func (*Li) HTML

func (l *Li) HTML() string

HTML returns freshly prepared Li HTML as a string.

func (*Li) IsBodyElement

func (l *Li) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Li) Prepare

func (l *Li) Prepare()

Prepare renders the Li component into its internal buffer.

func (*Li) Render

func (l *Li) Render() []byte

Render returns freshly prepared Li HTML bytes.

func (*Li) String

func (l *Li) String() string

String returns freshly prepared Li HTML as a string.

func (*Li) Style

func (l *Li) Style(m StyleMap) *Li

Style replaces the inline CSS declarations on the Li component.

func (*Li) Value

func (l *Li) Value(v int) *Li

Value sets the value value on the Li component.

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

Link represents the HTML link element for external resources

func NewLink() *Link

NewLink creates a new Link element

func (*Link) AddStyle

func (l *Link) AddStyle(k, v string) *Link

AddStyle adds a single CSS property

func (*Link) AddStyles

func (l *Link) AddStyles(m StyleMap) *Link

AddStyles adds multiple CSS properties

func (*Link) Bytes

func (l *Link) Bytes() []byte

Bytes returns the buffer contents

func (*Link) CrossOrigin

func (l *Link) CrossOrigin(crossOrigin string) *Link

CrossOrigin Cross Origin sets the crossOrigin attribute

func (*Link) HTML

func (l *Link) HTML() string

HTML returns freshly prepared Link HTML as a string.

func (*Link) Href

func (l *Link) Href(href string) *Link

Href sets the href attribute

func (*Link) Hreflang

func (l *Link) Hreflang(hreflang string) *Link

Hreflang sets the hreflang attribute

func (*Link) Integrity

func (l *Link) Integrity(integrity string) *Link

Integrity sets the integrity attribute

func (*Link) IsHeadElement

func (l *Link) IsHeadElement()

IsHeadElement implements HeadElement interface

func (*Link) Media

func (l *Link) Media(media string) *Link

Media sets the media attribute

func (*Link) Prepare

func (l *Link) Prepare()

Prepare builds the HTML for the link element

func (*Link) ReferrerPolicy

func (l *Link) ReferrerPolicy(referrerPolicy string) *Link

ReferrerPolicy Referrer Policy sets the referrerPolicy attribute

func (*Link) Rel

func (l *Link) Rel(rel string) *Link

Rel sets the rel attribute

func (*Link) Render

func (l *Link) Render() []byte

Render returns freshly prepared Link HTML bytes.

func (*Link) Sizes

func (l *Link) Sizes(sizes string) *Link

Sizes sets the sizes attribute

func (*Link) String

func (l *Link) String() string

String returns freshly prepared Link HTML as a string.

func (*Link) Style

func (l *Link) Style(m StyleMap) *Link

Style replaces all styles

func (*Link) Type

func (l *Link) Type(linkType string) *Link

Type sets the type attribute

type Main

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

Main represents the Main component or supporting type.

func NewMain

func NewMain() *Main

NewMain creates a new Main component.

func (*Main) Add

func (m *Main) Add(e Element) *Main

Add appends child content to the Main component.

func (*Main) AddStyle

func (m *Main) AddStyle(k, v string) *Main

AddStyle adds one inline CSS declaration to the Main component.

func (*Main) AddStyles

func (m *Main) AddStyles(mp StyleMap) *Main

AddStyles adds multiple inline CSS declarations to the Main component.

func (*Main) Bytes

func (m *Main) Bytes() []byte

Bytes returns a defensive copy of the rendered Main bytes.

func (*Main) HTML

func (m *Main) HTML() string

HTML returns freshly prepared Main HTML as a string.

func (*Main) IsBodyElement

func (m *Main) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Main) Prepare

func (m *Main) Prepare()

Prepare renders the Main component into its internal buffer.

func (*Main) Render

func (m *Main) Render() []byte

Render returns freshly prepared Main HTML bytes.

func (*Main) String

func (m *Main) String() string

String returns freshly prepared Main HTML as a string.

func (*Main) Style

func (m *Main) Style(mp StyleMap) *Main

Style replaces the inline CSS declarations on the Main component.

type Map

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

Map represents the Map component or supporting type.

func NewMap

func NewMap() *Map

NewMap creates a new Map component.

func (*Map) Add

func (m *Map) Add(e Element) *Map

Add appends child content to the Map component.

func (*Map) AddStyle

func (m *Map) AddStyle(k, v string) *Map

AddStyle adds one inline CSS declaration to the Map component.

func (*Map) AddStyles

func (m *Map) AddStyles(ms StyleMap) *Map

AddStyles adds multiple inline CSS declarations to the Map component.

func (*Map) Bytes

func (m *Map) Bytes() []byte

Bytes returns a defensive copy of the rendered Map bytes.

func (*Map) HTML

func (m *Map) HTML() string

HTML returns freshly prepared Map HTML as a string.

func (*Map) IsBodyElement

func (m *Map) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Map) Name

func (m *Map) Name(name string) *Map

Name sets the name value on the Map component.

func (*Map) Prepare

func (m *Map) Prepare()

Prepare renders the Map component into its internal buffer.

func (*Map) Render

func (m *Map) Render() []byte

Render returns freshly prepared Map HTML bytes.

func (*Map) String

func (m *Map) String() string

String returns freshly prepared Map HTML as a string.

func (*Map) Style

func (m *Map) Style(ms StyleMap) *Map

Style replaces the inline CSS declarations on the Map component.

type Mark

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

Mark represents the Mark component or supporting type.

func NewMark

func NewMark() *Mark

NewMark creates a new Mark component.

func (*Mark) AddStyle

func (m *Mark) AddStyle(k, v string) *Mark

AddStyle adds one inline CSS declaration to the Mark component.

func (*Mark) AddStyles

func (m *Mark) AddStyles(ms StyleMap) *Mark

AddStyles adds multiple inline CSS declarations to the Mark component.

func (*Mark) Bytes

func (m *Mark) Bytes() []byte

Bytes returns a defensive copy of the rendered Mark bytes.

func (*Mark) HTML

func (m *Mark) HTML() string

HTML returns freshly prepared Mark HTML as a string.

func (*Mark) IsBodyElement

func (m *Mark) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Mark) Prepare

func (m *Mark) Prepare()

Prepare renders the Mark component into its internal buffer.

func (*Mark) Render

func (m *Mark) Render() []byte

Render returns freshly prepared Mark HTML bytes.

func (*Mark) String

func (m *Mark) String() string

String returns freshly prepared Mark HTML as a string.

func (*Mark) Style

func (m *Mark) Style(ms StyleMap) *Mark

Style replaces the inline CSS declarations on the Mark component.

func (*Mark) Text

func (m *Mark) Text(s string) *Mark

Text sets or appends text content on the Mark component.

type Math

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

Math represents a MathML math element.

func NewMath

func NewMath() *Math

NewMath creates a MathML math element with the default MathML namespace.

func (*Math) Add

func (m *Math) Add(e Element) *Math

Add appends child MathML content.

func (*Math) AddStyle

func (m *Math) AddStyle(k, v string) *Math

AddStyle adds one inline CSS declaration to the math element.

func (*Math) AddStyles

func (m *Math) AddStyles(ms StyleMap) *Math

AddStyles adds multiple inline CSS declarations to the math element.

func (*Math) Bytes

func (m *Math) Bytes() []byte

Bytes returns a defensive copy of the rendered math bytes.

func (*Math) Display

func (m *Math) Display(display string) *Math

Display sets the MathML display attribute.

func (*Math) HTML

func (m *Math) HTML() string

HTML returns freshly prepared Math HTML as a string.

func (*Math) IsBodyElement

func (m *Math) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Math) Prepare

func (m *Math) Prepare()

Prepare renders the math element into its internal buffer.

func (*Math) Render

func (m *Math) Render() []byte

Render returns freshly prepared Math HTML bytes.

func (*Math) String

func (m *Math) String() string

String returns freshly prepared Math HTML as a string.

func (*Math) Style

func (m *Math) Style(ms StyleMap) *Math

Style replaces the inline CSS declarations on the math element.

func (*Math) Xmlns

func (m *Math) Xmlns(xmlns string) *Math

Xmlns replaces the MathML namespace attribute.

type MediaRule

type MediaRule struct {
	Query string
	Rules []CSSRule
	// contains filtered or unexported fields
}

MediaRule represents a CSS @media grouping rule.

func NewMediaRule

func NewMediaRule(query string) *MediaRule

NewMediaRule creates a new @media rule.

func (*MediaRule) Add

func (m *MediaRule) Add(e Element) *MediaRule

Add appends CSS content inside the media block.

func (*MediaRule) AddRule

func (m *MediaRule) AddRule(rule CSSRule) *MediaRule

AddRule appends a CSS rule inside the media block.

func (*MediaRule) Bytes

func (m *MediaRule) Bytes() []byte

Bytes returns a defensive copy of the rendered MediaRule bytes.

func (*MediaRule) HTML

func (m *MediaRule) HTML() string

HTML returns freshly prepared MediaRule HTML as a string.

func (*MediaRule) IsCSSRule

func (m *MediaRule) IsCSSRule()

IsCSSRule marks MediaRule as CSS content for style elements.

func (*MediaRule) Prepare

func (m *MediaRule) Prepare()

Prepare renders the MediaRule component into its internal buffer.

func (*MediaRule) Render

func (m *MediaRule) Render() []byte

Render returns freshly prepared MediaRule HTML bytes.

func (*MediaRule) String

func (m *MediaRule) String() string

String returns freshly prepared MediaRule HTML as a string.

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

Menu represents the Menu component or supporting type.

func NewMenu

func NewMenu() *Menu

NewMenu creates a new Menu component.

func (m *Menu) Add(e Element) *Menu

Add appends child content to the Menu component.

func (m *Menu) AddStyle(k, v string) *Menu

AddStyle adds one inline CSS declaration to the Menu component.

func (m *Menu) AddStyles(ms StyleMap) *Menu

AddStyles adds multiple inline CSS declarations to the Menu component.

func (m *Menu) Bytes() []byte

Bytes returns a defensive copy of the rendered Menu bytes.

func (m *Menu) HTML() string

HTML returns freshly prepared Menu HTML as a string.

func (m *Menu) IsBodyElement()

IsBodyElement implements BodyElement interface

func (m *Menu) Label(l string) *Menu

Label sets the label value on the Menu component.

func (m *Menu) Prepare()

Prepare renders the Menu component into its internal buffer.

func (m *Menu) Render() []byte

Render returns freshly prepared Menu HTML bytes.

func (m *Menu) String() string

String returns freshly prepared Menu HTML as a string.

func (m *Menu) Style(ms StyleMap) *Menu

Style replaces the inline CSS declarations on the Menu component.

func (m *Menu) Type(t string) *Menu

Type sets the type value on the Menu component.

type Meta

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

Meta represents the HTML meta element for metadata

func NewMeta

func NewMeta() *Meta

NewMeta creates a new Meta element

func (*Meta) AddStyle

func (m *Meta) AddStyle(k, v string) *Meta

AddStyle adds a single CSS property

func (*Meta) AddStyles

func (m *Meta) AddStyles(m2 StyleMap) *Meta

AddStyles adds multiple CSS properties

func (*Meta) Bytes

func (m *Meta) Bytes() []byte

Bytes returns the buffer contents

func (*Meta) Charset

func (m *Meta) Charset(charset string) *Meta

Charset sets the charset attribute

func (*Meta) Content

func (m *Meta) Content(content string) *Meta

Content sets the content attribute

func (*Meta) HTML

func (m *Meta) HTML() string

HTML returns freshly prepared Meta HTML as a string.

func (*Meta) HttpEquiv

func (m *Meta) HttpEquiv(httpequiv string) *Meta

HttpEquiv sets the http-equiv attribute

func (*Meta) IsHeadElement

func (m *Meta) IsHeadElement()

IsHeadElement implements HeadElement interface

func (*Meta) Name

func (m *Meta) Name(name string) *Meta

Name sets the name attribute

func (*Meta) Prepare

func (m *Meta) Prepare()

Prepare builds the HTML for the meta element

func (*Meta) Property

func (m *Meta) Property(property string) *Meta

Property sets the property attribute

func (*Meta) Render

func (m *Meta) Render() []byte

Render returns freshly prepared Meta HTML bytes.

func (*Meta) Scheme

func (m *Meta) Scheme(scheme string) *Meta

Scheme sets the scheme attribute

func (*Meta) String

func (m *Meta) String() string

String returns freshly prepared Meta HTML as a string.

func (*Meta) Style

func (m *Meta) Style(m2 StyleMap) *Meta

Style replaces all styles

type Meter

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

Meter represents the HTML meter element for displaying scalar measurements

func NewMeter

func NewMeter() *Meter

NewMeter creates a new Meter element

func (*Meter) Add

func (m *Meter) Add(e Element) *Meter

Add adds content to the meter element

func (*Meter) AddStyle

func (m *Meter) AddStyle(k, v string) *Meter

AddStyle adds a single CSS property

func (*Meter) AddStyles

func (m *Meter) AddStyles(ma StyleMap) *Meter

AddStyles adds multiple CSS properties

func (*Meter) Bytes

func (m *Meter) Bytes() []byte

Bytes returns the buffer contents

func (*Meter) Form

func (m *Meter) Form(form string) *Meter

Form sets the form attribute

func (*Meter) HTML

func (m *Meter) HTML() string

HTML returns freshly prepared Meter HTML as a string.

func (*Meter) High

func (m *Meter) High(high string) *Meter

High sets the high attribute

func (*Meter) IsBodyElement

func (m *Meter) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Meter) Low

func (m *Meter) Low(low string) *Meter

Low sets the low attribute

func (*Meter) Max

func (m *Meter) Max(max string) *Meter

Max sets the max attribute

func (*Meter) Min

func (m *Meter) Min(min string) *Meter

Min sets the min attribute

func (*Meter) Optimum

func (m *Meter) Optimum(optimum string) *Meter

Optimum sets the optimum attribute

func (*Meter) Prepare

func (m *Meter) Prepare()

Prepare builds the HTML for the meter element

func (*Meter) Render

func (m *Meter) Render() []byte

Render returns freshly prepared Meter HTML bytes.

func (*Meter) String

func (m *Meter) String() string

String returns freshly prepared Meter HTML as a string.

func (*Meter) Style

func (m *Meter) Style(ma StyleMap) *Meter

Style replaces all styles

func (*Meter) Text

func (m *Meter) Text(text string) *Meter

Text adds text content to the meter element (fallback for non-supporting browsers)

func (*Meter) Value

func (m *Meter) Value(value string) *Meter

Value sets the value attribute

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

Nav represents the Nav component or supporting type.

func NewNav

func NewNav() *Nav

NewNav creates a new Nav component.

func (n *Nav) Add(e Element) *Nav

Add appends child content to the Nav component.

func (n *Nav) AddStyle(k, v string) *Nav

AddStyle adds one inline CSS declaration to the Nav component.

func (n *Nav) AddStyles(m StyleMap) *Nav

AddStyles adds multiple inline CSS declarations to the Nav component.

func (n *Nav) Bytes() []byte

Bytes returns a defensive copy of the rendered Nav bytes.

func (n *Nav) HTML() string

HTML returns freshly prepared Nav HTML as a string.

func (n *Nav) IsBodyElement()

IsBodyElement implements BodyElement interface

func (n *Nav) Prepare()

Prepare renders the Nav component into its internal buffer.

func (n *Nav) Render() []byte

Render returns freshly prepared Nav HTML bytes.

func (n *Nav) Role(r string) *Nav

Role sets the role value on the Nav component.

func (n *Nav) String() string

String returns freshly prepared Nav HTML as a string.

func (n *Nav) Style(m StyleMap) *Nav

Style replaces the inline CSS declarations on the Nav component.

type Noscript

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

Noscript represents the Noscript component or supporting type.

func NewNoscript

func NewNoscript() *Noscript

NewNoscript creates a new Noscript component.

func (*Noscript) Add

func (n *Noscript) Add(e Element) *Noscript

Add appends child content to the Noscript component.

func (*Noscript) AddStyle

func (n *Noscript) AddStyle(k, v string) *Noscript

AddStyle adds one inline CSS declaration to the Noscript component.

func (*Noscript) AddStyles

func (n *Noscript) AddStyles(m StyleMap) *Noscript

AddStyles adds multiple inline CSS declarations to the Noscript component.

func (*Noscript) Bytes

func (n *Noscript) Bytes() []byte

Bytes returns a defensive copy of the rendered Noscript bytes.

func (*Noscript) HTML

func (n *Noscript) HTML() string

HTML returns freshly prepared Noscript HTML as a string.

func (*Noscript) IsBodyElement

func (n *Noscript) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Noscript) IsHeadElement

func (n *Noscript) IsHeadElement()

IsHeadElement implements HeadElement interface

func (*Noscript) Prepare

func (n *Noscript) Prepare()

Prepare renders the Noscript component into its internal buffer.

func (*Noscript) Render

func (n *Noscript) Render() []byte

Render returns freshly prepared Noscript HTML bytes.

func (*Noscript) String

func (n *Noscript) String() string

String returns freshly prepared Noscript HTML as a string.

func (*Noscript) Style

func (n *Noscript) Style(m StyleMap) *Noscript

Style replaces the inline CSS declarations on the Noscript component.

type Object

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

Object represents the Object component or supporting type.

func NewObject

func NewObject() *Object

NewObject creates a new Object component.

func (*Object) Add

func (o *Object) Add(e Element) *Object

Add appends child content to the Object component.

func (*Object) AddStyle

func (o *Object) AddStyle(k, v string) *Object

AddStyle adds one inline CSS declaration to the Object component.

func (*Object) AddStyles

func (o *Object) AddStyles(m StyleMap) *Object

AddStyles adds multiple inline CSS declarations to the Object component.

func (*Object) Bytes

func (o *Object) Bytes() []byte

Bytes returns a defensive copy of the rendered Object bytes.

func (*Object) Data

func (o *Object) Data(data string) *Object

Data sets the data value on the Object component.

func (*Object) Form

func (o *Object) Form(form string) *Object

Form sets the form value on the Object component.

func (*Object) HTML

func (o *Object) HTML() string

HTML returns freshly prepared Object HTML as a string.

func (*Object) Height

func (o *Object) Height(height string) *Object

Height sets the height value on the Object component.

func (*Object) IsBodyElement

func (o *Object) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Object) Name

func (o *Object) Name(name string) *Object

Name sets the name value on the Object component.

func (*Object) Prepare

func (o *Object) Prepare()

Prepare renders the Object component into its internal buffer.

func (*Object) Render

func (o *Object) Render() []byte

Render returns freshly prepared Object HTML bytes.

func (*Object) String

func (o *Object) String() string

String returns freshly prepared Object HTML as a string.

func (*Object) Style

func (o *Object) Style(m StyleMap) *Object

Style replaces the inline CSS declarations on the Object component.

func (*Object) Type

func (o *Object) Type(objType string) *Object

Type sets the type value on the Object component.

func (*Object) Usemap

func (o *Object) Usemap(usemap string) *Object

Usemap sets the usemap value on the Object component.

func (*Object) Width

func (o *Object) Width(width string) *Object

Width sets the width value on the Object component.

type Ol

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

Ol represents the Ol component or supporting type.

func NewOl

func NewOl() *Ol

NewOl creates a new Ol component.

func (*Ol) Add

func (o *Ol) Add(e Element) *Ol

Add appends child content to the Ol component.

func (*Ol) AddStyle

func (o *Ol) AddStyle(k, v string) *Ol

AddStyle adds one inline CSS declaration to the Ol component.

func (*Ol) AddStyles

func (o *Ol) AddStyles(m StyleMap) *Ol

AddStyles adds multiple inline CSS declarations to the Ol component.

func (*Ol) Bytes

func (o *Ol) Bytes() []byte

Bytes returns a defensive copy of the rendered Ol bytes.

func (*Ol) HTML

func (o *Ol) HTML() string

HTML returns freshly prepared Ol HTML as a string.

func (*Ol) IsBodyElement

func (o *Ol) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Ol) Prepare

func (o *Ol) Prepare()

Prepare renders the Ol component into its internal buffer.

func (*Ol) Render

func (o *Ol) Render() []byte

Render returns freshly prepared Ol HTML bytes.

func (*Ol) Reversed

func (o *Ol) Reversed(r bool) *Ol

Reversed sets the reversed value on the Ol component.

func (*Ol) Start

func (o *Ol) Start(s int) *Ol

Start sets the start value on the Ol component.

func (*Ol) String

func (o *Ol) String() string

String returns freshly prepared Ol HTML as a string.

func (*Ol) Style

func (o *Ol) Style(m StyleMap) *Ol

Style replaces the inline CSS declarations on the Ol component.

func (*Ol) Type

func (o *Ol) Type(t string) *Ol

Type sets the type value on the Ol component.

type Optgroup

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

Optgroup represents the HTML optgroup element for grouping options

func NewOptgroup

func NewOptgroup() *Optgroup

NewOptgroup creates a new Optgroup element

func (*Optgroup) Add

func (o *Optgroup) Add(e Element) *Optgroup

Add adds content to the optgroup element

func (*Optgroup) AddStyle

func (o *Optgroup) AddStyle(k, v string) *Optgroup

AddStyle adds a single CSS property

func (*Optgroup) AddStyles

func (o *Optgroup) AddStyles(m StyleMap) *Optgroup

AddStyles adds multiple CSS properties

func (*Optgroup) Bytes

func (o *Optgroup) Bytes() []byte

Bytes returns the buffer contents

func (*Optgroup) Disabled

func (o *Optgroup) Disabled(disabled bool) *Optgroup

Disabled sets the disabled attribute

func (*Optgroup) HTML

func (o *Optgroup) HTML() string

HTML returns freshly prepared Optgroup HTML as a string.

func (*Optgroup) IsBodyElement

func (o *Optgroup) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Optgroup) Label

func (o *Optgroup) Label(label string) *Optgroup

Label sets the label attribute

func (*Optgroup) Prepare

func (o *Optgroup) Prepare()

Prepare builds the HTML for the optgroup element

func (*Optgroup) Render

func (o *Optgroup) Render() []byte

Render returns freshly prepared Optgroup HTML bytes.

func (*Optgroup) String

func (o *Optgroup) String() string

String returns freshly prepared Optgroup HTML as a string.

func (*Optgroup) Style

func (o *Optgroup) Style(m StyleMap) *Optgroup

Style replaces all styles

type Option

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

Option represents the HTML option element for select options

func NewOption

func NewOption() *Option

NewOption creates a new Option element

func (*Option) Add

func (o *Option) Add(e Element) *Option

Add adds content to the option element

func (*Option) AddStyle

func (o *Option) AddStyle(k, v string) *Option

AddStyle adds a single CSS property

func (*Option) AddStyles

func (o *Option) AddStyles(m StyleMap) *Option

AddStyles adds multiple CSS properties

func (*Option) Bytes

func (o *Option) Bytes() []byte

Bytes returns the buffer contents

func (*Option) Disabled

func (o *Option) Disabled(disabled bool) *Option

Disabled sets the disabled attribute

func (*Option) HTML

func (o *Option) HTML() string

HTML returns freshly prepared Option HTML as a string.

func (*Option) IsBodyElement

func (o *Option) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Option) Label

func (o *Option) Label(label string) *Option

Label sets the label attribute

func (*Option) Prepare

func (o *Option) Prepare()

Prepare builds the HTML for the option element

func (*Option) Render

func (o *Option) Render() []byte

Render returns freshly prepared Option HTML bytes.

func (*Option) Selected

func (o *Option) Selected(selected bool) *Option

Selected sets the selected attribute

func (*Option) String

func (o *Option) String() string

String returns freshly prepared Option HTML as a string.

func (*Option) Style

func (o *Option) Style(m StyleMap) *Option

Style replaces all styles

func (*Option) Text

func (o *Option) Text(text string) *Option

Text adds text content to the option element

func (*Option) Value

func (o *Option) Value(value string) *Option

Value sets the value attribute

type Output

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

Output represents the HTML output element for calculation results

func NewOutput

func NewOutput() *Output

NewOutput creates a new Output element

func (*Output) Add

func (o *Output) Add(e Element) *Output

Add adds content to the output element

func (*Output) AddStyle

func (o *Output) AddStyle(k, v string) *Output

AddStyle adds a single CSS property

func (*Output) AddStyles

func (o *Output) AddStyles(m StyleMap) *Output

AddStyles adds multiple CSS properties

func (*Output) Bytes

func (o *Output) Bytes() []byte

Bytes returns the buffer contents

func (*Output) For

func (o *Output) For(forattr string) *Output

For sets the for attribute

func (*Output) Form

func (o *Output) Form(form string) *Output

Form sets the form attribute

func (*Output) HTML

func (o *Output) HTML() string

HTML returns freshly prepared Output HTML as a string.

func (*Output) IsBodyElement

func (o *Output) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Output) Name

func (o *Output) Name(name string) *Output

Name sets the name attribute

func (*Output) Prepare

func (o *Output) Prepare()

Prepare builds the HTML for the output element

func (*Output) Render

func (o *Output) Render() []byte

Render returns freshly prepared Output HTML bytes.

func (*Output) String

func (o *Output) String() string

String returns freshly prepared Output HTML as a string.

func (*Output) Style

func (o *Output) Style(m StyleMap) *Output

Style replaces all styles

func (*Output) Text

func (o *Output) Text(text string) *Output

Text adds text content to the output element

type P

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

P represents the P component or supporting type.

func NewP

func NewP() *P

NewP creates a new P component.

func (*P) AddStyle

func (p *P) AddStyle(k, v string) *P

AddStyle adds one inline CSS declaration to the P component.

func (*P) AddStyles

func (p *P) AddStyles(m StyleMap) *P

AddStyles adds multiple inline CSS declarations to the P component.

func (*P) Bytes

func (p *P) Bytes() []byte

Bytes returns a defensive copy of the rendered P bytes.

func (*P) HTML

func (p *P) HTML() string

HTML returns freshly prepared P HTML as a string.

func (*P) IsBodyElement

func (p *P) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*P) Prepare

func (p *P) Prepare()

Prepare renders the P component into its internal buffer.

func (*P) Render

func (p *P) Render() []byte

Render returns freshly prepared P HTML bytes.

func (*P) String

func (p *P) String() string

String returns freshly prepared P HTML as a string.

func (*P) Style

func (p *P) Style(m StyleMap) *P

Style replaces the inline CSS declarations on the P component.

func (*P) Text

func (p *P) Text(s string) *P

Text sets or appends text content on the P component.

type Picture

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

Picture represents the Picture component or supporting type.

func NewPicture

func NewPicture() *Picture

NewPicture creates a new Picture component.

func (*Picture) Add

func (p *Picture) Add(e Element) *Picture

Add appends child content to the Picture component.

func (*Picture) AddStyle

func (p *Picture) AddStyle(k, v string) *Picture

AddStyle adds one inline CSS declaration to the Picture component.

func (*Picture) AddStyles

func (p *Picture) AddStyles(m StyleMap) *Picture

AddStyles adds multiple inline CSS declarations to the Picture component.

func (*Picture) Bytes

func (p *Picture) Bytes() []byte

Bytes returns a defensive copy of the rendered Picture bytes.

func (*Picture) HTML

func (p *Picture) HTML() string

HTML returns freshly prepared Picture HTML as a string.

func (*Picture) IsBodyElement

func (p *Picture) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Picture) Prepare

func (p *Picture) Prepare()

Prepare renders the Picture component into its internal buffer.

func (*Picture) Render

func (p *Picture) Render() []byte

Render returns freshly prepared Picture HTML bytes.

func (*Picture) String

func (p *Picture) String() string

String returns freshly prepared Picture HTML as a string.

func (*Picture) Style

func (p *Picture) Style(m StyleMap) *Picture

Style replaces the inline CSS declarations on the Picture component.

type Portal

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

Portal represents the Portal component or supporting type.

func NewPortal

func NewPortal() *Portal

NewPortal creates a new Portal component.

func (*Portal) AddStyle

func (p *Portal) AddStyle(k, v string) *Portal

AddStyle adds one inline CSS declaration to the Portal component.

func (*Portal) AddStyles

func (p *Portal) AddStyles(m StyleMap) *Portal

AddStyles adds multiple inline CSS declarations to the Portal component.

func (*Portal) Bytes

func (p *Portal) Bytes() []byte

Bytes returns a defensive copy of the rendered Portal bytes.

func (*Portal) HTML

func (p *Portal) HTML() string

HTML returns freshly prepared Portal HTML as a string.

func (*Portal) IsBodyElement

func (p *Portal) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Portal) Prepare

func (p *Portal) Prepare()

Prepare renders the Portal component into its internal buffer.

func (*Portal) Referrerpolicy

func (p *Portal) Referrerpolicy(referrerpolicy string) *Portal

Referrerpolicy sets the referrerpolicy value on the Portal component.

func (*Portal) Render

func (p *Portal) Render() []byte

Render returns freshly prepared Portal HTML bytes.

func (*Portal) Src

func (p *Portal) Src(src string) *Portal

Src sets the src value on the Portal component.

func (*Portal) String

func (p *Portal) String() string

String returns freshly prepared Portal HTML as a string.

func (*Portal) Style

func (p *Portal) Style(m StyleMap) *Portal

Style replaces the inline CSS declarations on the Portal component.

type Pre

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

Pre represents the Pre component or supporting type.

func NewPre

func NewPre() *Pre

NewPre creates a new Pre component.

func (*Pre) AddStyle

func (p *Pre) AddStyle(k, v string) *Pre

AddStyle adds one inline CSS declaration to the Pre component.

func (*Pre) AddStyles

func (p *Pre) AddStyles(m StyleMap) *Pre

AddStyles adds multiple inline CSS declarations to the Pre component.

func (*Pre) Bytes

func (p *Pre) Bytes() []byte

Bytes returns a defensive copy of the rendered Pre bytes.

func (*Pre) HTML

func (p *Pre) HTML() string

HTML returns freshly prepared Pre HTML as a string.

func (*Pre) IsBodyElement

func (p *Pre) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Pre) Prepare

func (p *Pre) Prepare()

Prepare renders the Pre component into its internal buffer.

func (*Pre) Render

func (p *Pre) Render() []byte

Render returns freshly prepared Pre HTML bytes.

func (*Pre) String

func (p *Pre) String() string

String returns freshly prepared Pre HTML as a string.

func (*Pre) Style

func (p *Pre) Style(m StyleMap) *Pre

Style replaces the inline CSS declarations on the Pre component.

func (*Pre) Text

func (p *Pre) Text(str string) *Pre

Text sets or appends text content on the Pre component.

type Progress

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

Progress represents the HTML progress element for showing completion progress

func NewProgress

func NewProgress() *Progress

NewProgress creates a new Progress element

func (*Progress) Add

func (p *Progress) Add(e Element) *Progress

Add adds content to the progress element

func (*Progress) AddStyle

func (p *Progress) AddStyle(k, v string) *Progress

AddStyle adds a single CSS property

func (*Progress) AddStyles

func (p *Progress) AddStyles(m StyleMap) *Progress

AddStyles adds multiple CSS properties

func (*Progress) Bytes

func (p *Progress) Bytes() []byte

Bytes returns the buffer contents

func (*Progress) Form

func (p *Progress) Form(form string) *Progress

Form sets the form attribute

func (*Progress) HTML

func (p *Progress) HTML() string

HTML returns freshly prepared Progress HTML as a string.

func (*Progress) IsBodyElement

func (p *Progress) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Progress) Max

func (p *Progress) Max(max string) *Progress

Max sets the max attribute

func (*Progress) Prepare

func (p *Progress) Prepare()

Prepare builds the HTML for the progress element

func (*Progress) Render

func (p *Progress) Render() []byte

Render returns freshly prepared Progress HTML bytes.

func (*Progress) String

func (p *Progress) String() string

String returns freshly prepared Progress HTML as a string.

func (*Progress) Style

func (p *Progress) Style(m StyleMap) *Progress

Style replaces all styles

func (*Progress) Text

func (p *Progress) Text(text string) *Progress

Text adds text content to the progress element (fallback for non-supporting browsers)

func (*Progress) Value

func (p *Progress) Value(value string) *Progress

Value sets the value attribute

type Q

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

Q represents the Q component or supporting type.

func NewQ

func NewQ() *Q

NewQ creates a new Q component.

func (*Q) AddStyle

func (q *Q) AddStyle(k, v string) *Q

AddStyle adds one inline CSS declaration to the Q component.

func (*Q) AddStyles

func (q *Q) AddStyles(m StyleMap) *Q

AddStyles adds multiple inline CSS declarations to the Q component.

func (*Q) Bytes

func (q *Q) Bytes() []byte

Bytes returns a defensive copy of the rendered Q bytes.

func (*Q) Cite

func (q *Q) Cite(s string) *Q

Cite sets the cite value on the Q component.

func (*Q) HTML

func (q *Q) HTML() string

HTML returns freshly prepared Q HTML as a string.

func (*Q) IsBodyElement

func (q *Q) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Q) Prepare

func (q *Q) Prepare()

Prepare renders the Q component into its internal buffer.

func (*Q) Render

func (q *Q) Render() []byte

Render returns freshly prepared Q HTML bytes.

func (*Q) String

func (q *Q) String() string

String returns freshly prepared Q HTML as a string.

func (*Q) Style

func (q *Q) Style(m StyleMap) *Q

Style replaces the inline CSS declarations on the Q component.

func (*Q) Text

func (q *Q) Text(s string) *Q

Text sets or appends text content on the Q component.

type RawCSSRule

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

RawCSSRule represents raw CSS content for custom or unsupported rules.

func NewRawCSSRule

func NewRawCSSRule(css string) *RawCSSRule

NewRawCSSRule creates a raw CSS rule.

func (*RawCSSRule) Bytes

func (r *RawCSSRule) Bytes() []byte

Bytes returns a defensive copy of the rendered RawCSSRule bytes.

func (*RawCSSRule) HTML

func (r *RawCSSRule) HTML() string

HTML returns freshly prepared RawCSSRule HTML as a string.

func (*RawCSSRule) IsCSSRule

func (r *RawCSSRule) IsCSSRule()

IsCSSRule marks RawCSSRule as CSS content for style elements.

func (*RawCSSRule) Prepare

func (r *RawCSSRule) Prepare()

Prepare renders the RawCSSRule component into its internal buffer.

func (*RawCSSRule) Render

func (r *RawCSSRule) Render() []byte

Render returns freshly prepared RawCSSRule HTML bytes.

func (*RawCSSRule) String

func (r *RawCSSRule) String() string

String returns freshly prepared RawCSSRule HTML as a string.

func (*RawCSSRule) Text

func (r *RawCSSRule) Text(css string) *RawCSSRule

Text replaces the raw CSS content.

type Rb

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

Rb represents the Rb component or supporting type.

func NewRb

func NewRb() *Rb

NewRb creates a new Rb component.

func (*Rb) AddStyle

func (rb *Rb) AddStyle(k, v string) *Rb

AddStyle adds one inline CSS declaration to the Rb component.

func (*Rb) AddStyles

func (rb *Rb) AddStyles(m StyleMap) *Rb

AddStyles adds multiple inline CSS declarations to the Rb component.

func (*Rb) Bytes

func (rb *Rb) Bytes() []byte

Bytes returns a defensive copy of the rendered Rb bytes.

func (*Rb) HTML

func (r *Rb) HTML() string

HTML returns freshly prepared Rb HTML as a string.

func (*Rb) IsBodyElement

func (rb *Rb) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Rb) Prepare

func (rb *Rb) Prepare()

Prepare renders the Rb component into its internal buffer.

func (*Rb) Render

func (r *Rb) Render() []byte

Render returns freshly prepared Rb HTML bytes.

func (*Rb) String

func (r *Rb) String() string

String returns freshly prepared Rb HTML as a string.

func (*Rb) Style

func (rb *Rb) Style(m StyleMap) *Rb

Style replaces the inline CSS declarations on the Rb component.

func (*Rb) Text

func (rb *Rb) Text(s string) *Rb

Text sets or appends text content on the Rb component.

type Rp

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

Rp represents the Rp component or supporting type.

func NewRp

func NewRp() *Rp

NewRp creates a new Rp component.

func (*Rp) AddStyle

func (rp *Rp) AddStyle(k, v string) *Rp

AddStyle adds one inline CSS declaration to the Rp component.

func (*Rp) AddStyles

func (rp *Rp) AddStyles(m StyleMap) *Rp

AddStyles adds multiple inline CSS declarations to the Rp component.

func (*Rp) Bytes

func (rp *Rp) Bytes() []byte

Bytes returns a defensive copy of the rendered Rp bytes.

func (*Rp) HTML

func (r *Rp) HTML() string

HTML returns freshly prepared Rp HTML as a string.

func (*Rp) IsBodyElement

func (rp *Rp) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Rp) Prepare

func (rp *Rp) Prepare()

Prepare renders the Rp component into its internal buffer.

func (*Rp) Render

func (r *Rp) Render() []byte

Render returns freshly prepared Rp HTML bytes.

func (*Rp) String

func (r *Rp) String() string

String returns freshly prepared Rp HTML as a string.

func (*Rp) Style

func (rp *Rp) Style(m StyleMap) *Rp

Style replaces the inline CSS declarations on the Rp component.

func (*Rp) Text

func (rp *Rp) Text(s string) *Rp

Text sets or appends text content on the Rp component.

type Rt

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

Rt represents the Rt component or supporting type.

func NewRt

func NewRt() *Rt

NewRt creates a new Rt component.

func (*Rt) AddStyle

func (rt *Rt) AddStyle(k, v string) *Rt

AddStyle adds one inline CSS declaration to the Rt component.

func (*Rt) AddStyles

func (rt *Rt) AddStyles(m StyleMap) *Rt

AddStyles adds multiple inline CSS declarations to the Rt component.

func (*Rt) Bytes

func (rt *Rt) Bytes() []byte

Bytes returns a defensive copy of the rendered Rt bytes.

func (*Rt) HTML

func (r *Rt) HTML() string

HTML returns freshly prepared Rt HTML as a string.

func (*Rt) IsBodyElement

func (rt *Rt) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Rt) Prepare

func (rt *Rt) Prepare()

Prepare renders the Rt component into its internal buffer.

func (*Rt) Render

func (r *Rt) Render() []byte

Render returns freshly prepared Rt HTML bytes.

func (*Rt) String

func (r *Rt) String() string

String returns freshly prepared Rt HTML as a string.

func (*Rt) Style

func (rt *Rt) Style(m StyleMap) *Rt

Style replaces the inline CSS declarations on the Rt component.

func (*Rt) Text

func (rt *Rt) Text(s string) *Rt

Text sets or appends text content on the Rt component.

type Rtc

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

Rtc represents the Rtc component or supporting type.

func NewRtc

func NewRtc() *Rtc

NewRtc creates a new Rtc component.

func (*Rtc) Add

func (rtc *Rtc) Add(e Element) *Rtc

Add appends child content to the Rtc component.

func (*Rtc) AddStyle

func (rtc *Rtc) AddStyle(k, v string) *Rtc

AddStyle adds one inline CSS declaration to the Rtc component.

func (*Rtc) AddStyles

func (rtc *Rtc) AddStyles(m StyleMap) *Rtc

AddStyles adds multiple inline CSS declarations to the Rtc component.

func (*Rtc) Bytes

func (rtc *Rtc) Bytes() []byte

Bytes returns a defensive copy of the rendered Rtc bytes.

func (*Rtc) HTML

func (r *Rtc) HTML() string

HTML returns freshly prepared Rtc HTML as a string.

func (*Rtc) IsBodyElement

func (rtc *Rtc) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Rtc) Prepare

func (rtc *Rtc) Prepare()

Prepare renders the Rtc component into its internal buffer.

func (*Rtc) Render

func (r *Rtc) Render() []byte

Render returns freshly prepared Rtc HTML bytes.

func (*Rtc) String

func (r *Rtc) String() string

String returns freshly prepared Rtc HTML as a string.

func (*Rtc) Style

func (rtc *Rtc) Style(m StyleMap) *Rtc

Style replaces the inline CSS declarations on the Rtc component.

type Ruby

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

Ruby represents the Ruby component or supporting type.

func NewRuby

func NewRuby() *Ruby

NewRuby creates a new Ruby component.

func (*Ruby) Add

func (r *Ruby) Add(e Element) *Ruby

Add appends child content to the Ruby component.

func (*Ruby) AddStyle

func (r *Ruby) AddStyle(k, v string) *Ruby

AddStyle adds one inline CSS declaration to the Ruby component.

func (*Ruby) AddStyles

func (r *Ruby) AddStyles(m StyleMap) *Ruby

AddStyles adds multiple inline CSS declarations to the Ruby component.

func (*Ruby) Bytes

func (r *Ruby) Bytes() []byte

Bytes returns a defensive copy of the rendered Ruby bytes.

func (*Ruby) HTML

func (r *Ruby) HTML() string

HTML returns freshly prepared Ruby HTML as a string.

func (*Ruby) IsBodyElement

func (r *Ruby) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Ruby) Prepare

func (r *Ruby) Prepare()

Prepare renders the Ruby component into its internal buffer.

func (*Ruby) Render

func (r *Ruby) Render() []byte

Render returns freshly prepared Ruby HTML bytes.

func (*Ruby) String

func (r *Ruby) String() string

String returns freshly prepared Ruby HTML as a string.

func (*Ruby) Style

func (r *Ruby) Style(m StyleMap) *Ruby

Style replaces the inline CSS declarations on the Ruby component.

type S

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

S represents the S component or supporting type.

func NewS

func NewS() *S

NewS creates a new S component.

func (*S) AddStyle

func (s *S) AddStyle(k, v string) *S

AddStyle adds one inline CSS declaration to the S component.

func (*S) AddStyles

func (s *S) AddStyles(m StyleMap) *S

AddStyles adds multiple inline CSS declarations to the S component.

func (*S) Bytes

func (s *S) Bytes() []byte

Bytes returns a defensive copy of the rendered S bytes.

func (*S) HTML

func (s *S) HTML() string

HTML returns freshly prepared S HTML as a string.

func (*S) IsBodyElement

func (s *S) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*S) Prepare

func (s *S) Prepare()

Prepare renders the S component into its internal buffer.

func (*S) Render

func (s *S) Render() []byte

Render returns freshly prepared S HTML bytes.

func (*S) String

func (s *S) String() string

String returns freshly prepared S HTML as a string.

func (*S) Style

func (s *S) Style(m StyleMap) *S

Style replaces the inline CSS declarations on the S component.

func (*S) Text

func (s *S) Text(str string) *S

Text sets or appends text content on the S component.

type Samp

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

Samp represents the Samp component or supporting type.

func NewSamp

func NewSamp() *Samp

NewSamp creates a new Samp component.

func (*Samp) AddStyle

func (s *Samp) AddStyle(k, v string) *Samp

AddStyle adds one inline CSS declaration to the Samp component.

func (*Samp) AddStyles

func (s *Samp) AddStyles(m StyleMap) *Samp

AddStyles adds multiple inline CSS declarations to the Samp component.

func (*Samp) Bytes

func (s *Samp) Bytes() []byte

Bytes returns a defensive copy of the rendered Samp bytes.

func (*Samp) HTML

func (s *Samp) HTML() string

HTML returns freshly prepared Samp HTML as a string.

func (*Samp) IsBodyElement

func (s *Samp) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Samp) Prepare

func (s *Samp) Prepare()

Prepare renders the Samp component into its internal buffer.

func (*Samp) Render

func (s *Samp) Render() []byte

Render returns freshly prepared Samp HTML bytes.

func (*Samp) String

func (s *Samp) String() string

String returns freshly prepared Samp HTML as a string.

func (*Samp) Style

func (s *Samp) Style(m StyleMap) *Samp

Style replaces the inline CSS declarations on the Samp component.

func (*Samp) Text

func (s *Samp) Text(str string) *Samp

Text sets or appends text content on the Samp component.

type Script

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

Script represents the Script component or supporting type.

func NewScript

func NewScript() *Script

NewScript creates a new Script component.

func (*Script) AddStyle

func (s *Script) AddStyle(k, v string) *Script

AddStyle adds one inline CSS declaration to the Script component.

func (*Script) AddStyles

func (s *Script) AddStyles(m StyleMap) *Script

AddStyles adds multiple inline CSS declarations to the Script component.

func (*Script) Async

func (s *Script) Async(async bool) *Script

Async sets the async value on the Script component.

func (*Script) Bytes

func (s *Script) Bytes() []byte

Bytes returns a defensive copy of the rendered Script bytes.

func (*Script) Crossorigin

func (s *Script) Crossorigin(crossorigin string) *Script

Crossorigin sets the crossorigin value on the Script component.

func (*Script) Defer

func (s *Script) Defer(deferScript bool) *Script

Defer sets the defer value on the Script component.

func (*Script) HTML

func (s *Script) HTML() string

HTML returns freshly prepared Script HTML as a string.

func (*Script) Integrity

func (s *Script) Integrity(integrity string) *Script

Integrity sets the integrity value on the Script component.

func (*Script) IsBodyElement

func (s *Script) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Script) IsHeadElement

func (s *Script) IsHeadElement()

IsHeadElement implements HeadElement interface

func (*Script) Nomodule

func (s *Script) Nomodule(nomodule bool) *Script

Nomodule sets the nomodule value on the Script component.

func (*Script) Prepare

func (s *Script) Prepare()

Prepare renders the Script component into its internal buffer.

func (*Script) Referrerpolicy

func (s *Script) Referrerpolicy(referrerpolicy string) *Script

Referrerpolicy sets the referrerpolicy value on the Script component.

func (*Script) Render

func (s *Script) Render() []byte

Render returns freshly prepared Script HTML bytes.

func (*Script) Src

func (s *Script) Src(src string) *Script

Src sets the src value on the Script component.

func (*Script) String

func (s *Script) String() string

String returns freshly prepared Script HTML as a string.

func (*Script) Style

func (s *Script) Style(m StyleMap) *Script

Style replaces the inline CSS declarations on the Script component.

func (*Script) Text

func (s *Script) Text(text string) *Script

Text sets or appends text content on the Script component.

func (*Script) Type

func (s *Script) Type(scriptType string) *Script

Type sets the type value on the Script component.

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

Search represents the Search component or supporting type.

func NewSearch

func NewSearch() *Search

NewSearch creates a new Search component.

func (*Search) Add

func (s *Search) Add(e Element) *Search

Add appends child content to the Search component.

func (*Search) AddStyle

func (s *Search) AddStyle(k, v string) *Search

AddStyle adds one inline CSS declaration to the Search component.

func (*Search) AddStyles

func (s *Search) AddStyles(m StyleMap) *Search

AddStyles adds multiple inline CSS declarations to the Search component.

func (*Search) Bytes

func (s *Search) Bytes() []byte

Bytes returns a defensive copy of the rendered Search bytes.

func (*Search) HTML

func (s *Search) HTML() string

HTML returns freshly prepared Search HTML as a string.

func (*Search) IsBodyElement

func (s *Search) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Search) Prepare

func (s *Search) Prepare()

Prepare renders the Search component into its internal buffer.

func (*Search) Render

func (s *Search) Render() []byte

Render returns freshly prepared Search HTML bytes.

func (*Search) String

func (s *Search) String() string

String returns freshly prepared Search HTML as a string.

func (*Search) Style

func (s *Search) Style(m StyleMap) *Search

Style replaces the inline CSS declarations on the Search component.

type Section

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

Section represents the Section component or supporting type.

func NewSection

func NewSection() *Section

NewSection creates a new Section component.

func (*Section) Add

func (s *Section) Add(e Element) *Section

Add appends child content to the Section component.

func (*Section) AddStyle

func (s *Section) AddStyle(k, v string) *Section

AddStyle adds one inline CSS declaration to the Section component.

func (*Section) AddStyles

func (s *Section) AddStyles(m StyleMap) *Section

AddStyles adds multiple inline CSS declarations to the Section component.

func (*Section) AriaLabel

func (s *Section) AriaLabel(label string) *Section

AriaLabel sets the arialabel value on the Section component.

func (*Section) Bytes

func (s *Section) Bytes() []byte

Bytes returns a defensive copy of the rendered Section bytes.

func (*Section) HTML

func (s *Section) HTML() string

HTML returns freshly prepared Section HTML as a string.

func (*Section) IsBodyElement

func (s *Section) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Section) Prepare

func (s *Section) Prepare()

Prepare renders the Section component into its internal buffer.

func (*Section) Render

func (s *Section) Render() []byte

Render returns freshly prepared Section HTML bytes.

func (*Section) String

func (s *Section) String() string

String returns freshly prepared Section HTML as a string.

func (*Section) Style

func (s *Section) Style(m StyleMap) *Section

Style replaces the inline CSS declarations on the Section component.

type Select

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

Select represents the HTML select element for dropdown lists

func NewSelect

func NewSelect() *Select

NewSelect creates a new Select element

func (*Select) Add

func (s *Select) Add(e Element) *Select

Add adds content to the select element

func (*Select) AddStyle

func (s *Select) AddStyle(k, v string) *Select

AddStyle adds a single CSS property

func (*Select) AddStyles

func (s *Select) AddStyles(m StyleMap) *Select

AddStyles adds multiple CSS properties

func (*Select) AutoComplete

func (s *Select) AutoComplete(autoComplete string) *Select

AutoComplete sets the autocomplete attribute

func (*Select) Autofocus

func (s *Select) Autofocus(autofocus bool) *Select

Autofocus sets the autofocus attribute

func (*Select) Bytes

func (s *Select) Bytes() []byte

Bytes returns the buffer contents

func (*Select) Disabled

func (s *Select) Disabled(disabled bool) *Select

Disabled sets the disabled attribute

func (*Select) Form

func (s *Select) Form(form string) *Select

Form sets the form attribute

func (*Select) HTML

func (s *Select) HTML() string

HTML returns freshly prepared Select HTML as a string.

func (*Select) IsBodyElement

func (s *Select) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Select) Multiple

func (s *Select) Multiple(multiple bool) *Select

Multiple sets the multiple attribute

func (*Select) Name

func (s *Select) Name(name string) *Select

Name sets the name attribute

func (*Select) Prepare

func (s *Select) Prepare()

Prepare builds the HTML for the select element

func (*Select) Render

func (s *Select) Render() []byte

Render returns freshly prepared Select HTML bytes.

func (*Select) Required

func (s *Select) Required(required bool) *Select

Required sets the required attribute

func (*Select) Size

func (s *Select) Size(size string) *Select

Size sets the size attribute

func (*Select) String

func (s *Select) String() string

String returns freshly prepared Select HTML as a string.

func (*Select) Style

func (s *Select) Style(m StyleMap) *Select

Style replaces all styles

type Slot

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

Slot represents the Slot component or supporting type.

func NewSlot

func NewSlot() *Slot

NewSlot creates a new Slot component.

func (*Slot) Add

func (s *Slot) Add(e Element) *Slot

Add appends child content to the Slot component.

func (*Slot) AddStyle

func (s *Slot) AddStyle(k, v string) *Slot

AddStyle adds one inline CSS declaration to the Slot component.

func (*Slot) AddStyles

func (s *Slot) AddStyles(m StyleMap) *Slot

AddStyles adds multiple inline CSS declarations to the Slot component.

func (*Slot) Bytes

func (s *Slot) Bytes() []byte

Bytes returns a defensive copy of the rendered Slot bytes.

func (*Slot) HTML

func (s *Slot) HTML() string

HTML returns freshly prepared Slot HTML as a string.

func (*Slot) IsBodyElement

func (s *Slot) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Slot) Name

func (s *Slot) Name(n string) *Slot

Name sets the name value on the Slot component.

func (*Slot) Prepare

func (s *Slot) Prepare()

Prepare renders the Slot component into its internal buffer.

func (*Slot) Render

func (s *Slot) Render() []byte

Render returns freshly prepared Slot HTML bytes.

func (*Slot) String

func (s *Slot) String() string

String returns freshly prepared Slot HTML as a string.

func (*Slot) Style

func (s *Slot) Style(m StyleMap) *Slot

Style replaces the inline CSS declarations on the Slot component.

type Small

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

Small represents the Small component or supporting type.

func NewSmall

func NewSmall() *Small

NewSmall creates a new Small component.

func (*Small) AddStyle

func (s *Small) AddStyle(k, v string) *Small

AddStyle adds one inline CSS declaration to the Small component.

func (*Small) AddStyles

func (s *Small) AddStyles(m StyleMap) *Small

AddStyles adds multiple inline CSS declarations to the Small component.

func (*Small) Bytes

func (s *Small) Bytes() []byte

Bytes returns a defensive copy of the rendered Small bytes.

func (*Small) HTML

func (s *Small) HTML() string

HTML returns freshly prepared Small HTML as a string.

func (*Small) IsBodyElement

func (s *Small) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Small) Prepare

func (s *Small) Prepare()

Prepare renders the Small component into its internal buffer.

func (*Small) Render

func (s *Small) Render() []byte

Render returns freshly prepared Small HTML bytes.

func (*Small) String

func (s *Small) String() string

String returns freshly prepared Small HTML as a string.

func (*Small) Style

func (s *Small) Style(m StyleMap) *Small

Style replaces the inline CSS declarations on the Small component.

func (*Small) Text

func (s *Small) Text(str string) *Small

Text sets or appends text content on the Small component.

type Source

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

Source represents the Source component or supporting type.

func NewSource

func NewSource() *Source

NewSource creates a new Source component.

func (*Source) AddStyle

func (s *Source) AddStyle(k, v string) *Source

AddStyle adds one inline CSS declaration to the Source component.

func (*Source) AddStyles

func (s *Source) AddStyles(m StyleMap) *Source

AddStyles adds multiple inline CSS declarations to the Source component.

func (*Source) Bytes

func (s *Source) Bytes() []byte

Bytes returns a defensive copy of the rendered Source bytes.

func (*Source) HTML

func (s *Source) HTML() string

HTML returns freshly prepared Source HTML as a string.

func (*Source) IsBodyElement

func (s *Source) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Source) Media

func (s *Source) Media(media string) *Source

Media sets the media value on the Source component.

func (*Source) Prepare

func (s *Source) Prepare()

Prepare renders the Source component into its internal buffer.

func (*Source) Render

func (s *Source) Render() []byte

Render returns freshly prepared Source HTML bytes.

func (*Source) Sizes

func (s *Source) Sizes(sizes string) *Source

Sizes sets the sizes value on the Source component.

func (*Source) Src

func (s *Source) Src(src string) *Source

Src sets the src value on the Source component.

func (*Source) Srcset

func (s *Source) Srcset(srcset string) *Source

Srcset sets the srcset value on the Source component.

func (*Source) String

func (s *Source) String() string

String returns freshly prepared Source HTML as a string.

func (*Source) Style

func (s *Source) Style(m StyleMap) *Source

Style replaces the inline CSS declarations on the Source component.

func (*Source) Type

func (s *Source) Type(srcType string) *Source

Type sets the type value on the Source component.

type Span

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

Span represents the Span component or supporting type.

func NewSpan

func NewSpan() *Span

NewSpan creates a new Span component.

func (*Span) AddStyle

func (s *Span) AddStyle(k, v string) *Span

AddStyle adds one inline CSS declaration to the Span component.

func (*Span) AddStyles

func (s *Span) AddStyles(m StyleMap) *Span

AddStyles adds multiple inline CSS declarations to the Span component.

func (*Span) Bytes

func (s *Span) Bytes() []byte

Bytes returns a defensive copy of the rendered Span bytes.

func (*Span) HTML

func (s *Span) HTML() string

HTML returns freshly prepared Span HTML as a string.

func (*Span) IsBodyElement

func (s *Span) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Span) Prepare

func (s *Span) Prepare()

Prepare renders the Span component into its internal buffer.

func (*Span) Render

func (s *Span) Render() []byte

Render returns freshly prepared Span HTML bytes.

func (*Span) String

func (s *Span) String() string

String returns freshly prepared Span HTML as a string.

func (*Span) Style

func (s *Span) Style(m StyleMap) *Span

Style replaces the inline CSS declarations on the Span component.

func (*Span) Text

func (s *Span) Text(str string) *Span

Text sets or appends text content on the Span component.

type Strong

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

Strong represents the Strong component or supporting type.

func NewStrong

func NewStrong() *Strong

NewStrong creates a new Strong component.

func (*Strong) AddStyle

func (s *Strong) AddStyle(k, v string) *Strong

AddStyle adds one inline CSS declaration to the Strong component.

func (*Strong) AddStyles

func (s *Strong) AddStyles(m StyleMap) *Strong

AddStyles adds multiple inline CSS declarations to the Strong component.

func (*Strong) Bytes

func (s *Strong) Bytes() []byte

Bytes returns a defensive copy of the rendered Strong bytes.

func (*Strong) HTML

func (s *Strong) HTML() string

HTML returns freshly prepared Strong HTML as a string.

func (*Strong) IsBodyElement

func (s *Strong) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Strong) Prepare

func (s *Strong) Prepare()

Prepare renders the Strong component into its internal buffer.

func (*Strong) Render

func (s *Strong) Render() []byte

Render returns freshly prepared Strong HTML bytes.

func (*Strong) String

func (s *Strong) String() string

String returns freshly prepared Strong HTML as a string.

func (*Strong) Style

func (s *Strong) Style(m StyleMap) *Strong

Style replaces the inline CSS declarations on the Strong component.

func (*Strong) Text

func (s *Strong) Text(str string) *Strong

Text sets or appends text content on the Strong component.

type Style

type Style struct {
	Props StyleMap
	Tags  []string
	// contains filtered or unexported fields
}

Style renders a complete style element for one selector rule.

func NewStyle

func NewStyle(tags ...string) *Style

NewStyle creates a style element for one CSS selector rule.

func (*Style) AddStyle

func (s *Style) AddStyle(k, v string) *Style

AddStyle adds one CSS declaration to the style rule.

func (*Style) AddStyles

func (s *Style) AddStyles(styles StyleMap) *Style

AddStyles adds CSS declarations to the style rule.

func (*Style) Bytes

func (s *Style) Bytes() []byte

Bytes returns a defensive copy of the rendered Style bytes.

func (*Style) HTML

func (s *Style) HTML() string

HTML returns freshly prepared Style HTML as a string.

func (*Style) IsHeadElement

func (s *Style) IsHeadElement()

IsHeadElement implements HeadElement interface.

func (*Style) Prepare

func (s *Style) Prepare()

Prepare renders the Style component into its internal buffer.

func (*Style) Render

func (s *Style) Render() []byte

Render returns freshly prepared Style HTML bytes.

func (*Style) String

func (s *Style) String() string

String returns freshly prepared Style HTML as a string.

func (*Style) Style

func (s *Style) Style(styles StyleMap) *Style

Style replaces CSS declarations on the style rule.

type StyleElement

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

StyleElement represents the HTML style element for CSS styles

func NewStyleElement

func NewStyleElement() *StyleElement

NewStyleElement creates a new StyleElement element

func (*StyleElement) Add

func (s *StyleElement) Add(e Element) *StyleElement

Add adds content to the style element

func (*StyleElement) AddRule

func (s *StyleElement) AddRule(rule CSSRule) *StyleElement

AddRule appends typed CSS rule content to the style element.

func (*StyleElement) AddStyle

func (s *StyleElement) AddStyle(k, v string) *StyleElement

AddStyle adds a single CSS property

func (*StyleElement) AddStyles

func (s *StyleElement) AddStyles(m StyleMap) *StyleElement

AddStyles adds multiple CSS properties

func (*StyleElement) Bytes

func (s *StyleElement) Bytes() []byte

Bytes returns the buffer contents

func (*StyleElement) HTML

func (s *StyleElement) HTML() string

HTML returns freshly prepared StyleElement HTML as a string.

func (*StyleElement) IsBodyElement

func (s *StyleElement) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*StyleElement) IsHeadElement

func (s *StyleElement) IsHeadElement()

IsHeadElement implements HeadElement interface

func (*StyleElement) Media

func (s *StyleElement) Media(media string) *StyleElement

Media sets the media attribute

func (*StyleElement) Prepare

func (s *StyleElement) Prepare()

Prepare builds the HTML for the style element

func (*StyleElement) Render

func (s *StyleElement) Render() []byte

Render returns freshly prepared StyleElement HTML bytes.

func (*StyleElement) String

func (s *StyleElement) String() string

String returns freshly prepared StyleElement HTML as a string.

func (*StyleElement) Style

func (s *StyleElement) Style(m StyleMap) *StyleElement

Style replaces all styles

func (*StyleElement) Text

func (s *StyleElement) Text(text string) *StyleElement

Text adds CSS text content to the style element

func (*StyleElement) Type

func (s *StyleElement) Type(styleType string) *StyleElement

Type sets the type attribute

type StyleMap

type StyleMap map[string]string

StyleMap holds CSS declarations as property/value pairs.

Property names are emitted exactly as provided, so standard declarations, custom properties such as --brand-color, and vendor-prefixed properties all use the same representation.

func NewStyleMap

func NewStyleMap() StyleMap

NewStyleMap returns an empty StyleMap.

type StyleRule

type StyleRule struct {
	Props StyleMap
	Tags  []string
	// contains filtered or unexported fields
}

StyleRule renders one CSS selector rule without wrapping it in a style tag.

func NewStyleRule

func NewStyleRule(tags ...string) *StyleRule

NewStyleRule creates one unwrapped selector rule.

func (*StyleRule) AddStyle

func (s *StyleRule) AddStyle(k, v string) *StyleRule

AddStyle adds one CSS declaration to the rule.

func (*StyleRule) AddStyles

func (s *StyleRule) AddStyles(styles StyleMap) *StyleRule

AddStyles adds CSS declarations to the rule.

func (*StyleRule) Bytes

func (s *StyleRule) Bytes() []byte

Bytes returns a defensive copy of the rendered StyleRule bytes.

func (*StyleRule) HTML

func (s *StyleRule) HTML() string

HTML returns freshly prepared StyleRule HTML as a string.

func (*StyleRule) IsCSSRule

func (s *StyleRule) IsCSSRule()

IsCSSRule marks StyleRule as CSS content for style elements.

func (*StyleRule) Prepare

func (s *StyleRule) Prepare()

Prepare renders the StyleRule component into its internal buffer.

func (*StyleRule) Render

func (s *StyleRule) Render() []byte

Render returns freshly prepared StyleRule HTML bytes.

func (*StyleRule) String

func (s *StyleRule) String() string

String returns freshly prepared StyleRule HTML as a string.

func (*StyleRule) Style

func (s *StyleRule) Style(styles StyleMap) *StyleRule

Style replaces CSS declarations on the rule.

type Sub

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

Sub represents the Sub component or supporting type.

func NewSub

func NewSub() *Sub

NewSub creates a new Sub component.

func (*Sub) AddStyle

func (s *Sub) AddStyle(k, v string) *Sub

AddStyle adds one inline CSS declaration to the Sub component.

func (*Sub) AddStyles

func (s *Sub) AddStyles(m StyleMap) *Sub

AddStyles adds multiple inline CSS declarations to the Sub component.

func (*Sub) Bytes

func (s *Sub) Bytes() []byte

Bytes returns a defensive copy of the rendered Sub bytes.

func (*Sub) HTML

func (s *Sub) HTML() string

HTML returns freshly prepared Sub HTML as a string.

func (*Sub) IsBodyElement

func (s *Sub) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Sub) Prepare

func (s *Sub) Prepare()

Prepare renders the Sub component into its internal buffer.

func (*Sub) Render

func (s *Sub) Render() []byte

Render returns freshly prepared Sub HTML bytes.

func (*Sub) String

func (s *Sub) String() string

String returns freshly prepared Sub HTML as a string.

func (*Sub) Style

func (s *Sub) Style(m StyleMap) *Sub

Style replaces the inline CSS declarations on the Sub component.

func (*Sub) Text

func (s *Sub) Text(str string) *Sub

Text sets or appends text content on the Sub component.

type Summary

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

Summary represents the HTML summary element for details disclosure summary

func NewSummary

func NewSummary() *Summary

NewSummary creates a new Summary element

func (*Summary) Add

func (s *Summary) Add(e Element) *Summary

Add adds content to the summary element

func (*Summary) AddStyle

func (s *Summary) AddStyle(k, v string) *Summary

AddStyle adds a single CSS property

func (*Summary) AddStyles

func (s *Summary) AddStyles(m StyleMap) *Summary

AddStyles adds multiple CSS properties

func (*Summary) Bytes

func (s *Summary) Bytes() []byte

Bytes returns the buffer contents

func (*Summary) HTML

func (s *Summary) HTML() string

HTML returns freshly prepared Summary HTML as a string.

func (*Summary) IsBodyElement

func (s *Summary) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Summary) Prepare

func (s *Summary) Prepare()

Prepare builds the HTML for the summary element

func (*Summary) Render

func (s *Summary) Render() []byte

Render returns freshly prepared Summary HTML bytes.

func (*Summary) String

func (s *Summary) String() string

String returns freshly prepared Summary HTML as a string.

func (*Summary) Style

func (s *Summary) Style(m StyleMap) *Summary

Style replaces all styles

type Sup

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

Sup represents the Sup component or supporting type.

func NewSup

func NewSup() *Sup

NewSup creates a new Sup component.

func (*Sup) AddStyle

func (s *Sup) AddStyle(k, v string) *Sup

AddStyle adds one inline CSS declaration to the Sup component.

func (*Sup) AddStyles

func (s *Sup) AddStyles(m StyleMap) *Sup

AddStyles adds multiple inline CSS declarations to the Sup component.

func (*Sup) Bytes

func (s *Sup) Bytes() []byte

Bytes returns a defensive copy of the rendered Sup bytes.

func (*Sup) HTML

func (s *Sup) HTML() string

HTML returns freshly prepared Sup HTML as a string.

func (*Sup) IsBodyElement

func (s *Sup) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Sup) Prepare

func (s *Sup) Prepare()

Prepare renders the Sup component into its internal buffer.

func (*Sup) Render

func (s *Sup) Render() []byte

Render returns freshly prepared Sup HTML bytes.

func (*Sup) String

func (s *Sup) String() string

String returns freshly prepared Sup HTML as a string.

func (*Sup) Style

func (s *Sup) Style(m StyleMap) *Sup

Style replaces the inline CSS declarations on the Sup component.

func (*Sup) Text

func (s *Sup) Text(str string) *Sup

Text sets or appends text content on the Sup component.

type Svg

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

Svg represents an inline SVG element.

func NewSvg

func NewSvg() *Svg

NewSvg creates an SVG element with the default SVG namespace.

func (*Svg) Add

func (s *Svg) Add(e Element) *Svg

Add appends child SVG content.

func (*Svg) AddStyle

func (s *Svg) AddStyle(k, v string) *Svg

AddStyle adds one inline CSS declaration to the SVG element.

func (*Svg) AddStyles

func (s *Svg) AddStyles(m StyleMap) *Svg

AddStyles adds multiple inline CSS declarations to the SVG element.

func (*Svg) BaseProfile

func (s *Svg) BaseProfile(baseProfile string) *Svg

BaseProfile sets the SVG baseProfile attribute.

func (*Svg) Bytes

func (s *Svg) Bytes() []byte

Bytes returns a defensive copy of the rendered SVG bytes.

func (*Svg) HTML

func (s *Svg) HTML() string

HTML returns freshly prepared Svg HTML as a string.

func (*Svg) Height

func (s *Svg) Height(height string) *Svg

Height sets the SVG height attribute.

func (*Svg) IsBodyElement

func (s *Svg) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Svg) Prepare

func (s *Svg) Prepare()

Prepare renders the SVG element into its internal buffer.

func (*Svg) PreserveAspectRatio

func (s *Svg) PreserveAspectRatio(preserveAspectRatio string) *Svg

PreserveAspectRatio sets the SVG preserveAspectRatio attribute.

func (*Svg) Render

func (s *Svg) Render() []byte

Render returns freshly prepared Svg HTML bytes.

func (*Svg) String

func (s *Svg) String() string

String returns freshly prepared Svg HTML as a string.

func (*Svg) Style

func (s *Svg) Style(m StyleMap) *Svg

Style replaces the inline CSS declarations on the SVG element.

func (*Svg) Version

func (s *Svg) Version(version string) *Svg

Version sets the SVG version attribute.

func (*Svg) ViewBox

func (s *Svg) ViewBox(viewBox string) *Svg

ViewBox sets the SVG viewBox attribute.

func (*Svg) Width

func (s *Svg) Width(width string) *Svg

Width sets the SVG width attribute.

func (*Svg) Xmlns

func (s *Svg) Xmlns(xmlns string) *Svg

Xmlns replaces the SVG namespace attribute.

type Table

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

Table represents the Table component or supporting type.

func NewTable

func NewTable() *Table

NewTable creates a new Table component.

func (*Table) AddCaption

func (t *Table) AddCaption(c *Caption) *Table

AddCaption sets the addcaption value on the Table component.

func (*Table) AddClass

func (t *Table) AddClass(s string) *Table

AddClass sets the addclass value on the Table component.

func (*Table) AddClasses

func (t *Table) AddClasses(s []string) *Table

AddClasses sets the addclasses value on the Table component.

func (*Table) AddHeader

func (t *Table) AddHeader(s string) *Table

AddHeader sets the addheader value on the Table component.

func (*Table) AddHeaders

func (t *Table) AddHeaders(s []string) *Table

AddHeaders sets the addheaders value on the Table component.

func (*Table) AddId

func (t *Table) AddId(s string) *Table

AddId sets the addid value on the Table component.

func (*Table) AddRow

func (t *Table) AddRow(s []string) *Table

AddRow sets the addrow value on the Table component.

func (*Table) AddRows

func (t *Table) AddRows(s [][]string) *Table

AddRows sets the addrows value on the Table component.

func (*Table) AddStyle

func (t *Table) AddStyle(k, v string) *Table

AddStyle adds one inline CSS declaration to the Table component.

func (*Table) AddStyles

func (t *Table) AddStyles(m StyleMap) *Table

AddStyles adds multiple inline CSS declarations to the Table component.

func (*Table) AddTbody

func (t *Table) AddTbody(tb *Tbody) *Table

AddTbody sets the addtbody value on the Table component.

func (*Table) AddTfoot

func (t *Table) AddTfoot(tf *Tfoot) *Table

AddTfoot sets the addtfoot value on the Table component.

func (*Table) AddThead

func (t *Table) AddThead(th *Thead) *Table

AddThead sets the addthead value on the Table component.

func (*Table) AddTr

func (t *Table) AddTr(tr *Tr) *Table

AddTr sets the addtr value on the Table component.

func (*Table) Bytes

func (t *Table) Bytes() []byte

Bytes returns a defensive copy of the rendered Table bytes.

func (*Table) Class

func (t *Table) Class(s []string) *Table

Class sets the class value on the Table component.

func (*Table) HTML

func (t *Table) HTML() string

HTML returns freshly prepared Table HTML as a string.

func (*Table) Headers

func (t *Table) Headers(s []string) *Table

Headers sets the headers value on the Table component.

func (*Table) Id

func (t *Table) Id(s string) *Table

Id sets the id value on the Table component.

func (*Table) IsBodyElement

func (t *Table) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Table) Prepare

func (t *Table) Prepare()

Prepare renders the Table component into its internal buffer.

func (*Table) Render

func (t *Table) Render() []byte

Render returns freshly prepared Table HTML bytes.

func (*Table) Rows

func (t *Table) Rows(s [][]string) *Table

Rows sets the rows value on the Table component.

func (*Table) String

func (t *Table) String() string

String returns freshly prepared Table HTML as a string.

func (*Table) Styles

func (t *Table) Styles(m StyleMap) *Table

Styles replaces the inline CSS declarations on the Table component.

type Tbody

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

Tbody represents the Tbody component or supporting type.

func NewTbody

func NewTbody() *Tbody

NewTbody creates a new Tbody component.

func (*Tbody) AddClass

func (tb *Tbody) AddClass(s string) *Tbody

AddClass sets the addclass value on the Tbody component.

func (*Tbody) AddClasses

func (tb *Tbody) AddClasses(s []string) *Tbody

AddClasses sets the addclasses value on the Tbody component.

func (*Tbody) AddId

func (tb *Tbody) AddId(s string) *Tbody

AddId sets the addid value on the Tbody component.

func (*Tbody) AddStyle

func (tb *Tbody) AddStyle(k, v string) *Tbody

AddStyle adds one inline CSS declaration to the Tbody component.

func (*Tbody) AddStyles

func (tb *Tbody) AddStyles(m StyleMap) *Tbody

AddStyles adds multiple inline CSS declarations to the Tbody component.

func (*Tbody) AddTr

func (tb *Tbody) AddTr(tr *Tr) *Tbody

AddTr sets the addtr value on the Tbody component.

func (*Tbody) Bytes

func (tb *Tbody) Bytes() []byte

Bytes returns a defensive copy of the rendered Tbody bytes.

func (*Tbody) Class

func (tb *Tbody) Class(s []string) *Tbody

Class sets the class value on the Tbody component.

func (*Tbody) HTML

func (t *Tbody) HTML() string

HTML returns freshly prepared Tbody HTML as a string.

func (*Tbody) Id

func (tb *Tbody) Id(s string) *Tbody

Id sets the id value on the Tbody component.

func (*Tbody) IsBodyElement

func (tb *Tbody) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Tbody) Prepare

func (tb *Tbody) Prepare()

Prepare renders the Tbody component into its internal buffer.

func (*Tbody) Render

func (t *Tbody) Render() []byte

Render returns freshly prepared Tbody HTML bytes.

func (*Tbody) String

func (t *Tbody) String() string

String returns freshly prepared Tbody HTML as a string.

func (*Tbody) Styles

func (tb *Tbody) Styles(m StyleMap) *Tbody

Styles replaces the inline CSS declarations on the Tbody component.

type Td

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

Td represents the Td component or supporting type.

func NewTd

func NewTd() *Td

NewTd creates a new Td component.

func (*Td) Add

func (td *Td) Add(e Element) *Td

Add appends child content to the Td component.

func (*Td) AddClass

func (td *Td) AddClass(s string) *Td

AddClass sets the addclass value on the Td component.

func (*Td) AddClasses

func (td *Td) AddClasses(s []string) *Td

AddClasses sets the addclasses value on the Td component.

func (*Td) AddId

func (td *Td) AddId(s string) *Td

AddId sets the addid value on the Td component.

func (*Td) AddStyle

func (td *Td) AddStyle(k, v string) *Td

AddStyle adds one inline CSS declaration to the Td component.

func (*Td) AddStyles

func (td *Td) AddStyles(m StyleMap) *Td

AddStyles adds multiple inline CSS declarations to the Td component.

func (*Td) Bytes

func (td *Td) Bytes() []byte

Bytes returns a defensive copy of the rendered Td bytes.

func (*Td) Class

func (td *Td) Class(s []string) *Td

Class sets the class value on the Td component.

func (*Td) Colspan

func (td *Td) Colspan(c int) *Td

Colspan sets the colspan value on the Td component.

func (*Td) HTML

func (t *Td) HTML() string

HTML returns freshly prepared Td HTML as a string.

func (*Td) Id

func (td *Td) Id(s string) *Td

Id sets the id value on the Td component.

func (*Td) IsBodyElement

func (td *Td) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Td) Prepare

func (td *Td) Prepare()

Prepare renders the Td component into its internal buffer.

func (*Td) Render

func (t *Td) Render() []byte

Render returns freshly prepared Td HTML bytes.

func (*Td) Rowspan

func (td *Td) Rowspan(r int) *Td

Rowspan sets the rowspan value on the Td component.

func (*Td) String

func (t *Td) String() string

String returns freshly prepared Td HTML as a string.

func (*Td) Styles

func (td *Td) Styles(m StyleMap) *Td

Styles replaces the inline CSS declarations on the Td component.

type Template

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

Template represents the Template component or supporting type.

func NewTemplate

func NewTemplate() *Template

NewTemplate creates a new Template component.

func (*Template) Add

func (t *Template) Add(e Element) *Template

Add appends child content to the Template component.

func (*Template) AddStyle

func (t *Template) AddStyle(k, v string) *Template

AddStyle adds one inline CSS declaration to the Template component.

func (*Template) AddStyles

func (t *Template) AddStyles(m StyleMap) *Template

AddStyles adds multiple inline CSS declarations to the Template component.

func (*Template) Bytes

func (t *Template) Bytes() []byte

Bytes returns a defensive copy of the rendered Template bytes.

func (*Template) HTML

func (t *Template) HTML() string

HTML returns freshly prepared Template HTML as a string.

func (*Template) Id

func (t *Template) Id(i string) *Template

Id sets the id value on the Template component.

func (*Template) IsBodyElement

func (t *Template) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Template) IsHeadElement

func (t *Template) IsHeadElement()

IsHeadElement implements HeadElement interface

func (*Template) Prepare

func (t *Template) Prepare()

Prepare renders the Template component into its internal buffer.

func (*Template) Render

func (t *Template) Render() []byte

Render returns freshly prepared Template HTML bytes.

func (*Template) String

func (t *Template) String() string

String returns freshly prepared Template HTML as a string.

func (*Template) Style

func (t *Template) Style(m StyleMap) *Template

Style replaces the inline CSS declarations on the Template component.

type Textarea

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

Textarea represents the HTML textarea element for multi-line text input

func NewTextarea

func NewTextarea() *Textarea

NewTextarea creates a new Textarea element

func (*Textarea) Add

func (t *Textarea) Add(e Element) *Textarea

Add adds content to the textarea element

func (*Textarea) AddStyle

func (t *Textarea) AddStyle(k, v string) *Textarea

AddStyle adds a single CSS property

func (*Textarea) AddStyles

func (t *Textarea) AddStyles(m StyleMap) *Textarea

AddStyles adds multiple CSS properties

func (*Textarea) AutoComplete

func (t *Textarea) AutoComplete(autoComplete string) *Textarea

AutoComplete sets the autocomplete attribute

func (*Textarea) Autofocus

func (t *Textarea) Autofocus(autofocus bool) *Textarea

Autofocus sets the autofocus attribute

func (*Textarea) Bytes

func (t *Textarea) Bytes() []byte

Bytes returns the buffer contents

func (*Textarea) Cols

func (t *Textarea) Cols(cols string) *Textarea

Cols sets the cols attribute

func (*Textarea) Disabled

func (t *Textarea) Disabled(disabled bool) *Textarea

Disabled sets the disabled attribute

func (*Textarea) Form

func (t *Textarea) Form(form string) *Textarea

Form sets the form attribute

func (*Textarea) HTML

func (t *Textarea) HTML() string

HTML returns freshly prepared Textarea HTML as a string.

func (*Textarea) IsBodyElement

func (t *Textarea) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Textarea) MaxLength

func (t *Textarea) MaxLength(maxLength string) *Textarea

MaxLength sets the maxlength attribute

func (*Textarea) MinLength

func (t *Textarea) MinLength(minLength string) *Textarea

MinLength sets the minlength attribute

func (*Textarea) Name

func (t *Textarea) Name(name string) *Textarea

Name sets the name attribute

func (*Textarea) Placeholder

func (t *Textarea) Placeholder(placeholder string) *Textarea

Placeholder sets the placeholder attribute

func (*Textarea) Prepare

func (t *Textarea) Prepare()

Prepare builds the HTML for the textarea element

func (*Textarea) Readonly

func (t *Textarea) Readonly(readonly bool) *Textarea

Readonly sets the readonly attribute

func (*Textarea) Render

func (t *Textarea) Render() []byte

Render returns freshly prepared Textarea HTML bytes.

func (*Textarea) Required

func (t *Textarea) Required(required bool) *Textarea

Required sets the required attribute

func (*Textarea) Rows

func (t *Textarea) Rows(rows string) *Textarea

Rows sets the rows attribute

func (*Textarea) Spellcheck

func (t *Textarea) Spellcheck(spellcheck string) *Textarea

Spellcheck sets the spellcheck attribute

func (*Textarea) String

func (t *Textarea) String() string

String returns freshly prepared Textarea HTML as a string.

func (*Textarea) Style

func (t *Textarea) Style(m StyleMap) *Textarea

Style replaces all styles

func (*Textarea) Text

func (t *Textarea) Text(text string) *Textarea

Text adds text content to the textarea element

func (*Textarea) Wrap

func (t *Textarea) Wrap(wrap string) *Textarea

Wrap sets the wrap attribute

type Tfoot

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

Tfoot represents the Tfoot component or supporting type.

func NewTfoot

func NewTfoot() *Tfoot

NewTfoot creates a new Tfoot component.

func (*Tfoot) AddClass

func (tf *Tfoot) AddClass(s string) *Tfoot

AddClass sets the addclass value on the Tfoot component.

func (*Tfoot) AddClasses

func (tf *Tfoot) AddClasses(s []string) *Tfoot

AddClasses sets the addclasses value on the Tfoot component.

func (*Tfoot) AddId

func (tf *Tfoot) AddId(s string) *Tfoot

AddId sets the addid value on the Tfoot component.

func (*Tfoot) AddStyle

func (tf *Tfoot) AddStyle(k, v string) *Tfoot

AddStyle adds one inline CSS declaration to the Tfoot component.

func (*Tfoot) AddStyles

func (tf *Tfoot) AddStyles(m StyleMap) *Tfoot

AddStyles adds multiple inline CSS declarations to the Tfoot component.

func (*Tfoot) AddTr

func (tf *Tfoot) AddTr(tr *Tr) *Tfoot

AddTr sets the addtr value on the Tfoot component.

func (*Tfoot) Bytes

func (tf *Tfoot) Bytes() []byte

Bytes returns a defensive copy of the rendered Tfoot bytes.

func (*Tfoot) Class

func (tf *Tfoot) Class(s []string) *Tfoot

Class sets the class value on the Tfoot component.

func (*Tfoot) HTML

func (t *Tfoot) HTML() string

HTML returns freshly prepared Tfoot HTML as a string.

func (*Tfoot) Id

func (tf *Tfoot) Id(s string) *Tfoot

Id sets the id value on the Tfoot component.

func (*Tfoot) IsBodyElement

func (tf *Tfoot) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Tfoot) Prepare

func (tf *Tfoot) Prepare()

Prepare renders the Tfoot component into its internal buffer.

func (*Tfoot) Render

func (t *Tfoot) Render() []byte

Render returns freshly prepared Tfoot HTML bytes.

func (*Tfoot) String

func (t *Tfoot) String() string

String returns freshly prepared Tfoot HTML as a string.

func (*Tfoot) Styles

func (tf *Tfoot) Styles(m StyleMap) *Tfoot

Styles replaces the inline CSS declarations on the Tfoot component.

type Th

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

Th represents the Th component or supporting type.

func NewTh

func NewTh() *Th

NewTh creates a new Th component.

func (*Th) Add

func (th *Th) Add(e Element) *Th

Add appends child content to the Th component.

func (*Th) AddClass

func (th *Th) AddClass(s string) *Th

AddClass sets the addclass value on the Th component.

func (*Th) AddClasses

func (th *Th) AddClasses(s []string) *Th

AddClasses sets the addclasses value on the Th component.

func (*Th) AddId

func (th *Th) AddId(s string) *Th

AddId sets the addid value on the Th component.

func (*Th) AddStyle

func (th *Th) AddStyle(k, v string) *Th

AddStyle adds one inline CSS declaration to the Th component.

func (*Th) AddStyles

func (th *Th) AddStyles(m StyleMap) *Th

AddStyles adds multiple inline CSS declarations to the Th component.

func (*Th) Bytes

func (th *Th) Bytes() []byte

Bytes returns a defensive copy of the rendered Th bytes.

func (*Th) Class

func (th *Th) Class(s []string) *Th

Class sets the class value on the Th component.

func (*Th) Colspan

func (th *Th) Colspan(c int) *Th

Colspan sets the colspan value on the Th component.

func (*Th) HTML

func (t *Th) HTML() string

HTML returns freshly prepared Th HTML as a string.

func (*Th) Id

func (th *Th) Id(s string) *Th

Id sets the id value on the Th component.

func (*Th) IsBodyElement

func (th *Th) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Th) Prepare

func (th *Th) Prepare()

Prepare renders the Th component into its internal buffer.

func (*Th) Render

func (t *Th) Render() []byte

Render returns freshly prepared Th HTML bytes.

func (*Th) Rowspan

func (th *Th) Rowspan(r int) *Th

Rowspan sets the rowspan value on the Th component.

func (*Th) Scope

func (th *Th) Scope(s string) *Th

Scope sets the scope value on the Th component.

func (*Th) String

func (t *Th) String() string

String returns freshly prepared Th HTML as a string.

func (*Th) Styles

func (th *Th) Styles(m StyleMap) *Th

Styles replaces the inline CSS declarations on the Th component.

type Thead

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

Thead represents the Thead component or supporting type.

func NewThead

func NewThead() *Thead

NewThead creates a new Thead component.

func (*Thead) AddClass

func (th *Thead) AddClass(s string) *Thead

AddClass sets the addclass value on the Thead component.

func (*Thead) AddClasses

func (th *Thead) AddClasses(s []string) *Thead

AddClasses sets the addclasses value on the Thead component.

func (*Thead) AddId

func (th *Thead) AddId(s string) *Thead

AddId sets the addid value on the Thead component.

func (*Thead) AddStyle

func (th *Thead) AddStyle(k, v string) *Thead

AddStyle adds one inline CSS declaration to the Thead component.

func (*Thead) AddStyles

func (th *Thead) AddStyles(m StyleMap) *Thead

AddStyles adds multiple inline CSS declarations to the Thead component.

func (*Thead) AddTr

func (th *Thead) AddTr(tr *Tr) *Thead

AddTr sets the addtr value on the Thead component.

func (*Thead) Bytes

func (th *Thead) Bytes() []byte

Bytes returns a defensive copy of the rendered Thead bytes.

func (*Thead) Class

func (th *Thead) Class(s []string) *Thead

Class sets the class value on the Thead component.

func (*Thead) HTML

func (t *Thead) HTML() string

HTML returns freshly prepared Thead HTML as a string.

func (*Thead) Id

func (th *Thead) Id(s string) *Thead

Id sets the id value on the Thead component.

func (*Thead) IsBodyElement

func (th *Thead) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Thead) Prepare

func (th *Thead) Prepare()

Prepare renders the Thead component into its internal buffer.

func (*Thead) Render

func (t *Thead) Render() []byte

Render returns freshly prepared Thead HTML bytes.

func (*Thead) String

func (t *Thead) String() string

String returns freshly prepared Thead HTML as a string.

func (*Thead) Styles

func (th *Thead) Styles(m StyleMap) *Thead

Styles replaces the inline CSS declarations on the Thead component.

type Time

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

Time represents the HTML time element and its machine-readable datetime value.

func NewTime

func NewTime() *Time

NewTime creates a time element.

func (*Time) AddStyle

func (t *Time) AddStyle(k, v string) *Time

AddStyle adds one inline CSS declaration to the time element.

func (*Time) AddStyles

func (t *Time) AddStyles(m StyleMap) *Time

AddStyles adds multiple inline CSS declarations to the time element.

func (*Time) Bytes

func (t *Time) Bytes() []byte

Bytes returns a defensive copy of the rendered Time bytes.

func (*Time) Datetime

func (t *Time) Datetime(dt string) *Time

Datetime sets the machine-readable datetime attribute when dt is valid.

func (*Time) Err

func (t *Time) Err() error

Err returns the last datetime validation error recorded on the time element.

func (*Time) HTML

func (t *Time) HTML() string

HTML returns freshly prepared Time HTML as a string.

func (*Time) IsBodyElement

func (t *Time) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Time) Prepare

func (t *Time) Prepare()

Prepare renders the Time component into its internal buffer.

func (*Time) Render

func (t *Time) Render() []byte

Render returns freshly prepared Time HTML bytes.

func (*Time) String

func (t *Time) String() string

String returns freshly prepared Time HTML as a string.

func (*Time) Style

func (t *Time) Style(m StyleMap) *Time

Style replaces the inline CSS declarations on the time element.

func (*Time) Text

func (t *Time) Text(str string) *Time

Text sets the human-readable time text.

type Title

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

Title represents the HTML title element for document title

func NewTitle

func NewTitle() *Title

NewTitle creates a new Title element

func (*Title) Add

func (t *Title) Add(e Element) *Title

Add adds content to the title element

func (*Title) AddStyle

func (t *Title) AddStyle(k, v string) *Title

AddStyle adds a single CSS property

func (*Title) AddStyles

func (t *Title) AddStyles(m StyleMap) *Title

AddStyles adds multiple CSS properties

func (*Title) Bytes

func (t *Title) Bytes() []byte

Bytes returns the buffer contents

func (*Title) HTML

func (t *Title) HTML() string

HTML returns freshly prepared Title HTML as a string.

func (*Title) IsHeadElement

func (t *Title) IsHeadElement()

IsHeadElement implements HeadElement interface

func (*Title) Prepare

func (t *Title) Prepare()

Prepare builds the HTML for the title element

func (*Title) Render

func (t *Title) Render() []byte

Render returns freshly prepared Title HTML bytes.

func (*Title) String

func (t *Title) String() string

String returns freshly prepared Title HTML as a string.

func (*Title) Style

func (t *Title) Style(m StyleMap) *Title

Style replaces all styles

func (*Title) Text

func (t *Title) Text(text string) *Title

Text adds text content to the title element

type Tr

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

Tr represents the Tr component or supporting type.

func NewTr

func NewTr() *Tr

NewTr creates a new Tr component.

func (*Tr) AddClass

func (tr *Tr) AddClass(s string) *Tr

AddClass sets the addclass value on the Tr component.

func (*Tr) AddClasses

func (tr *Tr) AddClasses(s []string) *Tr

AddClasses sets the addclasses value on the Tr component.

func (*Tr) AddId

func (tr *Tr) AddId(s string) *Tr

AddId sets the addid value on the Tr component.

func (*Tr) AddStyle

func (tr *Tr) AddStyle(k, v string) *Tr

AddStyle adds one inline CSS declaration to the Tr component.

func (*Tr) AddStyles

func (tr *Tr) AddStyles(m StyleMap) *Tr

AddStyles adds multiple inline CSS declarations to the Tr component.

func (*Tr) AddTd

func (tr *Tr) AddTd(td *Td) *Tr

AddTd sets the addtd value on the Tr component.

func (*Tr) AddTh

func (tr *Tr) AddTh(th *Th) *Tr

AddTh sets the addth value on the Tr component.

func (*Tr) Bytes

func (tr *Tr) Bytes() []byte

Bytes returns a defensive copy of the rendered Tr bytes.

func (*Tr) Class

func (tr *Tr) Class(s []string) *Tr

Class sets the class value on the Tr component.

func (*Tr) HTML

func (t *Tr) HTML() string

HTML returns freshly prepared Tr HTML as a string.

func (*Tr) Id

func (tr *Tr) Id(s string) *Tr

Id sets the id value on the Tr component.

func (*Tr) IsBodyElement

func (tr *Tr) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Tr) Prepare

func (tr *Tr) Prepare()

Prepare renders the Tr component into its internal buffer.

func (*Tr) Render

func (t *Tr) Render() []byte

Render returns freshly prepared Tr HTML bytes.

func (*Tr) String

func (t *Tr) String() string

String returns freshly prepared Tr HTML as a string.

func (*Tr) Styles

func (tr *Tr) Styles(m StyleMap) *Tr

Styles replaces the inline CSS declarations on the Tr component.

type Track

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

Track represents the Track component or supporting type.

func NewTrack

func NewTrack() *Track

NewTrack creates a new Track component.

func (*Track) AddStyle

func (t *Track) AddStyle(k, v string) *Track

AddStyle adds one inline CSS declaration to the Track component.

func (*Track) AddStyles

func (t *Track) AddStyles(m StyleMap) *Track

AddStyles adds multiple inline CSS declarations to the Track component.

func (*Track) Bytes

func (t *Track) Bytes() []byte

Bytes returns a defensive copy of the rendered Track bytes.

func (*Track) Default

func (t *Track) Default(def bool) *Track

Default sets the default value on the Track component.

func (*Track) HTML

func (t *Track) HTML() string

HTML returns freshly prepared Track HTML as a string.

func (*Track) IsBodyElement

func (t *Track) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Track) Kind

func (t *Track) Kind(kind string) *Track

Kind sets the kind value on the Track component.

func (*Track) Label

func (t *Track) Label(label string) *Track

Label sets the label value on the Track component.

func (*Track) Prepare

func (t *Track) Prepare()

Prepare renders the Track component into its internal buffer.

func (*Track) Render

func (t *Track) Render() []byte

Render returns freshly prepared Track HTML bytes.

func (*Track) Src

func (t *Track) Src(src string) *Track

Src sets the src value on the Track component.

func (*Track) Srclang

func (t *Track) Srclang(srclang string) *Track

Srclang sets the srclang value on the Track component.

func (*Track) String

func (t *Track) String() string

String returns freshly prepared Track HTML as a string.

func (*Track) Style

func (t *Track) Style(m StyleMap) *Track

Style replaces the inline CSS declarations on the Track component.

type U

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

U represents the U component or supporting type.

func NewU

func NewU() *U

NewU creates a new U component.

func (*U) AddStyle

func (u *U) AddStyle(k, v string) *U

AddStyle adds one inline CSS declaration to the U component.

func (*U) AddStyles

func (u *U) AddStyles(m StyleMap) *U

AddStyles adds multiple inline CSS declarations to the U component.

func (*U) Bytes

func (u *U) Bytes() []byte

Bytes returns a defensive copy of the rendered U bytes.

func (*U) HTML

func (u *U) HTML() string

HTML returns freshly prepared U HTML as a string.

func (*U) IsBodyElement

func (u *U) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*U) Prepare

func (u *U) Prepare()

Prepare renders the U component into its internal buffer.

func (*U) Render

func (u *U) Render() []byte

Render returns freshly prepared U HTML bytes.

func (*U) String

func (u *U) String() string

String returns freshly prepared U HTML as a string.

func (*U) Style

func (u *U) Style(m StyleMap) *U

Style replaces the inline CSS declarations on the U component.

func (*U) Text

func (u *U) Text(s string) *U

Text sets or appends text content on the U component.

type Ul

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

Ul represents the Ul component or supporting type.

func NewUl

func NewUl() *Ul

NewUl creates a new Ul component.

func (*Ul) Add

func (u *Ul) Add(e Element) *Ul

Add appends child content to the Ul component.

func (*Ul) AddStyle

func (u *Ul) AddStyle(k, v string) *Ul

AddStyle adds one inline CSS declaration to the Ul component.

func (*Ul) AddStyles

func (u *Ul) AddStyles(m StyleMap) *Ul

AddStyles adds multiple inline CSS declarations to the Ul component.

func (*Ul) Bytes

func (u *Ul) Bytes() []byte

Bytes returns a defensive copy of the rendered Ul bytes.

func (*Ul) HTML

func (u *Ul) HTML() string

HTML returns freshly prepared Ul HTML as a string.

func (*Ul) IsBodyElement

func (u *Ul) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Ul) Prepare

func (u *Ul) Prepare()

Prepare renders the Ul component into its internal buffer.

func (*Ul) Render

func (u *Ul) Render() []byte

Render returns freshly prepared Ul HTML bytes.

func (*Ul) String

func (u *Ul) String() string

String returns freshly prepared Ul HTML as a string.

func (*Ul) Style

func (u *Ul) Style(m StyleMap) *Ul

Style replaces the inline CSS declarations on the Ul component.

type Var

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

Var represents the Var component or supporting type.

func NewVar

func NewVar() *Var

NewVar creates a new Var component.

func (*Var) AddStyle

func (v *Var) AddStyle(k, val string) *Var

AddStyle adds one inline CSS declaration to the Var component.

func (*Var) AddStyles

func (v *Var) AddStyles(m StyleMap) *Var

AddStyles adds multiple inline CSS declarations to the Var component.

func (*Var) Bytes

func (v *Var) Bytes() []byte

Bytes returns a defensive copy of the rendered Var bytes.

func (*Var) HTML

func (v *Var) HTML() string

HTML returns freshly prepared Var HTML as a string.

func (*Var) IsBodyElement

func (v *Var) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Var) Prepare

func (v *Var) Prepare()

Prepare renders the Var component into its internal buffer.

func (*Var) Render

func (v *Var) Render() []byte

Render returns freshly prepared Var HTML bytes.

func (*Var) String

func (v *Var) String() string

String returns freshly prepared Var HTML as a string.

func (*Var) Style

func (v *Var) Style(m StyleMap) *Var

Style replaces the inline CSS declarations on the Var component.

func (*Var) Text

func (v *Var) Text(str string) *Var

Text sets or appends text content on the Var component.

type Video

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

Video represents the Video component or supporting type.

func NewVideo

func NewVideo() *Video

NewVideo creates a new Video component.

func (*Video) Add

func (v *Video) Add(e Element) *Video

Add appends child content to the Video component.

func (*Video) AddStyle

func (v *Video) AddStyle(k, val string) *Video

AddStyle adds one inline CSS declaration to the Video component.

func (*Video) AddStyles

func (v *Video) AddStyles(m StyleMap) *Video

AddStyles adds multiple inline CSS declarations to the Video component.

func (*Video) Autoplay

func (v *Video) Autoplay(autoplay bool) *Video

Autoplay sets the autoplay value on the Video component.

func (*Video) Bytes

func (v *Video) Bytes() []byte

Bytes returns a defensive copy of the rendered Video bytes.

func (*Video) Controls

func (v *Video) Controls(controls bool) *Video

Controls sets the controls value on the Video component.

func (*Video) HTML

func (v *Video) HTML() string

HTML returns freshly prepared Video HTML as a string.

func (*Video) Height

func (v *Video) Height(height string) *Video

Height sets the height value on the Video component.

func (*Video) IsBodyElement

func (v *Video) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Video) Loop

func (v *Video) Loop(loop bool) *Video

Loop sets the loop value on the Video component.

func (*Video) Muted

func (v *Video) Muted(muted bool) *Video

Muted sets the muted value on the Video component.

func (*Video) Poster

func (v *Video) Poster(poster string) *Video

Poster sets the poster value on the Video component.

func (*Video) Preload

func (v *Video) Preload(preload string) *Video

Preload sets the preload value on the Video component.

func (*Video) Prepare

func (v *Video) Prepare()

Prepare renders the Video component into its internal buffer.

func (*Video) Render

func (v *Video) Render() []byte

Render returns freshly prepared Video HTML bytes.

func (*Video) Src

func (v *Video) Src(src string) *Video

Src sets the src value on the Video component.

func (*Video) String

func (v *Video) String() string

String returns freshly prepared Video HTML as a string.

func (*Video) Style

func (v *Video) Style(m StyleMap) *Video

Style replaces the inline CSS declarations on the Video component.

func (*Video) Width

func (v *Video) Width(width string) *Video

Width sets the width value on the Video component.

type Wbr

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

Wbr represents the Wbr component or supporting type.

func NewWbr

func NewWbr() *Wbr

NewWbr creates a new Wbr component.

func (*Wbr) AddStyle

func (w *Wbr) AddStyle(k, v string) *Wbr

AddStyle adds one inline CSS declaration to the Wbr component.

func (*Wbr) AddStyles

func (w *Wbr) AddStyles(m StyleMap) *Wbr

AddStyles adds multiple inline CSS declarations to the Wbr component.

func (*Wbr) Bytes

func (w *Wbr) Bytes() []byte

Bytes returns a defensive copy of the rendered Wbr bytes.

func (*Wbr) HTML

func (w *Wbr) HTML() string

HTML returns freshly prepared Wbr HTML as a string.

func (*Wbr) IsBodyElement

func (w *Wbr) IsBodyElement()

IsBodyElement implements BodyElement interface

func (*Wbr) Prepare

func (w *Wbr) Prepare()

Prepare renders the Wbr component into its internal buffer.

func (*Wbr) Render

func (w *Wbr) Render() []byte

Render returns freshly prepared Wbr HTML bytes.

func (*Wbr) String

func (w *Wbr) String() string

String returns freshly prepared Wbr HTML as a string.

func (*Wbr) Style

func (w *Wbr) Style(m StyleMap) *Wbr

Style replaces the inline CSS declarations on the Wbr component.

Jump to

Keyboard shortcuts

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