Documentation
¶
Index ¶
- func FirstValidComponent(c h.HTMLComponent) h.HTMLComponent
- func NewTag[T TagBuilderGetter[T]](dot T, name string, children ...h.HTMLComponent) T
- func SetTag[T any](t TagBuilderGetter[T], tag *h.HTMLTagBuilder)
- func Simplify(c h.HTMLComponent, cb func(c h.HTMLComponent))
- func UpdatedDot[T TagBuilderGetter[T]](dot T)
- func Walk(c h.HTMLComponent, cb func(c h.HTMLComponent) (state WalkState))
- type TagBuilder
- func (t *TagBuilder[T]) Action(v string) T
- func (t *TagBuilder[T]) Alt(v string) T
- func (t *TagBuilder[T]) AppendChild(c ...h.HTMLComponent) T
- func (t *TagBuilder[T]) Attr(vs ...interface{}) T
- func (t *TagBuilder[T]) AttrIf(key, value interface{}, add bool) T
- func (t *TagBuilder[T]) Charset(v string) T
- func (t *TagBuilder[T]) Checked(v bool) T
- func (t *TagBuilder[T]) Children(c ...h.HTMLComponent) T
- func (t *TagBuilder[T]) Class(names ...string) T
- func (t *TagBuilder[T]) ClassIf(name string, add bool) T
- func (t *TagBuilder[T]) Content(v string) T
- func (t *TagBuilder[T]) Data(vs ...string) T
- func (t *TagBuilder[T]) Disabled(v bool) T
- func (t *TagBuilder[T]) Dot() T
- func (t *TagBuilder[T]) ErrorMessages(vs ...string) T
- func (t *TagBuilder[T]) Errors(err ...error) T
- func (t *TagBuilder[T]) For(v string) T
- func (t *TagBuilder[T]) GetAttr(key string) *h.Attr
- func (t *TagBuilder[T]) GetChildren() []h.HTMLComponent
- func (t *TagBuilder[T]) GetHTMLTagBuilder() *h.HTMLTagBuilder
- func (t *TagBuilder[T]) GetTagBuilder() *TagBuilder[T]
- func (t *TagBuilder[T]) Href(v string) T
- func (t *TagBuilder[T]) ID(v string) T
- func (t *TagBuilder[T]) Method(v string) T
- func (t *TagBuilder[T]) Name(v string) T
- func (t *TagBuilder[T]) OmitEndTag() T
- func (t *TagBuilder[T]) Placeholder(v string) T
- func (t *TagBuilder[T]) PrependChild(c ...h.HTMLComponent) T
- func (t *TagBuilder[T]) Property(v string) T
- func (t *TagBuilder[T]) Readonly(v bool) T
- func (t *TagBuilder[T]) Rel(v string) T
- func (t *TagBuilder[T]) RemoveAttr(key ...string) T
- func (t *TagBuilder[T]) Required(v bool) T
- func (t *TagBuilder[T]) Role(v string) T
- func (t *TagBuilder[T]) SetAttr(k string, v interface{}) T
- func (t *TagBuilder[T]) SetTag(v string) T
- func (t *TagBuilder[T]) Src(v string) T
- func (t *TagBuilder[T]) Style(v string) T
- func (t *TagBuilder[T]) StyleIf(v string, add bool) T
- func (t *TagBuilder[T]) TabIndex(v int) T
- func (t *TagBuilder[T]) Target(v string) T
- func (t *TagBuilder[T]) Text(v string) T
- func (t *TagBuilder[T]) Title(v string) T
- func (t *TagBuilder[T]) Type(v string) T
- func (t *TagBuilder[T]) Value(v string) T
- func (t *TagBuilder[T]) Write(ctx *h.Context) (err error)
- type TagBuilderGetter
- type TagGetter
- type WalkState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FirstValidComponent ¶
func FirstValidComponent(c h.HTMLComponent) h.HTMLComponent
func NewTag ¶
func NewTag[T TagBuilderGetter[T]](dot T, name string, children ...h.HTMLComponent) T
func SetTag ¶
func SetTag[T any](t TagBuilderGetter[T], tag *h.HTMLTagBuilder)
func Simplify ¶
func Simplify(c h.HTMLComponent, cb func(c h.HTMLComponent))
Simplify Simplifies components walking over nested HTMLComponents and calls cb if component not is nil
func UpdatedDot ¶
func UpdatedDot[T TagBuilderGetter[T]](dot T)
func Walk ¶
func Walk(c h.HTMLComponent, cb func(c h.HTMLComponent) (state WalkState))
Types ¶
type TagBuilder ¶
type TagBuilder[T any] struct { // contains filtered or unexported fields }
func (*TagBuilder[T]) AppendChild ¶
func (t *TagBuilder[T]) AppendChild(c ...h.HTMLComponent) T
func (*TagBuilder[T]) Children ¶
func (t *TagBuilder[T]) Children(c ...h.HTMLComponent) T
func (*TagBuilder[T]) ErrorMessages ¶
func (t *TagBuilder[T]) ErrorMessages(vs ...string) T
func (*TagBuilder[T]) GetChildren ¶
func (t *TagBuilder[T]) GetChildren() []h.HTMLComponent
func (*TagBuilder[T]) GetHTMLTagBuilder ¶
func (t *TagBuilder[T]) GetHTMLTagBuilder() *h.HTMLTagBuilder
func (*TagBuilder[T]) GetTagBuilder ¶
func (t *TagBuilder[T]) GetTagBuilder() *TagBuilder[T]
func (*TagBuilder[T]) OmitEndTag ¶
func (t *TagBuilder[T]) OmitEndTag() T
func (*TagBuilder[T]) Placeholder ¶
func (t *TagBuilder[T]) Placeholder(v string) T
func (*TagBuilder[T]) PrependChild ¶
func (t *TagBuilder[T]) PrependChild(c ...h.HTMLComponent) T
func (*TagBuilder[T]) RemoveAttr ¶
func (t *TagBuilder[T]) RemoveAttr(key ...string) T
type TagBuilderGetter ¶
type TagGetter ¶
type TagGetter interface {
GetHTMLTagBuilder() *h.HTMLTagBuilder
}
Click to show internal directories.
Click to hide internal directories.