gox

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: MIT, MIT Imports: 6 Imported by: 39

README

GOX

Write reusable HTML in pure Go

package app

import . "github.com/creamsensation/gox"

func Page() string {
    return Render(
        Html(
            Lang("en"),
            Head(
                Title(Text("Example app")),
                Meta(Name("viewport"), Content("width=device-width,initial-scale=1.0")),
            ),
            Body(
                H1(Text("Example page")),
                P(Text("Example paragraph")),
            ),
        ),
    )
}


Main reason to use GOX

If you love Go, as I do, you love power && simplicity, then GOX is just for you.


Feel free to test, submit issues, etc...


Features


Elements

You can create HTML structure with built-in elements or create your own with factory function.
Library should contains most of elements.

Html(
  Head(
    Title()
  ),
  Body(
    Div()
  ),
)

Attributes

If you need to add attribute to element. You can create your own attributes with factory function.
Library should contains most attributes.

Button(
  Type("submit"),
  CustomData("track", "submit-button"),
)

// data-*
CustomData("*", "...")

Shared

Some elements and attributes have same names, here comes shared nodes.
All shared nodes have default node type, which can be modified with modifier node.
Because of sharing, you need to use node for content, instead of writing simple string argument.
Shared nodes are: cite, data, form, label, slot, span, style, title.

Label(Text("E-mail"))
Style(Element(), Raw("body{background:red;}"))

Raw

Sometimes you need to write custom HTML, use styles, or anything else...

Raw("body{background:blue;}")
Raw("<div>raw custom</div>")

Text

Only purpose is to write text content.

Div(Text("Example"))

Fragment

The fragment has purpose to group nodes.

Fragment(
  Div(),
  Span(),
  H1(),
)

Modifiers

When you use shared nodes, sometimes you need to change node type, then you have to use modifiers.

Label(Attribute(), Text("example label"))
Style(Element(), Raw(".text{color:red;}"))

Functions
Render

Render function transforms GOX nodes to string.
You can use multiple nodes as arguments, it automatically wraps them with Fragment.

Render(
  Div(Text("example")),
)
Write

Write function transforms GOX nodes and write them as content to provided writer as bytes.

Write(
  w,
  Div(Text("example")),
)

Directives

Directives are functions, which can be used for various operations.

If
someCondition := ...

If(someCondition, Div(Text("render if condition is true")))
Range
someSlice := []int{1,2,3}

Range(someSlice, func(item int) Node {
  return Div(Text(item))
})

Factories
Custom element

Create custom reusable element.

SomeCustomElement := CreateElement("x-custom")
Render(SomeCustomElement(Text("example content")))
Custom attribute

Create custom reusable attribute.

SomeCustomAttribute := CreateAttribute[string]("x-custom")
Render(Div(SomeCustomAttribute("custom attribute conttent"), Text("example content")))

Plugins

Custom Go struct can be used as GOX plugin, exists only one rule, must have Node method, which return gox.Node interface.

type CustomPlugin struct {
  Value string
}

func (p CustomPlugin) Node() gox.Node {
  return Div(Text(p.Value))
}

Render(
  Html(
    Body(
      CustomPlugin{ Value: "example" },
    )
  ) 
)

Components

Power of GOX approach is to create simple reusable components like React, Svelte, etc...

func UiButton(content string) Node {
  return Button(
    Class("bg-blue-400", "text-white", "rounded"),
    Type("button"),
    CustomData("test", "test-id"),
    Text(content),
  )
}

FAQ

Why did I create the library?

I was tired of JS / TS ecosystem, so much bloat and I wanted something simple, yet powerful, like Go, for frontend.

What will be next steps?

I want to create the whole ecosystem, which will use GOX as primary view system

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAttribute

func CreateAttribute[T any](name string) func(value ...T) Node

func CreateElement

func CreateElement(name string) func(nodes ...Node) Node

func CreateShared

func CreateShared(name string) func(nodes ...Node) Node

func GetAttribute

func GetAttribute[T any](n Node, name string) T

func Minify

func Minify(html string) string

func MustWrite added in v0.2.1

func MustWrite(w io.Writer, nodes ...Node)

func Render

func Render(nodes ...Node) string

func Write

