all repos — gomponents @ c99025e6c569827aa5ca8fb3e16545f1b5f821f2

HTML components in pure Go

el/media.go (view raw)

1
2
3
4
5
6
7
8
9
package el

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

func Img(src, alt string, children ...g.Node) g.NodeFunc {
	return g.El("img", g.Attr("src", src), g.Attr("alt", alt), g.Group(children))
}