Lobe UI components for MyGo native UI, drawn on the GPU in pure Go.
Docs · Catalog · Changelog · Report Bug · Request Feature
Table of contents
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.Applyfollows 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.
$ go get github.com/lobehub/lobe-mygoLobe 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.
| 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 |
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- Docs site: mygo.lobehub.com, starting with Getting Started
- Component pages and demos:
catalog/ - Changelog: CHANGELOG.md
Questions, ideas and showcases are all welcome:
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 demosContributions 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.
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.
- 🍭 Lobe UI - React component library for AI apps
- 🐹 MyGo - Desktop apps in Go, with native UI or a web frontend
- 🥨 Lobe Icons - AI / LLM brand logos and icons
- ✒️ Lobe Editor - Lexical-based rich text editor for React, with Markdown, plugins and a chat composer
- 😀 Fluent Emoji - Fluent Emoji assets
- 📖 Docs Kit - Reusable documentation toolkit and lobedocs CLI for LobeHub component libraries