uix

module
v0.0.0-...-f254331 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: MIT

README

uix

uix is a shadcn/ui-style component registry for the MyGo native UI toolkit.

The model follows shadcn/ui. A component is source code that you copy into your project and own. It is not a library you import. The uix command installs components from a registry into your Go module.

The components draw with MyGo's native UI. They do not use a webview.

Quick start

Install the base set, which contains the design tokens:

uix init

Add a component:

uix add button

Use it in a view:

package main

import (
	"github.com/egoist/mygo"
	"github.com/egoist/mygo/ui"
	"demo/internal/ui/tokens"
	"demo/internal/ui/components/button"
)

func view(c *ui.Context) {
	c.SetTheme(tokens.For(c.Theme().Dark))
	ui.Column(c).Fill().Center().Gap(12).Children(func() {
		button.Button(c, button.Props{
			Label:   "Save",
			Variant: button.Primary,
			OnClick: save,
		})
	})
}

func main() {
	mygo.App.WhenReady(func() {
		mygo.NewWindow(mygo.WindowOptions{
			Title:   "Demo",
			Width:   420,
			Height:  280,
			Content: ui.View(view),
		})
	})
	if err := mygo.App.Run(); err != nil {
		panic(err)
	}
}

Components

Component Role
base Design tokens, light and dark
button Button in six variants and three sizes
field Form field: label, hint, error
input Text input, one line
checkbox Check box with a label
switch Switch with a label
slider Slider with a label and a readout
select Drop-down with a placeholder
badge Pill label in four variants
progress Progress bar with a label and a readout
dialog Modal dialog with a title and actions
toast Transient notification at a window corner
dropdown Menu that opens from a button
tabs Tab list with an accent bar for the active tab
radio Radio group with one Tab stop
textarea Text area, many lines, with a height in rows
table Data table with sort, choice and a header band
card Rounded container with a header, content and footer
avatar Circle with a photo or initials
separator Horizontal or vertical divider
alert Colored notice in four variants
combobox Searchable drop-down that filters the options as you type
numberinput Number input with step buttons and arrow keys
searchfield Search box with a clear button and an Enter submission
rating Row of stars that set a score, or show one read-only
datepicker Calendar button that picks a date, by click or keyboard
timeinput Time field with stepping, typing and arrow keys
colorpicker Swatch that opens a picker with channels, hex and swatches
toggle Pressed button, like the icon toggles of a toolbar
accordion Bordered column of sections that a click opens and closes
collapsible Disclosure whose label shows and hides its content
breadcrumbs Path of items separated by chevrons, the last where you are
popover Panel below a trigger, closed by a click outside or Escape
togglegroup Row of toggle buttons, each with a tip, for a toolbar
tooltip Label that appears over a control after the pointer rests
menu Button that opens a menu of actions, with separators and disabled items
sidebar Navigation column of sections and items, one chosen
tree Hierarchical list whose branches open and close, one node chosen
split Resizable panes with a divider the user drags
list Scrolling list of rows that keeps its place, one row chosen
toolbar Row of actions along the top of a window, one stop of Tab
meter Progress meter that colors by how near the top it is
spinner Ring of spokes that turns while work goes on
rangeslider Track with two knobs that set the low and the high of a range
stepper Number with arrows that step it, which repeat as they are held
richtext Text of styled runs, each with its own weight, color or underline
editabletext Text that renames in place on a double click
findbar Bar to find in a document, with the count and the step buttons
segmented Row of segments of which one is chosen, a switch between views
grid Grid layout of columns the children fill in order, or place themselves in
gridview Scrolling grid of items, of which a click or the arrows choose one
scroll Container that scrolls its content vertically
fieldset Group of fields under a bold legend
autocomplete Field that completes the text typed, of the suggestions below it
tokenfield Field of tokens as chips, added on Enter and taken out by a button
calendar Month's calendar of which a click or the keys choose a day
checkboxgroup Group of check boxes under a check of all of them, mixed while some are
form Form whose field labels line up to the widest, as macOS draws them
scrollhorizontal Row that scrolls its content sideways
scrollboth Container that scrolls its content up and sideways
link Text that opens a URL, or a path of the Router it lives in
icon SVG shown as an icon, in the color of the text around it
image Bitmap or SVG shown as a picture, at its size or fitted into a box
colorwell Swatch that opens a color picker below it, as AppKit's color well
thinking "Thinking" indicator of an agent: a pulsing dot and steps that light up
log Scrolling list of an agent's steps that reveal one by one as they run
chat Message list with bubbles for the user and the assistant
composer Message box with a prompt and the send button for a chat
notificationcenter Panel of notifications in tabs, opened from a bell button
appshell App frame with a title, a sidebar and the page it switches
statcard Metric card with the delta against the previous period
linechart Line chart that follows the pointer, against a year earlier
barchart Paired bar chart that follows the pointer, against a year earlier
carousel Slides you flip with buttons, dots or a trackpad
pagination Page numbers with dots and the previous and next buttons
fileupload File zone that uploads a picked file with a progress ring

The last twelve rows are ports of BoardUI components to MyGo's native UI: the same roles and the same look, drawn without HTML. Where BoardUI leans on the browser (drag and drop, an input element), the port uses the closest native MyGo equivalent, such as the open dialog for a file pick.

Examples

The examples directory shows the components at work. An example imports the components of this repository directly, so it always shows the current source. See examples/README.md.

Commands

Command Action
uix init Install the base set (design tokens) into the current Go module.
uix add <name> Install a component and its dependencies into the current Go module.
uix list List the components in the registry.
uix theme list List the palettes a module can pick.
uix theme set <name> Write a palette into the tokens of the current module.
uix theme set custom <hex> Derive a palette from your own accent color.
uix registry build Rebuild the embedded registry from the components directory.
uix registry serve Serve the registry over HTTP, so other machines can uix add from it.

Use -dir to point at another Go module, and -registry <url> to add from a remote registry.

HTTP registry

The registry is embedded in the uix binary. To serve it over HTTP so uix add works from another machine:

uix registry serve -addr :7373           # serve the embedded registry
curl http://localhost:7373/registry.json # the registry as one JSON file

On the consumer machine, point uix add at it:

uix add button -registry http://localhost:7373/registry.json

Or write the URL into uix.config.json, and every uix add in that module uses it:

{
  "registry": "http://localhost:7373/registry.json"
}

To publish a registry you build from the current components (for example, a fork), build the JSON and host it anywhere:

go run ./cmd/uix registry build -out dist/registry.json

How it works

The registry is one JSON file. Each item carries its files with their content. The uix add command reads the registry, writes the files into internal/ui, and fetches the Go modules they need.

shadcn/ui uix
npx shadcn add button uix add button
CSS variables (design tokens) internal/ui/tokens themes
Radix primitives MyGo ui primitives
Tailwind classes Theme colors in the Context
components/ui/*.tsx internal/ui/components/*
cn() util Variant system in each component

Design tokens

The MyGo theme names its colors semantically. The tokens package curates their values into one palette. It maps to the shadcn tokens:

shadcn token MyGo field
background Background
foreground Text
primary Accent
primary-foreground AccentText
secondary Surface
muted SurfaceHover
muted-foreground TextMuted
destructive Danger
border Border
ring Focus

Apply the palette at the top of a view:

c.SetTheme(tokens.For(c.Theme().Dark))
Choosing a palette

Pick another palette from the built-in set:

uix theme list
uix theme set emerald

Each palette is one accent scale for both appearances, with the danger color and the text color on the accent. uix theme set regenerates internal/ui/tokens/tokens.go, which you own: the palettes are a starting point, and the file stays yours to edit.

Derive a palette from your own accent color, the way the shadcn/ui theme builder turns one swatch into a theme:

uix theme set custom '#f97316'

The light appearance keeps your accent and darkens it for hover and press; the dark appearance lightens it so it reads on the dark background. The text color on the accent follows the luminance, white or near-black. The danger color stays the default of the built-in palettes, and a very light accent keeps its color in the dark appearance instead of washing out.

Writing a component

Add a directory under components. Each directory is one item. An optional uix.json in it says how the item installs:

{
  "type": "components:ui",
  "install": "internal/ui/components/button",
  "dependencies": ["github.com/egoist/mygo"],
  "registryDependencies": ["base"]
}

The defaults are the base set at internal/ui and components at internal/ui/components/<name>.

Then rebuild the registry:

go run ./cmd/uix registry build

Write a headless test for the component. MyGo renders frames in memory without a window:

func TestClick(t *testing.T) {
	clicks := 0
	tt := ui.NewTester(view, 200, 100)
	_ = tt.Click("Go")
	if clicks != 1 {
		t.Fatal("want one click")
	}
}
  • MujicaUI — a court-gothic component library for MyGo native UI. Ivory and charcoal base, wine-red accent, old-gold ornament lines, serif titles. 100 components, light and dark themes, three densities. MyGo draws the UI on the GPU; no webview. MIT.
  • GoRex — a clone of Superlogical's Rex terminal in MyGo native UI. Tabs and split panes, persistent sessions, program activity. No webview, no cgo; one ~15 MB app.
  • Godiff — a reimplementation of codiff in MyGo native UI. Review Git changes and commit them, all local. No webview, no JavaScript.
  • MyGo 复刻 DeepSeek harness 界面 — 海拉鲁编程客 (@hylarucoder). Pure Go, no JS/TS. AI copied DeepSeek's harness interface, including the streaming chat page and the trace page.
  • MyGo Native UI docs — the toolkit these components draw with. Windows written in Go with package ui: no HTML, no JavaScript, no webview; MyGo draws them on the GPU.
  • MyGo Terminal plugin — a terminal for native UI that runs the shell or any program with Ghostty's emulator (libghostty-vt). All Go, no cgo.

Rules

  • A component imports only github.com/egoist/mygo and the sibling components it composes. uix add rewrites the import of a sibling to the path the copy has in your module, so the copies never pull in the registry's module.
  • A component reads its colors from the theme of the Context. It does not hard-code colors.
  • Every component ships with a headless test that proves its behavior.

Known limits

  • The custom-face variants draw their hover and press states with Draw, which tracks the pointer. Primary and Secondary keep the MyGo look, whose disabled state stays colored.
  • A tooltip shows after the pointer rests, so its test waits the same moment of real time before it checks the label.

Directories

Path Synopsis
cmd
uix command
Command uix installs shadcn/ui-style components into a MyGo native UI app.
Command uix installs shadcn/ui-style components into a MyGo native UI app.
components
accordion
Package accordion provides a shadcn/ui-style Accordion: a column of sections in a bordered box, one above the other, that a click opens and closes, as do Enter and Space, and that the Up and Down arrows move between.
Package accordion provides a shadcn/ui-style Accordion: a column of sections in a bordered box, one above the other, that a click opens and closes, as do Enter and Space, and that the Up and Down arrows move between.
alert
Package alert provides a shadcn/ui-style Alert: a colored notice with a bold title and an optional description, in the accent, success, warning or danger color.
Package alert provides a shadcn/ui-style Alert: a colored notice with a bold title and an optional description, in the accent, success, warning or danger color.
appshell
Package appshell provides the AppShell of BoardUI for the MyGo native toolkit: the page frame of a starter, with the sidebar, the breadcrumb trail, the page heading and its actions, and the content below.
Package appshell provides the AppShell of BoardUI for the MyGo native toolkit: the page frame of a starter, with the sidebar, the breadcrumb trail, the page heading and its actions, and the content below.
autocomplete
Package autocomplete provides a field that completes the text as it is typed, as a shadcn/ui component for the Autocomplete of MyGo: the suggestions containing the text show below it, those starting with it first, and Up and Down move among them while Enter takes one.
Package autocomplete provides a field that completes the text as it is typed, as a shadcn/ui component for the Autocomplete of MyGo: the suggestions containing the text show below it, those starting with it first, and Up and Down move among them while Enter takes one.
avatar
Package avatar provides a shadcn/ui-style Avatar: a circle with a photo, or the initials of a name on a muted face.
Package avatar provides a shadcn/ui-style Avatar: a circle with a photo, or the initials of a name on a muted face.
badge
Package badge provides a shadcn/ui-style badge: a short label in a pill, for counts and status.
Package badge provides a shadcn/ui-style badge: a short label in a pill, for counts and status.
barchart
Package barchart provides the OrdersChartCard of BoardUI for the MyGo native toolkit: a card of a year of monthly orders as paired bars, the current year against the year before.
Package barchart provides the OrdersChartCard of BoardUI for the MyGo native toolkit: a card of a year of monthly orders as paired bars, the current year against the year before.
base
Package tokens provides the palette a uix app installs, the way the CSS variables of shadcn/ui give a web app its design tokens.
Package tokens provides the palette a uix app installs, the way the CSS variables of shadcn/ui give a web app its design tokens.
breadcrumbs
Package breadcrumbs provides a shadcn/ui-style Breadcrumb: a path of items separated by chevrons, as Finder's path bar shows one.
Package breadcrumbs provides a shadcn/ui-style Breadcrumb: a path of items separated by chevrons, as Finder's path bar shows one.
button
Package button provides a shadcn/ui-style Button for the MyGo native toolkit.
Package button provides a shadcn/ui-style Button for the MyGo native toolkit.
calendar
Package calendar provides a month's calendar choosing a day, as a shadcn/ui component for the Calendar of MyGo, like the graphical date picker of SwiftUI.
Package calendar provides a month's calendar choosing a day, as a shadcn/ui component for the Calendar of MyGo, like the graphical date picker of SwiftUI.
card
Package card provides a shadcn/ui-style Card: a bordered rounded container with an optional header and footer, for grouping related content on a surface.
Package card provides a shadcn/ui-style Card: a bordered rounded container with an optional header and footer, for grouping related content on a surface.
carousel
Package carousel provides the gallery carousel of BoardUI for the MyGo native toolkit: a horizontal run of slides you slide through with the previous and next buttons or the position dots, or with a trackpad.
Package carousel provides the gallery carousel of BoardUI for the MyGo native toolkit: a horizontal run of slides you slide through with the previous and next buttons or the position dots, or with a trackpad.
chat
Package chat provides a working chat surface for the MyGo native toolkit, built from the agent components: a transcript that scrolls, the thinking indicator while the model works, and the composer at the bottom.
Package chat provides a working chat surface for the MyGo native toolkit, built from the agent components: a transcript that scrolls, the thinking indicator while the model works, and the composer at the bottom.
checkbox
Package checkbox provides a shadcn/ui-style check box: a box and a label that toggle a bool together, from the Checkbox of MyGo.
Package checkbox provides a shadcn/ui-style check box: a box and a label that toggle a bool together, from the Checkbox of MyGo.
checkboxgroup
Package checkboxgroup provides a group of check boxes under a check of all of them, as a shadcn/ui component for the CheckboxGroup of MyGo: the label's check checks all the boxes, or none when they all are, and shows mixed while some are.
Package checkboxgroup provides a group of check boxes under a check of all of them, as a shadcn/ui component for the CheckboxGroup of MyGo: the label's check checks all the boxes, or none when they all are, and shows mixed while some are.
collapsible
Package collapsible provides a shadcn/ui-style Collapsible: a disclosure with a label and an arrow, which a click opens and closes, as do Enter and Space, showing below it what Children draws while *Open is true.
Package collapsible provides a shadcn/ui-style Collapsible: a disclosure with a label and an arrow, which a click opens and closes, as do Enter and Space, showing below it what Children draws while *Open is true.
colorpicker
Package colorpicker provides a shadcn/ui-style ColorPicker: a swatch of the color, whose picker below it changes it — a square of saturation and brightness, sliders of the hue and the opacity, the color in hex, and swatches of common colors.
Package colorpicker provides a shadcn/ui-style ColorPicker: a swatch of the color, whose picker below it changes it — a square of saturation and brightness, sliders of the hue and the opacity, the color in hex, and swatches of common colors.
colorwell
Package colorwell provides a swatch of a color that opens a picker below it, as AppKit's color well does, for the ColorWell of MyGo.
Package colorwell provides a swatch of a color that opens a picker below it, as AppKit's color well does, for the ColorWell of MyGo.
combobox
Package combobox provides a shadcn/ui-style Combobox: a searchable drop-down.
Package combobox provides a shadcn/ui-style Combobox: a searchable drop-down.
composer
Package composer provides the free AgentComposer of BoardUI for the MyGo native toolkit: a pill with a text field and circular controls, and the thin status row beneath it.
Package composer provides the free AgentComposer of BoardUI for the MyGo native toolkit: a pill with a text field and circular controls, and the thin status row beneath it.
datepicker
Package datepicker provides a shadcn/ui-style DatePicker: a field showing the date, whose calendar below it changes it, the arrows and Enter moving among the days and Page Up and Page Down among the months.
Package datepicker provides a shadcn/ui-style DatePicker: a field showing the date, whose calendar below it changes it, the arrows and Enter moving among the days and Page Up and Page Down among the months.
dialog
Package dialog provides a shadcn/ui-style modal dialog with a title, a description and an action row, on top of the DialogBase of MyGo.
Package dialog provides a shadcn/ui-style modal dialog with a title, a description and an action row, on top of the DialogBase of MyGo.
dropdown
Package dropdown provides a shadcn/ui-style dropdown menu: a button that opens a list of actions under it, to run one.
Package dropdown provides a shadcn/ui-style dropdown menu: a button that opens a list of actions under it, to run one.
editabletext
Package editabletext provides a text the user edits in place, as a shadcn/ui component for the EditableText of MyGo: a double click on it, or Enter while it has the focus, shows a field of it, with the text before the extension chosen, ready to type over.
Package editabletext provides a text the user edits in place, as a shadcn/ui component for the EditableText of MyGo: a double click on it, or Enter while it has the focus, shows a field of it, with the text before the extension chosen, ready to type over.
field
Package field wraps a form control with its label and helper text, as the FormItem of shadcn/ui does.
Package field wraps a form control with its label and helper text, as the FormItem of shadcn/ui does.
fieldset
Package fieldset provides a group of fields under a legend, as a shadcn/ui component for the Fieldset of MyGo.
Package fieldset provides a group of fields under a legend, as a shadcn/ui component for the Fieldset of MyGo.
fileupload
Package fileupload provides the file upload of BoardUI for the MyGo native toolkit: a drop zone you click to pick a file, which then uploads with a progress ring and a percentage until it is done.
Package fileupload provides the file upload of BoardUI for the MyGo native toolkit: a drop zone you click to pick a file, which then uploads with a progress ring and a percentage until it is done.
findbar
Package findbar provides a bar to find within a document, as a shadcn/ui component for the FindBar of MyGo: a search field, the count and the current match, and buttons to step to the next and the previous.
Package findbar provides a bar to find within a document, as a shadcn/ui component for the FindBar of MyGo: a search field, the count and the current match, and buttons to step to the next and the previous.
form
Package form provides a form whose field labels line up, in the way macOS draws them: a column of fields, with the label of each to its left, right-aligned to the widest.
Package form provides a form whose field labels line up, in the way macOS draws them: a column of fields, with the label of each to its left, right-aligned to the widest.
grid
Package grid provides a grid layout, as a shadcn/ui component for the Grid of MyGo: children placed in cells of columns, which they fill in order, or place themselves in with the placement of a cell.
Package grid provides a grid layout, as a shadcn/ui component for the Grid of MyGo: children placed in cells of columns, which they fill in order, or place themselves in with the placement of a cell.
gridview
Package gridview provides a scrolling grid of items, as a shadcn/ui component for the GridView of MyGo: as many columns as items of a minimum width fit, a click chooses an item, and the arrow keys move the choice around.
Package gridview provides a scrolling grid of items, as a shadcn/ui component for the GridView of MyGo: as many columns as items of a minimum width fit, a click chooses an item, and the arrow keys move the choice around.
icon
Package icon provides an SVG shown as an icon, in the color of the text around it, for the Icon of MyGo.
Package icon provides an SVG shown as an icon, in the color of the text around it, for the Icon of MyGo.
image
Package image provides a bitmap or an SVG shown as a picture, for the Image of MyGo.
Package image provides a bitmap or an SVG shown as a picture, for the Image of MyGo.
input
Package input provides a shadcn/ui-style text field for the MyGo native toolkit: a single-line TextInput.
Package input provides a shadcn/ui-style text field for the MyGo native toolkit: a single-line TextInput.
linechart
Package linechart provides the RevenueChartCard of BoardUI for the MyGo native toolkit: a card of a year of monthly values drawn against the year before.
Package linechart provides the RevenueChartCard of BoardUI for the MyGo native toolkit: a card of a year of monthly values drawn against the year before.
link
Package link provides a text that opens a URL in the browser when it is clicked, as a shadcn/ui component for the Link of MyGo.
Package link provides a text that opens a URL in the browser when it is clicked, as a shadcn/ui component for the Link of MyGo.
list
Package list provides a scrolling list of rows, from the mygo List widget.
Package list provides a scrolling list of rows, from the mygo List widget.
log
Package log provides the AgentLog of BoardUI for the MyGo native toolkit: a transcript of an agent's work, each line joined to the next by a curved tree guide, with a working row of stars while the agent is still going.
Package log provides the AgentLog of BoardUI for the MyGo native toolkit: a transcript of an agent's work, each line joined to the next by a curved tree guide, with a working row of stars while the agent is still going.
menu
Package menu provides a shadcn/ui-style Menu: a button showing a label and an arrow, which opens a menu below it, as the pointer goes down on it, or for Enter, Space or Down while it has the focus.
Package menu provides a shadcn/ui-style Menu: a button showing a label and an arrow, which opens a menu below it, as the pointer goes down on it, or for Enter, Space or Down while it has the focus.
meter
Package meter provides a shadcn/ui-style meter: a bar that shows a measure against its range, colored by how near the top it is, with a label and a live readout, from the Meter of MyGo.
Package meter provides a shadcn/ui-style meter: a bar that shows a measure against its range, colored by how near the top it is, with a label and a live readout, from the Meter of MyGo.
notificationcenter
Package notificationcenter provides the NotificationCenter of BoardUI for the MyGo native toolkit: a panel of notifications with a title, an unread count, a mark-all-read control, and tabs that filter the list.
Package notificationcenter provides the NotificationCenter of BoardUI for the MyGo native toolkit: a panel of notifications with a title, an unread count, a mark-all-read control, and tabs that filter the list.
numberinput
Package numberinput provides a shadcn/ui-style NumberInput: a field for a number between bounds, which the arrows and the buttons beside it step by step.
Package numberinput provides a shadcn/ui-style NumberInput: a field for a number between bounds, which the arrows and the buttons beside it step by step.
pagination
Package pagination provides the pagination of BoardUI for the MyGo native toolkit: previous and next buttons and the page numbers, with the overflow of a long list of pages collapsing into dots around the current page.
Package pagination provides the pagination of BoardUI for the MyGo native toolkit: previous and next buttons and the page numbers, with the overflow of a long list of pages collapsing into dots around the current page.
popover
Package popover provides a shadcn/ui-style Popover: a panel that shows below the element Trigger draws, while *Open is true, and that a click on the trigger opens and closes.
Package popover provides a shadcn/ui-style Popover: a panel that shows below the element Trigger draws, while *Open is true, and that a click on the trigger opens and closes.
progress
Package progress provides a shadcn/ui-style progress bar with a label and a live readout, from the Progress of MyGo.
Package progress provides a shadcn/ui-style progress bar with a label and a live readout, from the Progress of MyGo.
radio
Package radio provides a shadcn/ui-style radio group: a column of options, of which one is chosen.
Package radio provides a shadcn/ui-style radio group: a column of options, of which one is chosen.
rangeslider
Package rangeslider provides a shadcn/ui-style range slider: a track with two knobs that set the low and the high of a range, with a label and a live readout, from the RangeSlider of MyGo.
Package rangeslider provides a shadcn/ui-style range slider: a track with two knobs that set the low and the high of a range, with a label and a live readout, from the RangeSlider of MyGo.
rating
Package rating provides a shadcn/ui-style Rating: a row of stars that show and set a score, by a click or the arrows.
Package rating provides a shadcn/ui-style Rating: a row of stars that show and set a score, by a click or the arrows.
richtext
Package richtext provides a text of styled runs, as a shadcn/ui component for the RichText of MyGo: spans with their own weight, color, underline or background, over the style of the text around them.
Package richtext provides a text of styled runs, as a shadcn/ui component for the RichText of MyGo: spans with their own weight, color, underline or background, over the style of the text around them.
scroll
Package scroll provides a container that scrolls its content, as a shadcn/ui component for the Scroll of MyGo.
Package scroll provides a container that scrolls its content, as a shadcn/ui component for the Scroll of MyGo.
scrollboth
Package scrollboth provides a container that scrolls its content both ways, as a canvas or a wide table does, for the ScrollBoth of MyGo.
Package scrollboth provides a container that scrolls its content both ways, as a canvas or a wide table does, for the ScrollBoth of MyGo.
scrollhorizontal
Package scrollhorizontal provides a container that scrolls its content horizontally, as a shadcn/ui component for the ScrollHorizontal of MyGo.
Package scrollhorizontal provides a container that scrolls its content horizontally, as a shadcn/ui component for the ScrollHorizontal of MyGo.
searchfield
Package searchfield provides a shadcn/ui-style SearchField: a field for searching, with a magnifying glass and a button that clears the text.
Package searchfield provides a shadcn/ui-style SearchField: a field for searching, with a magnifying glass and a button that clears the text.
segmented
Package segmented provides a segmented control: a row of segments of which one is chosen, as a shadcn/ui component for the Segmented of MyGo, a switch between views.
Package segmented provides a segmented control: a row of segments of which one is chosen, as a shadcn/ui component for the Segmented of MyGo, a switch between views.
select
Package selector provides a shadcn/ui-style drop-down: a trigger button that opens a list of options to choose one from.
Package selector provides a shadcn/ui-style drop-down: a trigger button that opens a list of options to choose one from.
separator
Package separator provides a shadcn/ui-style Separator: a thin line that divides content, horizontal or vertical.
Package separator provides a shadcn/ui-style Separator: a thin line that divides content, horizontal or vertical.
sidebar
Package sidebar provides a shadcn/ui-style Sidebar: a rail of sections and items at the side of a window, as Finder's sidebar shows one.
Package sidebar provides a shadcn/ui-style Sidebar: a rail of sections and items at the side of a window, as Finder's sidebar shows one.
slider
Package slider provides a shadcn/ui-style slider: a track and a knob that set a number, with a label and a live readout above it.
Package slider provides a shadcn/ui-style slider: a track and a knob that set a number, with a label and a live readout above it.
spinner
Package spinner provides a shadcn/ui-style spinner: a ring of spokes that turns while work goes on, from the Spinner of MyGo.
Package spinner provides a shadcn/ui-style spinner: a ring of spokes that turns while work goes on, from the Spinner of MyGo.
split
Package split provides resizable panes, from the mygo Split widget.
Package split provides resizable panes, from the mygo Split widget.
statcard
Package statcard provides the KPI stat cards of BoardUI for the MyGo native toolkit: a grid of metric cards in two looks, the compact plain card and the display-size footer card.
Package statcard provides the KPI stat cards of BoardUI for the MyGo native toolkit: a grid of metric cards in two looks, the compact plain card and the display-size footer card.
stepper
Package stepper provides a shadcn/ui-style stepper: a number with two arrow buttons that step it, and a label and a live readout, from the Stepper of MyGo.
Package stepper provides a shadcn/ui-style stepper: a number with two arrow buttons that step it, and a label and a live readout, from the Stepper of MyGo.
switch
Package switcher provides a shadcn/ui-style switch with a label, from the Switch of MyGo.
Package switcher provides a shadcn/ui-style switch with a label, from the Switch of MyGo.
table
Package table provides a shadcn/ui-style data table for the MyGo native toolkit, on top of the Table of MyGo: a bordered box with a header band, rows that highlight under the pointer, and a chosen row in the accent color.
Package table provides a shadcn/ui-style data table for the MyGo native toolkit, on top of the Table of MyGo: a bordered box with a header band, rows that highlight under the pointer, and a chosen row in the accent color.
tabs
Package tabs provides a shadcn/ui-style tab list: a row of triggers that switch a pane of content, of which one is chosen.
Package tabs provides a shadcn/ui-style tab list: a row of triggers that switch a pane of content, of which one is chosen.
textarea
Package textarea provides a shadcn/ui-style multi-line text field for the MyGo native toolkit.
Package textarea provides a shadcn/ui-style multi-line text field for the MyGo native toolkit.
thinking
Package thinking provides the AgentThinking indicator of BoardUI for the MyGo native toolkit: a row of a working indicator, a label and an elapsed timer, drawn while an agent works on a response.
Package thinking provides the AgentThinking indicator of BoardUI for the MyGo native toolkit: a row of a working indicator, a label and an elapsed timer, drawn while an agent works on a response.
timeinput
Package timeinput provides a shadcn/ui-style TimeInput: a field of the time of day, whose hours and minutes each take the focus, stepped by the arrows and set by the digits typed.
Package timeinput provides a shadcn/ui-style TimeInput: a field of the time of day, whose hours and minutes each take the focus, stepped by the arrows and set by the digits typed.
toast
Package toast provides shadcn/ui-style toasts for the MyGo native toolkit: a viewport to draw them in, and a way to push them.
Package toast provides shadcn/ui-style toasts for the MyGo native toolkit: a viewport to draw them in, and a way to push them.
toggle
Package toggle provides a shadcn/ui-style Toggle: a button that stays pressed while it is on, as Bold in an editor's toolbar, which a click or Space while it has the focus turns over.
Package toggle provides a shadcn/ui-style Toggle: a button that stays pressed while it is on, as Bold in an editor's toolbar, which a click or Space while it has the focus turns over.
togglegroup
Package togglegroup provides a shadcn/ui-style ToggleGroup: a row of toggle buttons drawn joined as the segments of one control, as Bold, Italic and Underline in an editor's toolbar.
Package togglegroup provides a shadcn/ui-style ToggleGroup: a row of toggle buttons drawn joined as the segments of one control, as Bold, Italic and Underline in an editor's toolbar.
tokenfield
Package tokenfield provides a field of tokens, as of tags or the recipients of a mail, as a shadcn/ui component for the TokenField of MyGo: the tokens show as chips, each with a button taking it out, and typing adds one on Enter or a comma, the suggestions of what was typed showing below it, of those not already chips.
Package tokenfield provides a field of tokens, as of tags or the recipients of a mail, as a shadcn/ui component for the TokenField of MyGo: the tokens show as chips, each with a button taking it out, and typing adds one on Enter or a comma, the suggestions of what was typed showing below it, of those not already chips.
toolbar
Package toolbar provides a row of actions along the top of a window, from the mygo Toolbar widget.
Package toolbar provides a row of actions along the top of a window, from the mygo Toolbar widget.
tooltip
Package tooltip provides a shadcn/ui-style Tooltip: a hint that shows once the pointer has rested on the anchor for a moment, and goes as the pointer leaves it or presses it, and with Escape, until the pointer or the focus comes back.
Package tooltip provides a shadcn/ui-style Tooltip: a hint that shows once the pointer has rested on the anchor for a moment, and goes as the pointer leaves it or presses it, and with Escape, until the pointer or the focus comes back.
tree
Package tree provides a hierarchical list whose branches open and close, from the mygo Tree and TreeItem widgets.
Package tree provides a hierarchical list whose branches open and close, from the mygo Tree and TreeItem widgets.
examples
agent command
The agent example shows the appshell, chat, composer, log, notificationcenter and thinking components together in a starter for an agentic app: a demo model streams an answer in the chat, the log reveals its steps, and the notifications filter by tab.
The agent example shows the appshell, chat, composer, log, notificationcenter and thinking components together in a starter for an agentic app: a demo model streams an answer in the chat, the log reveals its steps, and the notifications filter by tab.
agent/cmd/snapshot command
Command snapshot renders the agent example headless into PNG files, so the components can be seen without opening a window:
Command snapshot renders the agent example headless into PNG files, so the components can be seen without opening a window:
agent/view
Package view builds the agent example: a window of MyGo native UI that shows the appshell, chat, composer, log, notificationcenter and thinking components together in a starter for an agentic app.
Package view builds the agent example: a window of MyGo native UI that shows the appshell, chat, composer, log, notificationcenter and thinking components together in a starter for an agentic app.
composer command
The composer example shows the autocomplete, tokenfield, calendar and checkboxgroup components together in a form creating an appointment: the task field completes what is typed, the tag field keeps a set of tags, the calendar picks the due day, and the reminder group chooses how to be reminded.
The composer example shows the autocomplete, tokenfield, calendar and checkboxgroup components together in a form creating an appointment: the task field completes what is typed, the tag field keeps a set of tags, the calendar picks the due day, and the reminder group chooses how to be reminded.
composer/cmd/snapshot command
Command snapshot renders the composer example headless into PNG files, so the components can be seen without opening a window:
Command snapshot renders the composer example headless into PNG files, so the components can be seen without opening a window:
composer/view
Package view builds the composer example: a window of MyGo native UI that shows the autocomplete, tokenfield, calendar and checkboxgroup components together in a form creating an appointment.
Package view builds the composer example: a window of MyGo native UI that shows the autocomplete, tokenfield, calendar and checkboxgroup components together in a form creating an appointment.
dashboard command
The dashboard example shows the appshell, statcard, linechart and barchart components together in a store overview: the metric cards up top, the two charts side by side, and the display cards under them.
The dashboard example shows the appshell, statcard, linechart and barchart components together in a store overview: the metric cards up top, the two charts side by side, and the display cards under them.
dashboard/cmd/snapshot command
Command snapshot renders the dashboard example headless into PNG files, so the components can be seen without opening a window:
Command snapshot renders the dashboard example headless into PNG files, so the components can be seen without opening a window:
dashboard/view
Package view builds the dashboard example: a window of MyGo native UI that shows the appshell, statcard, linechart and barchart components together as a store overview.
Package view builds the dashboard example: a window of MyGo native UI that shows the appshell, statcard, linechart and barchart components together as a store overview.
docreader command
Example docreader opens a window of MyGo native UI that shows the richtext, editabletext, findbar and segmented components together in a document reader.
Example docreader opens a window of MyGo native UI that shows the richtext, editabletext, findbar and segmented components together in a document reader.
docreader/cmd/snapshot command
Command snapshot renders the docreader example headless into PNG files, so the components can be seen without opening a window:
Command snapshot renders the docreader example headless into PNG files, so the components can be seen without opening a window:
docreader/view
Package view builds the docreader example: a window of MyGo native UI that shows the richtext, editabletext, findbar and segmented components together in a document reader.
Package view builds the docreader example: a window of MyGo native UI that shows the richtext, editabletext, findbar and segmented components together in a document reader.
editor command
Example editor opens a window of MyGo native UI that shows the sidebar, togglegroup, tooltip and menu components together in a note editor.
Example editor opens a window of MyGo native UI that shows the sidebar, togglegroup, tooltip and menu components together in a note editor.
editor/cmd/snapshot command
Command snapshot renders the editor example headless into PNG files, so the components can be seen without opening a window:
Command snapshot renders the editor example headless into PNG files, so the components can be seen without opening a window:
editor/view
Package view builds the editor example: a window of MyGo native UI that shows the sidebar, togglegroup, tooltip and menu components together in a note editor.
Package view builds the editor example: a window of MyGo native UI that shows the sidebar, togglegroup, tooltip and menu components together in a note editor.
events command
Example events opens a window of MyGo native UI that shows the datepicker, timeinput, colorpicker and toggle components together: an event whose date, time and color the pickers set and whose reminder a toggle arms, with a summary line that reflects every change.
Example events opens a window of MyGo native UI that shows the datepicker, timeinput, colorpicker and toggle components together: an event whose date, time and color the pickers set and whose reminder a toggle arms, with a summary line that reflects every change.
events/cmd/snapshot command
Command snapshot renders the events example headless into PNG files, so the components can be seen without opening a window:
Command snapshot renders the events example headless into PNG files, so the components can be seen without opening a window:
events/view
Package view builds the events example: a window of MyGo native UI that shows the datepicker, timeinput, colorpicker and toggle components together, as an event the fields edit and a summary line reflects.
Package view builds the events example: a window of MyGo native UI that shows the datepicker, timeinput, colorpicker and toggle components together, as an event the fields edit and a summary line reflects.
explorer command
Example explorer opens a window of MyGo native UI that shows the toolbar, tree, split and list components together in a small file browser.
Example explorer opens a window of MyGo native UI that shows the toolbar, tree, split and list components together in a small file browser.
explorer/cmd/snapshot command
Command snapshot renders the explorer example headless into PNG files, so the components can be seen without opening a window:
Command snapshot renders the explorer example headless into PNG files, so the components can be seen without opening a window:
explorer/view
Package view builds the explorer example: a window of MyGo native UI that shows the toolbar, tree, split and list components together in a small file browser.
Package view builds the explorer example: a window of MyGo native UI that shows the toolbar, tree, split and list components together in a small file browser.
feedback command
Example feedback opens a window of MyGo native UI that shows the feedback controls of uix together: badge, progress, toast and dialog, plus the button they build on.
Example feedback opens a window of MyGo native UI that shows the feedback controls of uix together: badge, progress, toast and dialog, plus the button they build on.
feedback/cmd/snapshot command
Command snapshot renders the feedback example headless into PNG files, so the components can be seen without opening a window:
Command snapshot renders the feedback example headless into PNG files, so the components can be seen without opening a window:
feedback/view
Package view builds the feedback example: a window of MyGo native UI that shows the feedback controls of uix together.
Package view builds the feedback example: a window of MyGo native UI that shows the feedback controls of uix together.
files command
Example files opens a window of MyGo native UI that shows the table component at work: a file browser whose columns sort, whose rows are chosen, and whose chosen row opens with Enter or a double click.
Example files opens a window of MyGo native UI that shows the table component at work: a file browser whose columns sort, whose rows are chosen, and whose chosen row opens with Enter or a double click.
files/cmd/snapshot command
Command snapshot renders the files example headless into PNG files, so the table can be seen without opening a window:
Command snapshot renders the files example headless into PNG files, so the table can be seen without opening a window:
files/view
Package view builds the files example: a window of MyGo native UI that shows the table component at work, as a small file browser.
Package view builds the files example: a window of MyGo native UI that shows the table component at work, as a small file browser.
forms command
Example forms opens a window of MyGo native UI that shows the form controls of uix together: field, input, select, slider, switch, checkbox and button.
Example forms opens a window of MyGo native UI that shows the form controls of uix together: field, input, select, slider, switch, checkbox and button.
forms/cmd/snapshot command
Command snapshot renders the forms example headless into PNG files, so the components can be seen without opening a window:
Command snapshot renders the forms example headless into PNG files, so the components can be seen without opening a window:
forms/view
Package view builds the forms example: a window of MyGo native UI that shows the form controls of uix together.
Package view builds the forms example: a window of MyGo native UI that shows the form controls of uix together.
gallery command
The gallery example shows the grid, gridview, scroll and fieldset components together in a file gallery: two field sets filter the files by type and sort them by name or date, and a grid view shows the files that remain, of which a click chooses one.
The gallery example shows the grid, gridview, scroll and fieldset components together in a file gallery: two field sets filter the files by type and sort them by name or date, and a grid view shows the files that remain, of which a click chooses one.
gallery/cmd/snapshot command
Command snapshot renders the gallery example headless into PNG files, so the components can be seen without opening a window:
Command snapshot renders the gallery example headless into PNG files, so the components can be seen without opening a window:
gallery/view
Package view builds the gallery example: a window of MyGo native UI that shows the grid, gridview, scroll and fieldset components together in a file gallery.
Package view builds the gallery example: a window of MyGo native UI that shows the grid, gridview, scroll and fieldset components together in a file gallery.
helpcenter command
Example helpcenter opens a window of MyGo native UI that shows the breadcrumbs, accordion, collapsible and popover components together in a help page.
Example helpcenter opens a window of MyGo native UI that shows the breadcrumbs, accordion, collapsible and popover components together in a help page.
helpcenter/cmd/snapshot command
Command snapshot renders the help center example headless into PNG files, so the components can be seen without opening a window:
Command snapshot renders the help center example headless into PNG files, so the components can be seen without opening a window:
helpcenter/view
Package view builds the help center example: a window of MyGo native UI that shows the breadcrumbs, accordion, collapsible and popover components together in a help page.
Package view builds the help center example: a window of MyGo native UI that shows the breadcrumbs, accordion, collapsible and popover components together in a help page.
monitor command
Example monitor opens a window of MyGo native UI that shows the meter, spinner, rangeslider and stepper components together in a system monitor.
Example monitor opens a window of MyGo native UI that shows the meter, spinner, rangeslider and stepper components together in a system monitor.
monitor/cmd/snapshot command
Command snapshot renders the monitor example headless into PNG files, so the components can be seen without opening a window:
Command snapshot renders the monitor example headless into PNG files, so the components can be seen without opening a window:
monitor/view
Package view builds the monitor example: a window of MyGo native UI that shows the meter, spinner, rangeslider and stepper components together in a system monitor.
Package view builds the monitor example: a window of MyGo native UI that shows the meter, spinner, rangeslider and stepper components together in a system monitor.
navigation command
The navigation example shows the carousel, pagination and file upload components of BoardUI together in one page: the slides to flip through, the pages to step through, and the file zone to fill in.
The navigation example shows the carousel, pagination and file upload components of BoardUI together in one page: the slides to flip through, the pages to step through, and the file zone to fill in.
navigation/cmd/snapshot command
Command snapshot renders the navigation example headless into PNG files, so the components can be seen without opening a window:
Command snapshot renders the navigation example headless into PNG files, so the components can be seen without opening a window:
navigation/view
Package view builds the navigation example: a window of MyGo native UI that shows the carousel, pagination and file upload components of BoardUI together in one page.
Package view builds the navigation example: a window of MyGo native UI that shows the carousel, pagination and file upload components of BoardUI together in one page.
profile command
Example profile opens a window of MyGo native UI that shows the card, avatar, separator and alert components together: a profile page with a follow button that swaps its label and shows a success alert.
Example profile opens a window of MyGo native UI that shows the card, avatar, separator and alert components together: a profile page with a follow button that swaps its label and shows a success alert.
profile/cmd/snapshot command
Command snapshot renders the profile example headless into PNG files, so the components can be seen without opening a window:
Command snapshot renders the profile example headless into PNG files, so the components can be seen without opening a window:
profile/view
Package view builds the profile example: a window of MyGo native UI that shows the card, avatar, separator and alert components together, as a profile page.
Package view builds the profile example: a window of MyGo native UI that shows the card, avatar, separator and alert components together, as a profile page.
settings command
Example settings opens a window of MyGo native UI that shows the navigation controls of uix together: tabs, dropdown and radio, plus the switch, check box and badge they sit with.
Example settings opens a window of MyGo native UI that shows the navigation controls of uix together: tabs, dropdown and radio, plus the switch, check box and badge they sit with.
settings/cmd/snapshot command
Command snapshot renders the settings example headless into PNG files, so the components can be seen without opening a window:
Command snapshot renders the settings example headless into PNG files, so the components can be seen without opening a window:
settings/view
Package view builds the settings example: a window of MyGo native UI that shows the navigation controls of uix together.
Package view builds the settings example: a window of MyGo native UI that shows the navigation controls of uix together.
shop command
Example shop opens a window of MyGo native UI that shows the combobox, numberinput, searchfield and rating components together: a product catalog that a search box, a category box, a limit and a minimum rating all narrow at once.
Example shop opens a window of MyGo native UI that shows the combobox, numberinput, searchfield and rating components together: a product catalog that a search box, a category box, a limit and a minimum rating all narrow at once.
shop/cmd/snapshot command
Command snapshot renders the shop example headless into PNG files, so the components can be seen without opening a window:
Command snapshot renders the shop example headless into PNG files, so the components can be seen without opening a window:
shop/view
Package view builds the shop example: a window of MyGo native UI that shows the combobox, numberinput, searchfield and rating components together, as a product catalog the filters narrow.
Package view builds the shop example: a window of MyGo native UI that shows the combobox, numberinput, searchfield and rating components together, as a product catalog the filters narrow.
studio command
The studio example shows the icon, image and colorwell components together in a brand workbench: the mark of the studio and a like toggle, a preview of a photo, and a color well that picks the brand color.
The studio example shows the icon, image and colorwell components together in a brand workbench: the mark of the studio and a like toggle, a preview of a photo, and a color well that picks the brand color.
studio/cmd/snapshot command
Command snapshot renders the studio example headless into PNG files, so the components can be seen without opening a window:
Command snapshot renders the studio example headless into PNG files, so the components can be seen without opening a window:
studio/view
Package view builds the studio example: a window of MyGo native UI that shows the icon, image and colorwell components of uix together.
Package view builds the studio example: a window of MyGo native UI that shows the icon, image and colorwell components of uix together.
workspace command
The workspace example shows the form, scrollhorizontal, scrollboth and link components together in a project panel: the form lines up its fields, the days scroll sideways, the board scrolls both ways, and the header links open the guide.
The workspace example shows the form, scrollhorizontal, scrollboth and link components together in a project panel: the form lines up its fields, the days scroll sideways, the board scrolls both ways, and the header links open the guide.
workspace/cmd/snapshot command
Command snapshot renders the workspace example headless into PNG files, so the components can be seen without opening a window:
Command snapshot renders the workspace example headless into PNG files, so the components can be seen without opening a window:
workspace/view
Package view builds the workspace example: a window of MyGo native UI that shows the form, scrollhorizontal, scrollboth and link components of uix together.
Package view builds the workspace example: a window of MyGo native UI that shows the form, scrollhorizontal, scrollboth and link components of uix together.
internal
registry
Package registry stores the components a uix app installs, as one self-contained JSON file, and installs them into a Go module.
Package registry stores the components a uix app installs, as one self-contained JSON file, and installs them into a Go module.
theme
Package theme holds the palettes a uix app can pick for its design tokens, and regenerates the tokens package from them, as the uix theme command does.
Package theme holds the palettes a uix app can pick for its design tokens, and regenerates the tokens package from them, as the uix theme command does.

Jump to

Keyboard shortcuts

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