Skip to content

Create web-based user interfaces with golang,like nicegui

Notifications You must be signed in to change notification settings

yaoguangduan/nicegoi

Repository files navigation

NiceGoi

NiceGOI is an easy-to-use, Golang-based UI framework, which shows up in your web browser. You can create buttons,inputs,card and much more.

It is great for micro web apps,tools app.

run belong command to see demo:
go run github.com/yaoguangduan/nicegoi/cmd/nicegoi_demo@latest
Features
  • write like native gui,use like web server
  • browser-based graphical user interface
  • standard GUI elements like label, button, checkbox, switch, slider, input
Usage
package main

import (
	"github.com/yaoguangduan/nicegoi"
)

type Home struct {
}

func (t *Home) Name() string {
	return ""
}

func (t *Home) Layout(ctx nicegoi.PageContext) {
	input := ctx.Input(nil)
	btn := ctx.Button("Click Me!", func(self *nicegoi.Button) {
		is := input.GetValue()
		if is == "" {
			self.Ctx().MsgInfo("hello world")
		} else {
			self.Ctx().MsgSuccess("hello " + is)
		}
	})
	ctx.Box(input, btn).Vertical()
}

func main() {
	nicegoi.Run(new(Home))
}
Showcase
buttons

Button

inputs

Input

links

Link

tags

tag

tag-input

ti

progress

progress

add more...

About

Create web-based user interfaces with golang,like nicegui

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages