gox

package module
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: MIT Imports: 6 Imported by: 7

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 added in v0.3.2

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

func GetAttribute added in v0.2.0

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

func Minify

func Minify(html string) string

func Render

func Render(nodes ...Node) string

func Write

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

Types

type Clsx

type Clsx map[string]bool

Clsx plugin Conditional classes rendering

func (Clsx) Node

func (c Clsx) Node() Node

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 added in v0.2.9

func Accumulate(values ...string) Node

func Action

func Action(values ...string) Node

func Additive added in v0.2.9

func Additive(values ...string) Node

func Address

func Address(nodes ...Node) Node

func AlignmentBaseline added in v0.2.9

func AlignmentBaseline(values ...string) Node

func Allow

func Allow(values ...string) Node

func Alt

func Alt(values ...string) Node

func Amplitude added in v0.2.9

func Amplitude(values ...string) Node

func Animate added in v0.2.9

func Animate(nodes ...Node) Node

func AnimateAnimateTransform added in v0.2.9

func AnimateAnimateTransform(nodes ...Node) Node

func AnimateMotion added in v0.2.9

func AnimateMotion(nodes ...Node) Node

func Append added in v0.2.0

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 added in v0.2.9

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 added in v0.3.2

func AutoFocus(values ...bool) Node

func AutoPlay

func AutoPlay(values ...bool) Node

func Azimuth added in v0.2.9

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 added in v0.2.9

func BaseFrequency(values ...string) Node

func BaselineShift added in v0.2.9

func BaselineShift(values ...string) Node

func Bdi

func Bdi(nodes ...Node) Node

func Bdo

func Bdo(nodes ...Node) Node

func Begin added in v0.2.9

func Begin(values ...string) Node

func BgColor

func BgColor(values ...string) Node

func Bias added in v0.2.9

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 added in v0.2.9

func By(values ...string) Node

func CalcMode added in v0.2.9

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 added in v0.2.9

func Circle(nodes ...Node) Node

func Cite

func Cite(nodes ...Node) Node

func Class

func Class(values ...string) Node

func ClipPath added in v0.2.9

func ClipPath(nodes ...Node) Node

func ClipPathUnits added in v0.2.9

func ClipPathUnits(values ...string) Node

func ClipRule added in v0.2.9

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 added in v0.2.9

func ColorInterpolation(values ...string) Node

func ColorInterpolationFilters added in v0.2.9

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 added in v0.2.9

func Cursor(values ...string) Node

func CustomData

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

func Cx added in v0.2.9

func Cx(values ...string) Node

func Cy added in v0.2.9

func Cy(values ...string) Node

func D added in v0.2.0

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 added in v0.2.9

func Defs(nodes ...Node) Node

func Del

func Del(nodes ...Node) Node

func Desc added in v0.2.9

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 added in v0.2.9

func DiffuseConstant(values ...string) Node

func Dir

func Dir(values ...string) Node

func DirName

func DirName(values ...string) Node

func Direction added in v0.2.9

func Direction(values ...string) Node

func Disabled

func Disabled(values ...bool) Node

func Display added in v0.2.9

func Display(values ...string) Node

func Div

func Div(nodes ...Node) Node

func Divisor added in v0.2.9

func Divisor(values ...string) Node

func Dl

func Dl(nodes ...Node) Node

func Doctype

func Doctype() Node

func DominantBaseline added in v0.2.9

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 added in v0.2.9

func Dur(values ...string) Node

func Dx added in v0.2.9

func Dx(values ...string) Node

func Dy added in v0.2.9

func Dy(values ...string) Node

func EdgeMode added in v0.2.9

func EdgeMode(values ...string) Node

func Element

func Element() Node

func Elevation added in v0.2.9

func Elevation(values ...string) Node

func Ellipse added in v0.2.9

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 added in v0.2.9

func End(values ...string) Node

func EnterKeyHint

func EnterKeyHint(values ...string) Node

func Exponent added in v0.2.9

func Exponent(values ...string) Node

func FeBlend added in v0.2.9

func FeBlend(nodes ...Node) Node

func FeColorMatrix added in v0.2.9

func FeColorMatrix(nodes ...Node) Node

func FeComponentTransfer added in v0.2.9

func FeComponentTransfer(nodes ...Node) Node

func FeComposite added in v0.2.9

func FeComposite(nodes ...Node) Node

func FeConvolveMatrix added in v0.2.9

func FeConvolveMatrix(nodes ...Node) Node

func FeDiffuseLightning added in v0.2.9

func FeDiffuseLightning(nodes ...Node) Node

func FeDisplacementMap added in v0.2.9

func FeDisplacementMap(nodes ...Node) Node

func FeDistantLight added in v0.2.9

func FeDistantLight(nodes ...Node) Node

func FeDropShadow added in v0.2.9

func FeDropShadow(nodes ...Node) Node

func FeFlood added in v0.2.9

func FeFlood(nodes ...Node) Node

func FeFuncA added in v0.2.9

func FeFuncA(nodes ...Node) Node

func FeFuncB added in v0.2.9

func FeFuncB(nodes ...Node) Node

func FeFuncG added in v0.2.9

func FeFuncG(nodes ...Node) Node

func FeFuncR added in v0.2.9

func FeFuncR(nodes ...Node) Node

func FeGaussianBlur added in v0.2.9

func FeGaussianBlur(nodes ...Node) Node

func FeImage added in v0.2.9

func FeImage(nodes ...Node) Node

func FeMerge added in v0.2.9

func FeMerge(nodes ...Node) Node

func FeMergeNode added in v0.2.9

func FeMergeNode(nodes ...Node) Node

func FeMorphology added in v0.2.9

func FeMorphology(nodes ...Node) Node

func FeOffset added in v0.2.9

func FeOffset(nodes ...Node) Node

func FePointLight added in v0.2.9

func FePointLight(nodes ...Node) Node

func FeSpecularLighting added in v0.2.9

func FeSpecularLighting(nodes ...Node) Node

func FeSpotlight added in v0.2.9

func FeSpotlight(nodes ...Node) Node

func FeTile added in v0.2.9

func FeTile(nodes ...Node) Node

func FeTurbulence added in v0.2.9

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 added in v0.2.9

func Fill(values ...string) Node

func FillOpacity added in v0.2.9

func FillOpacity(values ...string) Node

func FillRule added in v0.2.9

func FillRule(values ...string) Node

func Filter added in v0.2.9

func Filter(nodes ...Node) Node

func FilterUnits added in v0.2.9

func FilterUnits(values ...string) Node

func FloodColor added in v0.2.9

func FloodColor(values ...string) Node

func FloodOpacity added in v0.2.9

func FloodOpacity(values ...string) Node

func FontFamily added in v0.2.9

func FontFamily(values ...string) Node

func FontSize added in v0.2.9

func FontSize(values ...string) Node

func FontSizeAdjust added in v0.2.9

func FontSizeAdjust(values ...string) Node

func FontStretch added in v0.2.9

func FontStretch(values ...string) Node

func FontStyle added in v0.2.9

func FontStyle(values ...string) Node

func FontVariant added in v0.2.9

func FontVariant(values ...string) Node

func FontWeight added in v0.2.9

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

func For

func For(values ...string) Node

func ForeignObject added in v0.2.9

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 added in v0.2.9

func Fr(values ...string) Node

func Fragment

func Fragment(nodes ...Node) Node

func From added in v0.2.9

func From(values ...string) Node

func Fx added in v0.2.9

func Fx(values ...string) Node

func Fy added in v0.2.9

func Fy(values ...string) Node

func G added in v0.2.9

func G(nodes ...Node) Node

func GradientTransform added in v0.2.9