func Write(w io.Writer, nodes ...Node) error

Types

type Clsx

type Clsx map[any]bool

Clsx plugin Conditional classes rendering

func (Clsx) Merge

func (c Clsx) Merge(items ...Clsx) Clsx

func (Clsx) Node

func (c Clsx) Node() Node

func (Clsx) String

func (c Clsx) String() string

type Node

type Node interface {
	Node() Node
}

func A

func A(nodes ...Node) Node

func Abbr

func Abbr(nodes ...Node) Node

func Accept

func Accept(values ...string) Node

func AcceptCharset

func AcceptCharset(values ...string) Node

func AccessKey

func AccessKey(values ...string) Node

func Accumulate

func Accumulate(values ...string) Node

func Action

func Action(values ...string) Node

func Additive

func Additive(values ...string) Node

func Address

func Address(nodes ...Node) Node

func AlignmentBaseline

func AlignmentBaseline(values ...string) Node

func Allow

func Allow(values ...string) Node

func Alt

func Alt(values ...string) Node

func Amplitude

func Amplitude(values ...string) Node

func Animate

func Animate(nodes ...Node) Node

func AnimateAnimateTransform

func AnimateAnimateTransform(nodes ...Node) Node

func AnimateMotion

func AnimateMotion(nodes ...Node) Node

func Append

func Append(n Node, nodes ...Node) Node

func Area

func Area(nodes ...Node) Node

func Article

func Article(nodes ...Node) Node

func Aside

func Aside(nodes ...Node) Node

func Async

func Async() Node

func Attribute

func Attribute() Node

func AttributeName

func AttributeName(values ...string) Node

func Audio

func Audio(nodes ...Node) Node

func AutoCapitalize

func AutoCapitalize(values ...bool) Node

func AutoComplete

func AutoComplete(values ...bool) Node

func AutoFocus

func AutoFocus(values ...bool) Node

func AutoPlay

func AutoPlay(values ...bool) Node

func Azimuth

func Azimuth(values ...string) Node

func B

func B(nodes ...Node) Node

func Background

func Background(values ...string) Node

func Base

func Base(nodes ...Node) Node

func BaseFrequency

func BaseFrequency(values ...string) Node

func BaselineShift

func BaselineShift(values ...string) Node

func Bdi

func Bdi(nodes ...Node) Node

func Bdo

func Bdo(nodes ...Node) Node

func Begin

func Begin(values ...string) Node

func Bg

func Bg(values ...string) Node

func Bias

func Bias(values ...string) Node

func Blockquote

func Blockquote(nodes ...Node) Node

func Body

func Body(nodes ...Node) Node

func Border

func Border(values ...string) Node

func Br

func Br() Node

func Buffered

func Buffered(values ...bool) Node

func Button

func Button(nodes ...Node) Node

func By

func By(values ...string) Node

func CalcMode

func CalcMode(values ...string) Node

func Canvas

func Canvas(nodes ...Node) Node

func Caption

func Caption(nodes ...Node) Node

func Capture

func Capture(values ...string) Node

func CharSet

func CharSet(values ...string) Node

func Checked

func Checked(values ...bool) Node

func Circle

func Circle(nodes ...Node) Node

func Cite

func Cite(nodes ...Node) Node

func Class

func Class(value any) Node

func ClipPath

func ClipPath(nodes ...Node) Node

func ClipPathUnits

func ClipPathUnits(values ...string) Node

func ClipRule

func ClipRule(values ...string) Node

func Code

func Code(nodes ...Node) Node

func ColGroup

func ColGroup(nodes ...Node) Node

func ColSpan

func ColSpan(values ...int) Node

func Color

func Color(values ...string) Node

func ColorInterpolation

func ColorInterpolation(values ...string) Node

func ColorInterpolationFilters

func ColorInterpolationFilters(values ...string) Node

func Cols

func Cols(values ...int) Node

func Content

func Content(values ...string) Node

func ContentEditable

func ContentEditable(values ...bool) Node

func Controls

func Controls(values ...bool) Node

func Coords

func Coords(values ...string) Node

func CrossOrigin

func CrossOrigin(values ...string) Node

func Csp

func Csp(values ...string) Node

func Cursor

func Cursor(values ...string) Node

func CustomData

func CustomData(name string, values ...any) Node

func Cx

func Cx(values ...string) Node

func Cy

func Cy(values ...string) Node

func D

func D(values ...string) Node

func Data

func Data(nodes ...Node) Node

func Datalist

func Datalist(nodes ...Node) Node

func DateTime

func DateTime(values ...string) Node

func Dd

func Dd(nodes ...Node) Node

func Decoding

func Decoding(values ...string) Node

func Default

func Default(values ...bool) Node

func Defer

func Defer() Node

func Defs

func Defs(nodes ...Node) Node

func Del

func Del(nodes ...Node) Node

func Desc

func Desc(nodes ...Node) Node

func Details

func Details(nodes ...Node) Node

func Dfn

func Dfn(nodes ...Node) Node

func Dialog

func Dialog(nodes ...Node) Node

func DiffuseConstant

func DiffuseConstant(values ...string) Node

func Dir

func Dir(values ...string) Node

func DirName

func DirName(values ...string) Node

func Direction

func Direction(values ...string) Node

func Disabled

func Disabled(values ...bool) Node

func Display

func Display(values ...string) Node

func Div

func Div(nodes ...Node) Node

func Divisor

func Divisor(values ...string) Node

func Dl

func Dl(nodes ...Node) Node

func Doctype

func Doctype() Node

func DominantBaseline

func DominantBaseline(values ...string) Node

func Download

func Download(values ...bool) Node

func Draggable

func Draggable(values ...bool) Node

func Dt

func Dt(nodes ...Node) Node

func Dur

func Dur(values ...string) Node

func Dx

func Dx(values ...string) Node

func Dy

func Dy(values ...string) Node

func EdgeMode

func EdgeMode(values ...string) Node

func Element

func Element() Node

func Elevation

func Elevation(values ...string) Node

func Ellipse

func Ellipse(nodes ...Node) Node

func Em

func Em(nodes ...Node) Node

func Embed

func Embed(nodes ...Node) Node

func EncType

func EncType(values ...string) Node

func End

func End(values ...string) Node

func EnterKeyHint

func EnterKeyHint(values ...string) Node

func Exponent

func Exponent(values ...string) Node

func FeBlend

func FeBlend(nodes ...Node) Node

func FeColorMatrix

func FeColorMatrix(nodes ...Node) Node

func FeComponentTransfer

func FeComponentTransfer(nodes ...Node) Node

func FeComposite

func FeComposite(nodes ...Node) Node

func FeConvolveMatrix

func FeConvolveMatrix(nodes ...Node) Node

func FeDiffuseLightning

func FeDiffuseLightning(nodes ...Node) Node

func FeDisplacementMap

func FeDisplacementMap(nodes ...Node) Node

func FeDistantLight

func FeDistantLight(nodes ...Node) Node

func FeDropShadow

func FeDropShadow(nodes ...Node) Node

func FeFlood

func FeFlood(nodes ...Node) Node

func FeFuncA

func FeFuncA(nodes ...Node) Node

func FeFuncB

func FeFuncB(nodes ...Node) Node

func FeFuncG

func FeFuncG(nodes ...Node) Node

func FeFuncR

func FeFuncR(nodes ...Node) Node

func FeGaussianBlur

func FeGaussianBlur(nodes ...Node) Node

func FeImage

func FeImage(nodes ...Node) Node

func FeMerge

func FeMerge(nodes ...Node) Node

func FeMergeNode

func FeMergeNode(nodes ...Node) Node

func FeMorphology

func FeMorphology(nodes ...Node) Node

func FeOffset

func FeOffset(nodes ...Node) Node

func FePointLight

func FePointLight(nodes ...Node) Node

func FeSpecularLighting

func FeSpecularLighting(nodes ...Node) Node

func FeSpotlight

func FeSpotlight(nodes ...Node) Node

func FeTile

func FeTile(nodes ...Node) Node

func FeTurbulence

func FeTurbulence(nodes ...Node) Node

func Fieldset

func Fieldset(nodes ...Node) Node

func FigCaption

func FigCaption(nodes ...Node) Node

func Figure

func Figure(nodes ...Node) Node

func Fill

func Fill(values ...string) Node

func FillOpacity

func FillOpacity(values ...string) Node

func FillRule

func FillRule(values ...string) Node

func Filter

func Filter(nodes ...Node) Node

func FilterUnits

func FilterUnits(values ...string) Node

func FloodColor

func FloodColor(values ...string) Node

func FloodOpacity

func FloodOpacity(values ...string) Node

func FontFamily

func FontFamily(values ...string) Node

func FontSizeAdjust

func FontSizeAdjust(values ...string) Node

func FontStretch

func FontStretch(values ...string) Node

func FontStyle

func FontStyle(values ...string) Node

func FontVariant

func FontVariant(values ...string) Node

func FontWeight

func FontWeight(values ...string) Node
func Footer(nodes ...Node) Node

func For

func For(values ...string) Node

func ForeignObject

func ForeignObject(nodes ...Node) Node

func Form

func Form(nodes ...Node) Node

func FormAction

func FormAction(values ...string) Node

func FormEncType

func FormEncType(values ...string) Node

func FormMethod

func FormMethod(values ...string) Node

func FormNoValidate

func FormNoValidate(values ...string) Node

func FormTarget

func FormTarget(values ...string) Node

func Fr

func Fr(values ...string) Node

func Fragment

func Fragment(nodes ...Node) Node

func From

func From(values ...string) Node

func Fx

func Fx(values ...string) Node

func Fy

func Fy(values ...string) Node

func G

func G(nodes ...Node) Node

func GradientTransform

func GradientTransform(values ...string) Node

func GradientUnits

func GradientUnits(values ...string) Node

func H1

func H1(nodes ...Node) Node

func H2

func H2(nodes ...Node) Node

func H3

func H3(nodes ...Node) Node

func H4

func H4(nodes ...Node) Node

func H5

func H5(nodes ...Node) Node

func H6

func H6(nodes ...Node) Node
func Head(nodes ...Node) Node
func Header(nodes ...Node) Node

func Headers

func Headers(values ...string) Node

func Height

func Height[T constraints.Ordered](values ...T) Node

func Hgroup

func Hgroup(nodes ...Node) Node

func Hidden

func Hidden(values ...bool) Node

func High

func High[T constraints.Ordered](values ...T) Node

func Hr

func Hr() Node

func Href

func Href(values ...string) Node

func HrefLang

func HrefLang(values ...string) Node

func Html

func Html(nodes ...Node) Node

func HttpEquiv

func HttpEquiv(values ...string) Node

func I

func I(nodes ...Node) Node

func Id

func Id(values ...string) Node

func If

func If(condition bool, nodes ...Node) Node

func Iframe

func Iframe(nodes ...Node) Node

func Image

func Image(nodes ...Node) Node

func ImageRendering

func ImageRendering(values ...string) Node

func Img

func Img(nodes ...Node) Node

func In

func In(values ...string) Node

func In2

func In2(values ...string) Node

func Input

func Input(nodes ...Node) Node

func InputMode

func InputMode(values ...bool) Node

func Ins

func Ins(nodes ...Node) Node

func Integrity

func Integrity(values ...string) Node

func Intercept

func Intercept(values ...string) Node

func IsMap

func IsMap(values ...bool) Node

func ItemId

func ItemId(values ...string) Node

func ItemProp

func ItemProp(values ...string) Node

func ItemRef

func ItemRef(values ...string) Node

func ItemScope

func ItemScope(values ...string) Node

func ItemType

func ItemType(values ...string) Node

func K1

func K1(values ...string) Node

func K2

func K2(values ...string) Node

func K3

func K3(values ...string) Node

func K4

func K4(values ...string) Node

func Kbd

func Kbd(nodes ...Node) Node

func KernelMatrix

func KernelMatrix(values ...string) Node

func KeyPoints

func KeyPoints(values ...string) Node

func KeySplines

func KeySplines(values ...string) Node

func KeyTimes

func KeyTimes(values ...string) Node

func Kind

func Kind(values ...string) Node

func Label

func Label(nodes ...Node) Node

func Lang

func Lang(values ...string) Node

func Legend

func Legend(nodes ...Node) Node

func LengthAdjust

func LengthAdjust(values ...string) Node

func LetterSpacing

func LetterSpacing(values ...string) Node

func Li

func Li(nodes ...Node) Node

func LightingColor

func LightingColor(values ...string) Node

func LimitingConeAngle

func LimitingConeAngle(values ...string) Node

func Line

func Line(nodes ...Node) Node

func LinearGradient

func LinearGradient(nodes ...Node) Node
func Link(nodes ...Node) Node

func List

func List(values ...string) Node

func Loading

func Loading(values ...string) Node

func Loop

func Loop(values ...bool) Node

func Low

func Low[T constraints.Ordered](values ...T) Node

func Main

func Main(nodes ...Node) Node

func Map

func Map(nodes ...Node) Node

func MapRange

func MapRange[K comparable, V any](m map[K]V, fn func(key K, value V) Node) Node

func Mark

func Mark(nodes ...Node) Node

func Marker

func Marker(nodes ...Node) Node

func MarkerEnd

func MarkerEnd(values ...string) Node

func MarkerHeight

func MarkerHeight(values ...string) Node

func MarkerMid

func MarkerMid(values ...string) Node

func MarkerStart

func MarkerStart(values ...string) Node

func MarkerUnits

func MarkerUnits(values ...string) Node

func MarkerWidth

func MarkerWidth(values ...string) Node

func Mask

func Mask(nodes ...Node) Node

func MaskContentUnits

func MaskContentUnits(values ...string) Node

func MaskUnits

func MaskUnits(values ...string) Node

func Math

func Math(nodes ...Node) Node

func Max

func Max[T constraints.Ordered](values ...T) Node

func MaxLength

func MaxLength[T constraints.Ordered](values ...T) Node

func Media

func Media(values ...string) Node
func Menu(nodes ...Node) Node

func Meta

func Meta(nodes ...Node) Node

func Metadata

func Metadata(nodes ...Node) Node

func Meter

func Meter(nodes ...Node) Node

func Method

func Method(values ...string) Node

func Min

func Min[T constraints.Ordered](values ...T) Node

func MinLength

func MinLength[T constraints.Ordered](values ...T) Node

func Mode

func Mode(values ...string) Node

func Mpath

func Mpath(nodes ...Node) Node

func Multiple

func Multiple(values ...bool) Node

func Muted

func Muted(values ...bool) Node

func Name

func Name(values ...string) Node
func Nav(nodes ...Node) Node

func NoScript

func NoScript(nodes ...Node) Node

func NoValidate

func NoValidate(values ...bool) Node

func Nonce

func Nonce(values ...string) Node

func NumOctaves

func NumOctaves(values ...string) Node

func Object

func Object(nodes ...Node) Node

func Ol

func Ol(nodes ...Node) Node

func Opacity

func Opacity(values ...string) Node

func Open

func Open(values ...bool) Node

func Operator

func Operator(values ...string) Node

func Optgroup

func Optgroup(nodes ...Node) Node

func Optimum

func Optimum[T constraints.Ordered](values ...T) Node

func Option

func Option(nodes ...Node) Node

func Order

func Order(values ...string) Node

func Orient

func Orient(values ...string) Node

func Origin

func Origin(values ...string) Node

func Output

func Output(nodes ...Node) Node

func Overflow

func Overflow(values ...string) Node

func OverlinePosition

func OverlinePosition(values ...string) Node

func OverlineThickness

func OverlineThickness(values ...string) Node

func P

func P(nodes ...Node) Node

func PaintOrder

func PaintOrder(values ...string) Node

func Param

func Param(nodes ...Node) Node

func Path

func Path(nodes ...Node) Node

func PathLength

func PathLength(values ...string) Node

func Pattern

func Pattern(nodes ...Node) Node

func PatternContentUnits

func PatternContentUnits(values ...string) Node

func PatternTransform

func PatternTransform(values ...string) Node

func PatternUnits

func PatternUnits(values ...string) Node

func Picture

func Picture(nodes ...Node) Node

func Ping

func Ping(values ...string) Node

func Placeholder

func Placeholder(values ...string) Node

func PlaysInline

func PlaysInline(values ...bool) Node

func PointerEvents

func PointerEvents(values ...string) Node

func Points

func Points(values ...string) Node

func PointsAtX

func PointsAtX(values ...string) Node

