Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/uberswe/html
- Owner: uberswe
- License: mit
- Created: 2021-02-21T05:41:45.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-02-24T23:21:45.000Z (almost 4 years ago)
- Last Synced: 2024-06-20T03:46:47.122Z (6 months ago)
- Topics: components, golang, html
- Language: Go
- Homepage:
- Size: 28.3 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```