all repos — gomponents @ 8f17dba6f1268ab8c8810d7940d1484315cdb825

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