lobe-mygo

module
v0.0.0-...-d88b4ad Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2026 License: MIT

README ΒΆ

Lobe MyGo

Lobe MyGo

The UI Kit for Native Go Apps

Lobe UI components for MyGo native UI, drawn on the GPU in pure Go.

Docs Β· Catalog Β· Changelog Β· Report Bug Β· Request Feature


Table of contents

TOC

✨ Why Lobe MyGo?

Lobe MyGo brings the Lobe UI design language to desktop apps written with MyGo's native UI: no HTML, no JavaScript and no webview.

  • Lobe UI, in Go: 70+ components (buttons, inputs, menus, modals, toasts, tabs and more) that look and move like their React counterparts.
  • Same tokens as Lobe UI: colors, radii and font sizes are generated from @lobehub/ui, so a Go app and a web app share one look.
  • Light and dark built in: theme.Apply follows the system appearance with no extra setup.
  • Pure Go, no cgo: one small binary per platform, cross-compiled from any machine.
  • Motion included: springs and shared-element transitions for indicators, overlays and toasts.
  • Lucide icons: all 2,300+ Lucide icons as Go functions.

πŸš€ Getting Started

$ go get github.com/lobehub/lobe-mygo

Lobe MyGo needs Go 1.27 or later and builds on MyGo.

package main

import (
	"fmt"
	"log"

	"github.com/egoist/mygo"
	"github.com/egoist/mygo/ui"
	"github.com/lobehub/lobe-mygo/pkg/action"
	"github.com/lobehub/lobe-mygo/pkg/theme"
)

var count int

func view(c *ui.Context) {
	theme.Apply(c)
	ui.Column(c).Fill().Center().Gap(12).Background(theme.TokensOf(c).BgContainer).Children(func() {
		if action.Button(c, "Hello Lobe", action.ButtonProps{Variant: action.Primary}).Clicked() {
			count++
		}
		ui.Text(c, fmt.Sprintf("Clicked %d times", count))
	})
}

func main() {
	mygo.App.WhenReady(func() {
		mygo.NewWindow(mygo.WindowOptions{Title: "Hello Lobe", Width: 480, Height: 320, Content: ui.View(view)})
	})
	if err := mygo.App.Run(); err != nil {
		log.Fatal(err)
	}
}

Call theme.Apply(c) at the top of each view, then read design tokens with theme.TokensOf(c).

To start a whole app, copy examples/desktop: a skeleton desktop window with a title bar, tabs with history, a resizable sidebar, a content card and a settings form, styled after the LobeHub desktop app. Run it with go run ./examples/desktop.

Components speak English and Simplified Chinese, in the language the app shows: an app that ships zh-Hans in its MyGo catalogs gets them in Chinese, and changes or translates any of their texts with lobe.<key> keys (see pkg/internal/l10n/messages/en.json). The starter shows both, with a language switch in Settings.

πŸ“¦ Packages

Package Components
pkg/action Button, ActionIcon, ActionIconGroup, CopyButton, Segmented
pkg/field Input, TextArea, InputNumber, InputPassword, InputOTP, Select, AutoComplete, SearchBar, HotkeyInput, EditableText, DatePicker, Calendar, Upload
pkg/choice Checkbox, RadioGroup, Switch, Slider, Rate, ToggleGroup, ColorSwatches, ColorPicker, ImageSelect
pkg/display Text, Tag, Avatar, GroupAvatar, AgentAvatar, Icon, Hotkey, Image, List, Accordion, Empty, Skeleton
pkg/feedback Alert, Badge, Progress, Spin, Result, Modal, Drawer, Toast, FloatingPanel, FloatingSheet
pkg/overlay Tooltip, Popover, DropdownMenu, ContextMenu
pkg/nav Tabs, Pagination, Breadcrumb, Steps, Burger
pkg/layout Block, Grid, Divider, ScrollArea, DraggablePanel, Header, SideNav, DraggableSideNav, Layout, GuideCard, SortableList
pkg/code Highlighter, Snippet, QRCode
pkg/markdown Markdown, with streaming
pkg/theme Light and dark tokens, sizes, shadows
pkg/motion Springs, easings, transitions
pkg/lucide Lucide icons

πŸ“– Documentation

The docs site shows every component as a live MyGo demo, compiled to WebAssembly and drawn in the browser, next to an API table generated from its Go Props struct.

$ bun install
$ bun run dev

πŸ’¬ Community

Questions, ideas and showcases are all welcome:

⌨️ Local Development

Clone it for local development (Go >= 1.27 and Bun):

$ git clone https://github.com/lobehub/lobe-mygo.git
$ cd lobe-mygo
$ go test ./...
$ go run ./catalog            # native catalog window
$ go run ./catalog button/basic
$ go run ./examples/desktop    # desktop app starter
$ bun install && bun run dev  # docs site with WebAssembly demos

🀝 Contributing

Contributions of all types are more than welcome, if you are interested in contributing code, feel free to check out our GitHub Issues to get stuck in to show us what you’re made of.

🩷 Sponsor

Every bit counts and your one-time donation sparkles in our galaxy of support! You're a shooting star, making a swift and bright impact on our journey. Thank you for believing in us – your generosity guides us toward our mission, one brilliant flash at a time.

πŸ”— Links


Copyright Β© 2026 LobeHub.
This project is MIT licensed.

Directories ΒΆ

Path Synopsis
tag
cmd
gen-api command
gen-shots command
Command gen-shots renders the docs site's images from real components: the home page's bento tiles with transparent backgrounds and the live showcase's poster, in light and dark, the social preview and the README banner.
Command gen-shots renders the docs site's images from real components: the home page's bento tiles with transparent backgrounds and the live showcase's poster, in light and dark, the social preview and the README banner.
examples
desktop command
gallery command
pkg
internal/l10n
Package l10n holds the texts Lobe MyGo's components say themselves, in English and the languages they are translated to: a library catalog of the namespace "lobe", said in the language of the window.
Package l10n holds the texts Lobe MyGo's components say themselves, in English and the languages they are translated to: a library catalog of the namespace "lobe", said in the language of the window.
nav

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL