1
0
gomponents/svg/elements.go
Markus Wüstenberg 6f7752c20f
Add svg package and a few helpers (#67)
Introducing SVG, to inline vector graphics in your HTML! 🥳
2021-05-05 12:53:32 +02:00

16 lines
404 B
Go

// 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))
}