Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/uberswe/html

html is a go library for generating html components such as buttons, form fields, forms, tables and more using golang.
https://github.com/uberswe/html

components golang html

Last synced: about 2 months ago
JSON representation

html is a go library for generating html components such as buttons, form fields, forms, tables and more using golang.

Awesome Lists containing this project

README

        

# html
html is a go library for generating html components such as buttons, form fields, forms, tables and more using golang.

This package was created from work I have done on [Beubo](https://github.com/uberswe/beubo).

A more advanced package for writing html in go is [htmlgo](https://github.com/julvo/htmlgo).

## Example

Writing something like this

```go
textField := Text().Label("Test").Class("test").Id("test").Name("test")

button := Button().Class("button").Content("This is a button")

f := Form().Class("test").Method("POST").Action("/").Fields(textField, button)

fmt.Println(f.Render())
```

Will output the following

```html




Test


This is a button


```