purekit

module
v0.0.0-...-58b9e34 Latest Latest
Warning

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

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

README

PureKit

PureKit is a UI kit for native Go apps built with MyGo. It renders components on the GPU and runs interactive examples in the browser through WebAssembly.

Getting started · Component catalog · Changelog · GitHub

Quality checks Go reference MIT license

Components

  • Over 70 components for actions, inputs, forms, navigation, overlays, and layout.
  • System light and dark appearance, with configurable colors, radii, and type sizes.
  • Springs and shared-element transitions for controls, popups, and notifications.
  • Native desktop builds in pure Go, with Lucide icons and component strings in English and Simplified Chinese.

Button variants in light and dark modes

Getting started

PureKit requires Go 1.27.3 or later.

go get github.com/puremixlab/purekit
package main

import (
	"fmt"
	"log"

	"github.com/egoist/mygo"
	"github.com/egoist/mygo/ui"
	"github.com/puremixlab/purekit/pkg/action"
	"github.com/puremixlab/purekit/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 PureKit", 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 PureKit", 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 and use theme.TokensOf(c) for its design tokens. For a full desktop window with a title bar, sidebar, tabs, and settings, see the desktop starter.

The desktop workspace connects an outline, a table and a resizable inspector. The native desktop guide covers system panels and menu bar items.

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, ComboBox, TokenField, Stepper, TimePicker, DateRangePicker, ImageWell, RichTextEditor, RuleEditor
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, Table, Outline, OutlineTable, CollectionView, ColumnView, Chart
pkg/feedback Alert, Badge, Progress, Spin, Result, Modal, Drawer, Toast, FloatingPanel, FloatingSheet, LevelIndicator
pkg/overlay Tooltip, Popover, DropdownMenu, ContextMenu
pkg/nav Tabs, Pagination, Breadcrumb, Steps, Burger, PathControl
pkg/layout Block, Grid, Divider, ScrollArea, DraggablePanel, Header, SideNav, DraggableSideNav, Layout, GuideCard, SortableList, SplitView, Inspector, Toolbar
pkg/command Shared toolbar, keyboard and native menu commands
pkg/desktop Native sheets, panels, save dialogs, status items, macOS sharing, Font panel and Quick Look
pkg/form Form, Field, Group, SubmitFooter
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

Local development

Use Go 1.27.3 or newer and Bun 1.4 or newer.

git clone https://github.com/puremixlab/purekit.git
cd purekit
go test ./...
go run ./catalog
go run ./examples/desktop
bun install --frozen-lockfile
bun run dev

Each component page includes a live demo and a Go API table. Use bun run build to generate the static documentation in dist. Set PUREKIT_DOCS_URL to the public site origin when building for deployment. Local builds use http://localhost:5173.

Attribution and license

PureKit is based on Lobe MyGo by LobeHub. The design tokens are generated from Lobe UI.

Copyright © 2026 LobeHub. See the MIT license and the Lucide and Feather icon notices.

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, the README banner and the site icons.
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, the README banner and the site icons.
examples
desktop command
gallery command
native-panels command
workspace command
pkg
command
Package command shares an action between a toolbar, shortcuts and a native menu.
Package command shares an action between a toolbar, shortcuts and a native menu.
desktop
Package desktop opens native windows, panels and menus from PureKit desktop apps.
Package desktop opens native windows, panels and menus from PureKit desktop apps.
internal/l10n
Package l10n holds the texts PureKit 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 PureKit 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