func PointsAtY

func PointsAtY(values ...string) Node

func PointsAtZ

func PointsAtZ(values ...string) Node

func Polygon

func Polygon(nodes ...Node) Node

func Polyline

func Polyline(nodes ...Node) Node

func Portal

func Portal(nodes ...Node) Node

func Poster

func Poster(values ...string) Node

func Pre

func Pre(nodes ...Node) Node

func Preload

func Preload(values ...bool) Node

func PreserveAlpha

func PreserveAlpha(values ...string) Node

func PreserveAspectRatio

func PreserveAspectRatio(values ...string) Node

func PrimitiveUnits

func PrimitiveUnits(values ...string) Node

func Progress

func Progress(nodes ...Node) Node

func Q

func Q(nodes ...Node) Node

func R

func R(values ...string) Node

func RadialGradient

func RadialGradient(nodes ...Node) Node

func Radius

func Radius(values ...string) Node

func Range

func Range[T any](s []T, fn func(item T, index int) Node) Node

func Raw

func Raw(html ...string) Node

func Readonly

func Readonly(values ...bool) Node

func Rect

func Rect(nodes ...Node) Node

func RefX

func RefX(values ...string) Node

func RefY

func RefY(values ...string) Node

func ReferrerPolicy

func ReferrerPolicy(values ...string) Node

func Rel

func Rel(values ...string) Node

func RepeatCount

func RepeatCount(values ...string) Node

func RepeatDur

func RepeatDur(values ...string) Node

func Required

func Required(values ...bool) Node

func Restart

func Restart(values ...string) Node

func Result

func Result(values ...string) Node

func Reversed

func Reversed(values ...bool) Node

func Role

func Role(values ...string) Node

func Rotate

func Rotate(values ...string) Node

func RowSpan

func RowSpan(values ...int) Node

func Rows

func Rows(values ...int) Node

func Rp

func Rp(nodes ...Node) Node

func Rt

func Rt(nodes ...Node) Node

func Ruby

func Ruby(nodes ...Node) Node

func Rx

func Rx(values ...float64) Node

func Ry

func Ry(values ...float64) Node

func S

func S(nodes ...Node) Node

func Samp

func Samp(nodes ...Node) Node

func Sandbox

func Sandbox(values ...string) Node

func Scale

func Scale(values ...string) Node

func Scope

func Scope(values ...string) Node

func Script

func Script(nodes ...Node) Node
func Search(nodes ...Node) Node

func Section

func Section(nodes ...Node) Node

func Seed

func Seed(values ...string) Node

func Select

func Select(nodes ...Node) Node

func Selected

func Selected(values ...bool) Node

func Set

func Set(nodes ...Node) Node

func Shape

func Shape(values ...string) Node

func ShapeRendering

func ShapeRendering(values ...string) Node

func Size

func Size[T constraints.Ordered](values ...T) Node

func Sizes

func Sizes(values ...string) Node

func Slot

func Slot(nodes ...Node) Node

func Small

func Small(nodes ...Node) Node

func Source

func Source(nodes ...Node) Node

func Spacing

func Spacing(values ...string) Node

func Span

func Span(nodes ...Node) Node

func SpecularConstant

func SpecularConstant(values ...string) Node

func SpecularExponent

func SpecularExponent(values ...string) Node

func SpellCheck

func SpellCheck(values ...bool) Node

func SpreadMethod

func SpreadMethod(values ...string) Node

func Src

func Src(values ...string) Node

func SrcDoc

func SrcDoc(values ...string) Node

func SrcLang

func SrcLang(values ...string) Node

func SrcSet

func SrcSet(values ...string) Node

func Start

func Start(values ...int) Node

func StartOffset

func StartOffset(values ...string) Node

func StdDeviation

func StdDeviation(values ...string) Node

func Step

func Step(values ...int) Node

func StitchTiles

func StitchTiles(values ...string) Node

func Stop

func Stop(nodes ...Node) Node

func StopColor

func StopColor(values ...string) Node

func StopOpacity

func StopOpacity(values ...string) Node

func StrikethroughPosition

func StrikethroughPosition(values ...string) Node

func StrikethroughThickness

func StrikethroughThickness(values ...string) Node

func Stroke