func GradientTransform(values ...string) Node

func GradientUnits added in v0.2.9

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 added in v0.2.9

func Image(nodes ...Node) Node

func ImageRendering added in v0.2.9

func ImageRendering(values ...string) Node

func Img

func Img(nodes ...Node) Node

func In added in v0.2.9

func In(values ...string) Node

func In2 added in v0.2.9

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 added in v0.2.9

func Intercept(values ...string) Node

func IsMap

func IsMap(values ...bool) Node

func ItemId added in v0.3.2

func ItemId(values ...string) Node

func ItemProp

func ItemProp(values ...string) Node

func ItemRef added in v0.3.2

func ItemRef(values ...string) Node

func ItemScope added in v0.3.2

func ItemScope(values ...string) Node

func ItemType added in v0.3.2

func ItemType(values ...string) Node

func K1 added in v0.2.9

func K1(values ...string) Node

func K2 added in v0.2.9

func K2(values ...string) Node

func K3 added in v0.2.9

func K3(values ...string) Node

func K4 added in v0.2.9

func K4(values ...string) Node

func Kbd

func Kbd(nodes ...Node) Node

func KernelMatrix added in v0.2.9

func KernelMatrix(values ...string) Node

func KeyPoints added in v0.2.9

func KeyPoints(values ...string) Node

func KeySplines added in v0.2.9

func KeySplines(values ...string) Node

func KeyTimes added in v0.2.9

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 added in v0.2.9

func LengthAdjust(values ...string) Node

func LetterSpacing added in v0.2.9

func LetterSpacing(values ...string) Node

func Li

func Li(nodes ...Node) Node

func LightingColor added in v0.2.9

func LightingColor(values ...string) Node

func LimitingConeAngle added in v0.2.9

func LimitingConeAngle(values ...string) Node

func Line added in v0.2.9

func Line(nodes ...Node) Node

func LinearGradient added in v0.2.9

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

func List

func List(values ...string) Node

func Loading

func Loading(values ...bool) 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 added in v0.3.0

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 added in v0.2.9

func Marker(nodes ...Node) Node

func MarkerEnd added in v0.2.9

func MarkerEnd(values ...string) Node

func MarkerHeight added in v0.2.9

func MarkerHeight(values ...string) Node

func MarkerMid added in v0.2.9

func MarkerMid(values ...string) Node

func MarkerStart added in v0.2.9

func MarkerStart(values ...string) Node

func MarkerUnits added in v0.2.9

func MarkerUnits(values ...string) Node

func MarkerWidth added in v0.2.9

func MarkerWidth(values ...string) Node

func Mask added in v0.2.9

func Mask(nodes ...Node) Node

func MaskContentUnits added in v0.2.9

func MaskContentUnits(values ...string) Node

func MaskUnits added in v0.2.9

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 added in v0.2.9

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 added in v0.2.9

func Mode(values ...string) Node

func Mpath added in v0.2.9

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 added in v0.3.2

func Nonce(values ...string) Node

func NumOctaves added in v0.2.9

func NumOctaves(values ...string) Node

func Object

func Object(nodes ...Node) Node

func Ol

func Ol(nodes ...Node) Node

func Opacity added in v0.2.9

func Opacity(values ...string) Node

func Open

func Open(values ...bool) Node

func Operator added in v0.2.9

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 added in v0.2.9

func Order(values ...string) Node

func Orient added in v0.2.9

func Orient(values ...string) Node

func Origin added in v0.2.9

func Origin(values ...string) Node

func Output

func Output(nodes ...Node) Node

func Overflow added in v0.2.9

func Overflow(values ...string) Node

func OverlinePosition added in v0.2.9

func OverlinePosition(values ...string) Node

func OverlineThickness added in v0.2.9

func OverlineThickness(values ...string) Node

func P

func P(nodes ...Node) Node

func PaintOrder added in v0.2.9

func PaintOrder(values ...string) Node

func Param

func Param(nodes ...Node) Node

func Path added in v0.2.0

func Path(nodes ...Node) Node

func PathLength added in v0.2.9

func PathLength(values ...string) Node

func Pattern

func Pattern(nodes ...Node) Node

func PatternContentUnits added in v0.2.9

func PatternContentUnits(values ...string) Node

func PatternTransform added in v0.2.9

func PatternTransform(values ...string) Node

func PatternUnits added in v0.2.9

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 added in v0.2.9

func PointerEvents(values ...string) Node

func Points added in v0.2.9

func Points(values ...string) Node

func PointsAtX added in v0.2.9

func PointsAtX(values ...string) Node

func PointsAtY added in v0.2.9

func PointsAtY(values ...string) Node

func PointsAtZ added in v0.2.9

func PointsAtZ(values ...string) Node

func Polygon added in v0.2.9

func Polygon(nodes ...Node) Node

func Polyline added in v0.2.9

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 added in v0.2.9

func PreserveAlpha(values ...string) Node

func PreserveAspectRatio added in v0.2.9

func PreserveAspectRatio(values ...string) Node

func PrimitiveUnits added in v0.2.9

func PrimitiveUnits(values ...string) Node

func Progress

func Progress(nodes ...Node) Node

func Q

func Q(nodes ...Node) Node

func R added in v0.2.9

func R(values ...string) Node

func RadialGradient added in v0.2.9

func RadialGradient(nodes ...Node) Node

func Radius added in v0.2.9

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 added in v0.2.9

func Rect(nodes ...Node) Node

func RefX added in v0.2.9

func RefX(values ...string) Node

func RefY added in v0.2.9

func RefY(values ...string) Node

func ReferrerPolicy

func ReferrerPolicy(values ...string) Node

func Rel

func Rel(values ...string) Node

func RepeatCount added in v0.2.9

func RepeatCount(values ...string) Node

func RepeatDur added in v0.2.9

func RepeatDur(values ...string) Node

func Required

func Required(values ...bool) Node

func Restart added in v0.2.9

func Restart(values ...string) Node

func Result added in v0.2.9

func Result(values ...string) Node

func Reversed

func Reversed(values ...bool) Node

func Role

func Role(values ...string) Node

func Rotate added in v0.2.9

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 added in v0.2.9

func Rx(values ...float64) Node

func Ry added in v0.2.9

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 added in v0.2.9

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 added in v0.2.9

func Seed(values ...string) Node

func Select

func Select(nodes ...Node) Node

func Selected

func Selected(values ...bool) Node

func Set added in v0.2.9

func Set(nodes ...Node) Node

func Shape

func Shape(values ...string) Node

func ShapeRendering added in v0.2.9

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 added in v0.2.9

func Spacing(values ...string) Node

func Span

func Span(nodes ...Node) Node

func SpecularConstant added in v0.2.9

func SpecularConstant(values ...string) Node

func SpecularExponent added in v0.2.9

func SpecularExponent(values ...string) Node

func SpellCheck

func SpellCheck(values ...bool) Node

func SpreadMethod added in v0.2.9

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 added in v0.2.9

func StartOffset(values ...string) Node

func StdDeviation added in v0.2.9

func StdDeviation(values ...string) Node

func Step

func Step(values ...int) Node

func StitchTiles added in v0.2.9

func StitchTiles(values ...string) Node

func Stop added in v0.2.9

func Stop(nodes ...Node) Node

func StopColor added in v0.2.9

func StopColor(values ...string) Node

func StopOpacity added in v0.2.9

func StopOpacity(values ...string) Node

func StrikethroughPosition added in v0.2.9

func StrikethroughPosition(values ...string) Node

func StrikethroughThickness added in v0.2.9

func StrikethroughThickness(values ...string) Node

func Stroke added in v0.2.9

func Stroke(values ...string) Node

func StrokeDasharray added in v0.2.9

func StrokeDasharray(values ...string) Node

func StrokeDashoffset added in v0.2.9

func StrokeDashoffset(values ...string) Node

func StrokeLinecap added in v0.2.9

func StrokeLinecap(values ...string) Node

func StrokeLinejoin added in v0.2.9

func StrokeLinejoin(values ...string) Node

func StrokeMiterlimit added in v0.2.9

func StrokeMiterlimit(values ...string) Node

func StrokeOpacity added in v0.2.9

func StrokeOpacity(values ...string) Node

func StrokeWidth added in v0.2.9

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 added in v0.2.9

func SurfaceScale(values ...string) Node

func Svg

func Svg(nodes ...Node) Node

func Switch added in v0.2.9

func Switch(nodes ...Node) Node

func Symbol added in v0.2.9

func Symbol(nodes ...Node) Node

func SystemLanguage added in v0.2.9

func SystemLanguage(values ...string) Node

func TabIndex

func TabIndex(values ...int) Node

func Table

func Table(nodes ...Node) Node

func TableValues added in v0.2.9

func TableValues(values ...string) Node

func Target

func Target(values ...string) Node

func TargetX added in v0.2.9

func TargetX(values ...string) Node

func TargetY added in v0.2.9

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 added in v0.2.9

func TextAnchor(values ...string) Node

func TextDecoration added in v0.2.9

func TextDecoration(values ...string) Node

func TextLength added in v0.2.9

func TextLength(values ...string) Node

func TextPath added in v0.2.9

func TextPath(nodes ...Node) Node

func TextRendering added in v0.2.9

func TextRendering(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 added in v0.2.9

func To(values ...string) Node

func Tr

func Tr(nodes ...Node) Node

func Transform added in v0.2.9

func Transform(values ...string) Node

func TransformOrigin added in v0.2.9

func TransformOrigin(values ...string) Node

func Translate

func Translate(values ...string) Node

func Tspan added in v0.2.9

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 added in v0.2.9

func UnderlinePosition(values ...string) Node

func UnderlineThickness added in v0.2.9

func UnderlineThickness(values ...string) Node

func UnicodeBidi added in v0.2.9

func UnicodeBidi(values ...string) Node

func Use added in v0.2.0

func Use(nodes ...Node) Node

func UseMap

func UseMap(values ...string) Node

func Value

func Value(values ...any) Node

func Values added in v0.2.9

func Values(values ...string) Node

func Var

func Var(nodes ...Node) Node

func VectorEffect added in v0.2.9

func VectorEffect(values ...string) Node

func Version added in v0.3.2

func Version(values ...string) Node

func Video

func Video(nodes ...Node) Node

func View added in v0.2.9

func View(nodes ...Node) Node

func ViewBox added in v0.2.0

func ViewBox(values ...string) Node

func Visibility added in v0.2.9

func Visibility(values ...string) Node

func Wbr

func Wbr() Node

func Width

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

func WordSpacing added in v0.2.9

func WordSpacing(values ...string) Node

func Wrap

func Wrap(values ...string) Node

func WritingMode added in v0.2.9

func WritingMode(values ...string) Node

func X added in v0.2.9

func X(values ...string) Node

func X1 added in v0.2.9

func X1(values ...string) Node

func X2 added in v0.2.9

func X2(values ...string) Node

func XChannelSelector added in v0.2.9

func XChannelSelector(values ...string) Node

func Xmlns added in v0.2.0

func Xmlns(values ...string) Node

func Y added in v0.2.9

func Y(values ...string) Node

func Y1 added in v0.2.9

func Y1(values ...string) Node

func Y2 added in v0.2.9

func Y2(values ...string) Node

func YChannelSelector added in v0.2.9

func YChannelSelector(values ...string) Node

func Z added in v0.2.9

func Z(values ...string) Node

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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