all repos — gomponents @ 3e9e00ca0dc6b58e58694d84c97a1d2f2ab4002b

HTML components in pure Go

svg/elements.go (view raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Package svg provides common SVG elements and attributes.
// See https://developer.mozilla.org/en-US/docs/Web/SVG/Element for an overview.
package svg

import (
	g "github.com/maragudk/gomponents"
)

func Path(children ...g.Node) g.Node {
	return g.El("path", children...)
}

func SVG(children ...g.Node) g.Node {
	return g.El("svg", g.Attr("xmlns", "http://www.w3.org/2000/svg"), g.Group(children))
}