func Stroke(values ...string) Node

func StrokeDasharray

func StrokeDasharray(values ...string) Node

func StrokeDashoffset

func StrokeDashoffset(values ...string) Node

func StrokeLinecap

func StrokeLinecap(values ...string) Node

func StrokeLinejoin

func StrokeLinejoin(values ...string) Node

func StrokeMiterlimit

func StrokeMiterlimit(values ...string) Node

func StrokeOpacity

func StrokeOpacity(values ...string) Node

func StrokeWidth

func StrokeWidth(values ...string) Node

func Strong

func Strong(nodes ...Node) Node

func Style

func Style(nodes ...Node) Node

func Sub

func Sub(nodes ...Node) Node

func Summary

func Summary(nodes ...Node) Node

func Sup

func Sup(nodes ...Node) Node

func SurfaceScale

func SurfaceScale(values ...string) Node

func Svg

func Svg(nodes ...Node) Node

func Switch

func Switch(nodes ...Node) Node

func Symbol

func Symbol(nodes ...Node) Node

func SystemLanguage

func SystemLanguage(values ...string) Node

func TabIndex

func TabIndex(values ...int) Node

func Table

func Table(nodes ...Node) Node

func TableValues

func TableValues(values ...string) Node

func Target

func Target(values ...string) Node

func TargetX

func TargetX(values ...string) Node

func TargetY

func TargetY(values ...string) Node

func Tbody

func Tbody(nodes ...Node) Node

func Td

func Td(nodes ...Node) Node

func Template

func Template(nodes ...Node) Node

func Text

func Text[T any](value T) Node

func TextAnchor

func TextAnchor(values ...string) Node

func TextDecoration

func TextDecoration(values ...string) Node

func TextLength

func TextLength(values ...string) Node

func TextPath

func TextPath(nodes ...Node) Node

func TextRendering

func TextRendering(values ...string) Node

func TextSize

func TextSize(values ...string) Node

func Textarea

func Textarea(nodes ...Node) Node

func Tfoot

func Tfoot(nodes ...Node) Node

func Th

func Th(nodes ...Node) Node

func Thead

func Thead(nodes ...Node) Node

func Time

func Time(nodes ...Node) Node

func Title

func Title(nodes ...Node) Node

func To

func To(values ...string) Node

func Tr

func Tr(nodes ...Node) Node

func Transform

func Transform(values ...string) Node

func TransformOrigin

func TransformOrigin(values ...string) Node

func Translate

func Translate(values ...string) Node

func Tspan

func Tspan(nodes ...Node) Node

func Type

func Type(values ...string) Node

func U

func U(nodes ...Node) Node

func Ul

func Ul(nodes ...Node) Node

func UnderlinePosition

func UnderlinePosition(values ...string) Node

func UnderlineThickness

func UnderlineThickness(values ...string) Node

func UnicodeBidi

func UnicodeBidi(values ...string) Node

func Use

func Use(nodes ...Node) Node

func UseMap

func UseMap(values ...string) Node

func Value

func Value(values ...any) Node

func Values

func Values(values ...string) Node

func Var

func Var(nodes ...Node) Node

func VectorEffect

func VectorEffect(values ...string) Node

func Version

func Version(values ...string) Node

func Video

func Video(nodes ...Node) Node

func View

func View(nodes ...Node) Node

func ViewBox

func ViewBox(values ...string) Node

func Visibility

func Visibility(values ...string) Node

func Wbr

func Wbr() Node

func Width

func Width[T constraints.Ordered](values ...T) Node

func WordSpacing

func WordSpacing(values ...string) Node

func Wrap

func Wrap(values ...string) Node

func WritingMode

func WritingMode(values ...string) Node

func X

func X(values ...string) Node

func X1

func X1(values ...string) Node

func X2

func X2(values ...string) Node

func XChannelSelector

func XChannelSelector(values ...string) Node

func Xmlns

func Xmlns(values ...string) Node

func Y

func Y(values ...string) Node

func Y1

func Y1(values ...string) Node

func Y2

func Y2(values ...string) Node

func YChannelSelector

func YChannelSelector(values ...string) Node

func Z

func Z(values ...string) Node

type Stringer

type Stringer interface {
	String() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL