Versions in this module Expand all Collapse all v0 v0.1.0 Nov 6, 2026 Changes in this version + var IconArrow = mustIcon(`<path d="M5 12h14m-6-6 6 6-6 6"/>`) + var IconCheck = mustIcon(`<path d="m5 12.5 4.5 4.5L19 7.5"/>`) + var IconChevronDown = mustIcon(`<path d="m6 9 6 6 6-6"/>`) + var IconChevronLeft = mustIcon(`<path d="m15 6-6 6 6 6"/>`) + var IconChevronRight = mustIcon(`<path d="m9 6 6 6-6 6"/>`) + var IconClose = mustIcon(`<path d="m6 6 12 12M18 6 6 18"/>`) + var IconCopy = mustIcon(...) + var IconInfo = mustIcon(`<circle cx="12" cy="12" r="9"/><path d="M12 16v-4M12 8h.01"/>`) + var IconMinus = mustIcon(`<path d="M5 12h14"/>`) + var IconMore = mustIcon(...) + var IconPlus = mustIcon(`<path d="M12 5v14M5 12h14"/>`) + var IconSearch = mustIcon(`<circle cx="10.5" cy="10.5" r="6.5"/><path d="m16 16 5 5"/>`) + var IconSettings = mustIcon(...) + var IconUpload = mustIcon(...) + func AddUploadPaths(state *FileInputState, paths []string, o FileInputOptions) bool + func Scope(c *ui.Context, tokens theme.Theme, build func(*UI)) ui.Element + func ValidateDateRange(value DateRange, o DateRangeOptions) string + type AlertDialogOptions struct + Cancel string + Confirm string + Destructive bool + OnConfirm func() + type AvatarGroupOptions struct + Disabled bool + OnOverflow func() + OverflowLabel string + type AvatarOptions struct + OnClick func() + Size float32 + Status string + StatusTone Tone + type AvatarStatusOptions struct + AvatarSize float32 + Icon *ui.SVG + type BannerOptions struct + Action string + ActionLabel string + Dismissed *bool + OnAction func() + Tone Tone + type Breadcrumb struct + Label string + Menu []MenuEntry + OnClick func() + type ButtonOptions struct + Disabled bool + EndIcon *ui.SVG + Icon *ui.SVG + Loading bool + Size Size + Variant Variant + type CardOptions struct + Elevated bool + Padding float32 + type CarouselOptions struct + Height float32 + Loop bool + type CarouselSlide struct + Content func() + ID string + Label string + type ChatComposerInputOptions struct + MultilineEnter bool + OnSend func(string) bool + type ChatDraft struct + Text string + Tokens []ChatToken + type ChatMessageData struct + Author string + ID string + Reactions []ChatReaction + Reasoning string + ReasoningOpen bool + Role string + Status string + Streaming bool + Text string + Time time.Time + Tokens []ChatToken + Tools []ChatToolCall + type ChatMessageOptions struct + OnReaction func(string, int) + OnRetry func(string) + type ChatOptions struct + Disabled bool + Extras func() + MessageOptions ChatMessageOptions + MultilineEnter bool + OnSend func(ChatDraft) error + OnStop func() + Placeholder string + ReadOnly bool + type ChatReaction struct + Active bool + Count int + Label string + type ChatState struct + Busy bool + Draft string + Error string + List ui.ListState + Messages []ChatMessageData + Tokens []ChatToken + type ChatTextRun struct + Text string + Token *ChatToken + type ChatToken struct + ID string + Kind string + Label string + type ChatToolCall struct + Expanded bool + ID string + Input string + Name string + Output string + Status string + type ChoiceOptions struct + Disabled bool + Mixed bool + Size Size + type CitationOptions struct + Detail string + OnClick func() + URL string + type Command struct + Description string + Disabled bool + Group string + ID string + Label string + Run func() + Shortcut string + type CommandPaletteOptions struct + Empty string + Footer func() + Inline bool + Placeholder string + Title string + Width float32 + type CommandPaletteState struct + Active int + Chosen string + Query string + type ContextMenuOptions struct + Native bool + type DateRange struct + Empty bool + End time.Time + Start time.Time + type DateRangeOptions struct + Allowed func(time.Time) bool + Disabled bool + Label string + Max time.Time + MaxDays int + Min time.Time + OnChange func(DateRange) + Presets []DateRangePreset + type DateRangePreset struct + End time.Time + Label string + Start time.Time + type DialogOptions struct + Description string + Footer func() + Header func() + Width float32 + type DictationOptions struct + Start func() error + Stop func() error + type DictationState struct + Available bool + Error string + Recording bool + type Disclosure struct + Content func() + ID string + Open *bool + Title string + type FileInputOptions struct + Accept string + Browse func() ([]string, error) + Disabled bool + Label string + MaxFiles int + MaxSize int64 + Multiple bool + OnChange func([]UploadFile) + type FileInputState struct + Busy bool + Error string + Files []UploadFile + Progress float64 + type FilterField struct + Editor func(*UI, *string) + ID string + Kind string + Label string + Operators []string + Options []Option + Validate func(string) error + type HoverCardOptions struct + Delay time.Duration + Disabled bool + FocusOnOpen bool + HideDelay time.Duration + Label string + MaxHeight float32 + OpenOnClick bool + Width float32 + type ImageAsset struct + ID string + Label string + Source ui.ImageSource + type IndicatorOptions struct + Disabled bool + Kind string + Size Size + type IndicatorState string + const IndicatorChecked + const IndicatorMixed + const IndicatorUnchecked + type InputOptions struct + Description string + Disabled bool + Error string + Focus *ui.Handle + Label string + Placeholder string + ReadOnly bool + Size Size + type ItemOptions struct + Avatar string + Badge string + BadgeTone Tone + Description string + Disabled bool + Icon *ui.SVG + OnClick func() + Selected bool + Trailing string + type LayoutSlots struct + Content func() + Footer func() + Header func() + Panel func() + PanelWidth float32 + type MarkdownOptions struct + Native *markdown.Options + Streaming bool + type MenuEntry struct + Checked *bool + Children []MenuEntry + Disabled bool + Group string + ID string + Label string + Modifiers ui.Modifiers + OnSelect func() + Radio *string + Separator bool + Shortcut ui.Key + Value string + type Metadata struct + Label string + Value string + type NavItem struct + Badge string + Children []NavItem + Disabled bool + ID string + Icon *ui.SVG + Label string + Section string + type NavOptions struct + Collapsed *bool + Label string + type Option struct + Disabled bool + Label string + Value string + type OutlineItem struct + ID string + Level int + Title string + type OverlayOptions struct + DismissOnOutside bool + Label string + NonModal bool + type Person struct + Image *ui.Bitmap + Name string + Role string + Status string + StatusTone Tone + type PowerSearchOptions struct + Disabled bool + Label string + OnChange func([]SearchFilter) + ReadOnly bool + type PowerSearchState struct + Editing string + Error string + Field string + Filters []SearchFilter + Operator string + Query string + Value string + type ResizableOptions struct + Collapsible bool + Max float32 + Min float32 + OnResize func(float32) + Percent bool + Vertical bool + type ResizableState struct + Collapsed bool + Size float32 + type ScrollOptions struct + Both bool + Horizontal bool + type SearchFilter struct + Field string + ID string + Operator string + ReadOnly bool + Value string + type SelectionOptions struct + Disabled bool + Label string + MaxSelected int + OnChange func([]string) + type Size uint8 + const Large + const Medium + const Small + type Step struct + Description string + Disabled bool + Error bool + ID string + Label string + type StepperOptions struct + Linear bool + OnChange func(int) + ReadOnly bool + Vertical bool + type Suggestion struct + Description string + Disabled bool + Group string + ID string + Label string + type ThumbnailOptions struct + Height float32 + OnClick func() + Selected bool + Width float32 + type TimerOptions struct + Clock bool + Label string + type TimerState struct + Elapsed time.Duration + Running bool + func (s *TimerState) Duration(now time.Time) time.Duration + func (s *TimerState) Pause(now time.Time) + func (s *TimerState) Reset() + func (s *TimerState) Start(now time.Time) + type TimestampOptions struct + Copy bool + Format string + Location *time.Location + Static bool + type Tone uint8 + const Danger + const Info + const Neutral + const Success + const Warning + type TypeaheadOptions struct + OnQuery func(string) + OnSelect func(Suggestion) + type TypeaheadState struct + Error string + Loading bool + Query string + Value string + type UI struct + func New(c *ui.Context) *UI + func (k *UI) Accordion(items []Disclosure) ui.Element + func (k *UI) Alert(title, description string, tones ...Tone) ui.Element + func (k *UI) AlertDialog(title, description string, open *bool, options ...AlertDialogOptions) ui.Element + func (k *UI) AppShell(navigation, content func()) ui.Element + func (k *UI) AspectRatio(ratio float32) ui.Element + func (k *UI) Avatar(name string, image *ui.Bitmap, options ...AvatarOptions) ui.Element + func (k *UI) AvatarGroup(people []Person, maximum int, options ...AvatarGroupOptions) ui.Element + func (k *UI) AvatarGroupOverflow(count int, options ...AvatarGroupOptions) ui.Element + func (k *UI) AvatarStatusDot(label string, tone Tone, options ...AvatarStatusOptions) ui.Element + func (k *UI) Badge(text string, tones ...Tone) ui.Element + func (k *UI) Banner(title, description string, options ...BannerOptions) ui.Element + func (k *UI) Blockquote(text, attribution string) ui.Element + func (k *UI) BottomSheet(title string, open *bool, content func(), options ...DialogOptions) ui.Element + func (k *UI) Breadcrumbs(items []Breadcrumb) ui.Element + func (k *UI) Button(label string, options ...ButtonOptions) ui.Element + func (k *UI) ButtonGroup(build func()) ui.Element + func (k *UI) Calendar(value *time.Time) ui.Element + func (k *UI) Caption(text string) ui.Element + func (k *UI) Card(options ...CardOptions) ui.Element + func (k *UI) Carousel(index *int, slides []CarouselSlide, options ...CarouselOptions) ui.Element + func (k *UI) Center() ui.Element + func (k *UI) Chat(state *ChatState, options ...ChatOptions) ui.Element + func (k *UI) ChatComposer(state *ChatState, options ...ChatOptions) ui.Element + func (k *UI) ChatComposerDrawer(label string, open *bool, content func()) ui.Element + func (k *UI) ChatComposerInput(value *string, options ...ChatComposerInputOptions) ui.Element + func (k *UI) ChatComposerTokenElement(token ChatToken, onRemove func()) ui.Element + func (k *UI) ChatDictationButton(state *DictationState, options ...DictationOptions) ui.Element + func (k *UI) ChatLayout(messages, composer func()) ui.Element + func (k *UI) ChatLayoutScrollButton(state *ui.ListState, label string) ui.Element + func (k *UI) ChatMessage(message *ChatMessageData, options ...ChatMessageOptions) ui.Element + func (k *UI) ChatMessageBubble(message ChatMessageData) ui.Element + func (k *UI) ChatMessageList(state *ui.ListState, messages []ChatMessageData, options ...ChatMessageOptions) ui.Element + func (k *UI) ChatMessageMetadata(message ChatMessageData) ui.Element + func (k *UI) ChatSendButton(busy, canSend bool, onSend, onStop func()) ui.Element + func (k *UI) ChatSystemMessage(text string) ui.Element + func (k *UI) ChatTokenizedText(runs []ChatTextRun) ui.Element + func (k *UI) ChatToolCalls(calls []ChatToolCall) ui.Element + func (k *UI) CheckIndicator(state IndicatorState, options ...IndicatorOptions) ui.Element + func (k *UI) Checkbox(value *bool, label string, options ...ChoiceOptions) ui.Element + func (k *UI) CheckboxIndicator(state IndicatorState, options ...IndicatorOptions) ui.Element + func (k *UI) CheckboxList(values *[]string, items []Option, options ...SelectionOptions) ui.Element + func (k *UI) Citation(label string, options ...CitationOptions) ui.Element + func (k *UI) ClickableCard(label string, build func(), options ...CardOptions) ui.Element + func (k *UI) Code(text string) ui.Element + func (k *UI) CodeBlock(source, language string) ui.Element + func (k *UI) Collapsible(label string, open *bool, build func()) ui.Element + func (k *UI) ColorPicker(value *ui.Color) ui.Element + func (k *UI) Combobox(value *string, items []string, options ...InputOptions) ui.Element + func (k *UI) CommandPalette(open *bool, state *CommandPaletteState, items []Command, ...) ui.Element + func (k *UI) ComplexSelector(label string, open *bool, summary string, content func(close func()), ...) ui.Element + func (k *UI) Container() ui.Element + func (k *UI) ContextMenu(target ui.Element, entries []MenuEntry, options ...ContextMenuOptions) ui.Element + func (k *UI) DateInput(value *time.Time) ui.Element + func (k *UI) DateRangeInput(value *DateRange, options ...DateRangeOptions) ui.Element + func (k *UI) DateTimeInput(value *time.Time, options ...InputOptions) ui.Element + func (k *UI) Dialog(title string, open *bool, content func(), options ...DialogOptions) ui.Element + func (k *UI) Divider() ui.Element + func (k *UI) Drawer(title string, open *bool, content func(), options ...DialogOptions) ui.Element + func (k *UI) DropdownMenu(label string, entries []MenuEntry, options ...ButtonOptions) ui.Element + func (k *UI) EmptyState(title, description string, action func()) ui.Element + func (k *UI) Field(label string, build func(), options ...InputOptions) ui.Element + func (k *UI) FieldStatus(message string, tone Tone) ui.Element + func (k *UI) Fieldset(legend string, build func()) ui.Element + func (k *UI) FileInput(state *FileInputState, options ...FileInputOptions) ui.Element + func (k *UI) Form(build func()) ui.Element + func (k *UI) FormLayout(columns int) ui.Element + func (k *UI) Grid(columns int) ui.Element + func (k *UI) GridSpan(columns int) ui.Element + func (k *UI) HStack() ui.Element + func (k *UI) Heading(text string, level int) ui.Element + func (k *UI) HoverCard(anchor ui.Element, content func(), options ...HoverCardOptions) ui.Element + func (k *UI) Icon(icon *ui.SVG) ui.Element + func (k *UI) IconButton(label string, icon *ui.SVG, options ...ButtonOptions) ui.Element + func (k *UI) Indicator(state IndicatorState, options ...IndicatorOptions) ui.Element + func (k *UI) InfoTip(label, description string) ui.Element + func (k *UI) Inline() ui.Element + func (k *UI) InputClearButton(value *string, focus *ui.Handle, options ...ButtonOptions) ui.Element + func (k *UI) InputGroup(value *string, leading, trailing func(), options ...InputOptions) ui.Element + func (k *UI) Item(label string, options ...ItemOptions) ui.Element + func (k *UI) Kbd(keys string) ui.Element + func (k *UI) Key(id any) *UI + func (k *UI) Layout(slots LayoutSlots) ui.Element + func (k *UI) Lightbox(open *bool, index *int, images []ImageAsset) ui.Element + func (k *UI) Link(label, url string) ui.Element + func (k *UI) List(state *ui.ListState, count int, row func(int)) ui.Element + func (k *UI) Markdown(source string, options ...MarkdownOptions) ui.Element + func (k *UI) MetadataList(items []Metadata) ui.Element + func (k *UI) MobileNav(selected *string, items []NavItem) ui.Element + func (k *UI) MobileNavToggle(label string, open *bool, options ...ButtonOptions) ui.Element + func (k *UI) MoreMenu(label string, entries []MenuEntry) ui.Element + func (k *UI) MultiSelector(values *[]string, items []Option, options ...SelectionOptions) ui.Element + func (k *UI) NavMenu(label string, entries []MenuEntry) ui.Element + func (k *UI) NumberInput(value *float64, low, high, step float64, options ...InputOptions) ui.Element + func (k *UI) Outline(selected *string, items []OutlineItem, onNavigate func(string)) ui.Element + func (k *UI) OverflowList(items []NavItem, visible int, onSelect func(string)) ui.Element + func (k *UI) Overlay(open *bool, build func(), options ...OverlayOptions) ui.Element + func (k *UI) Pagination(page *int, pages int) ui.Element + func (k *UI) Popover(anchor ui.Element, open *bool, content func()) ui.Element + func (k *UI) PowerSearch(state *PowerSearchState, fields []FilterField, options ...PowerSearchOptions) ui.Element + func (k *UI) Progress(value float64) ui.Element + func (k *UI) Radio(value *string, choice, label string, options ...ChoiceOptions) ui.Element + func (k *UI) RadioGroup(label string, build func()) ui.Element + func (k *UI) RadioIndicator(state IndicatorState, options ...IndicatorOptions) ui.Element + func (k *UI) RadioList(value *string, items []Option, options ...InputOptions) ui.Element + func (k *UI) RangeSlider(lowValue, highValue *float64, low, high, step float64) ui.Element + func (k *UI) Rating(value *int, maximum int) ui.Element + func (k *UI) Resizable(state *ResizableState, first, second func(), options ...ResizableOptions) ui.Element + func (k *UI) Scroll(options ...ScrollOptions) ui.Element + func (k *UI) SearchField(value *string, options ...InputOptions) ui.Element + func (k *UI) Section(title, description string, build func()) ui.Element + func (k *UI) Segmented(selected *int, labels []string) ui.Element + func (k *UI) Select(value *string, items []Option, options ...InputOptions) ui.Element + func (k *UI) SelectableCard(selected *bool, label string, build func()) ui.Element + func (k *UI) SideNav(selected *string, items []NavItem, options ...NavOptions) ui.Element + func (k *UI) Sidebar(selected *string, items []NavItem) ui.Element + func (k *UI) Skeleton(width, height float32) ui.Element + func (k *UI) Slider(value *float64, low, high float64, options ...InputOptions) ui.Element + func (k *UI) Spacer() ui.Element + func (k *UI) Spinner() ui.Element + func (k *UI) Split(position *float32, first, second func()) ui.Element + func (k *UI) Stack() ui.Element + func (k *UI) StatusDot(label string, tone Tone) ui.Element + func (k *UI) Stepper(current *int, steps []Step, options ...StepperOptions) ui.Element + func (k *UI) Switch(value *bool, label string, options ...ChoiceOptions) ui.Element + func (k *UI) Table(state *ui.ListState, columns []ui.TableColumn, count int, ...) ui.Element + func (k *UI) Tabs(selected *int, labels []string) ui.Element + func (k *UI) Text(text string) ui.Element + func (k *UI) TextArea(value *string, options ...InputOptions) ui.Element + func (k *UI) TextInput(value *string, options ...InputOptions) ui.Element + func (k *UI) Thumbnail(image ImageAsset, options ...ThumbnailOptions) ui.Element + func (k *UI) TimeInput(value *time.Time) ui.Element + func (k *UI) Timer(state *TimerState, options ...TimerOptions) ui.Element + func (k *UI) Timestamp(value time.Time, options ...TimestampOptions) ui.Element + func (k *UI) Toast(message ui.Toast) string + func (k *UI) ToastViewport() ui.Element + func (k *UI) Toggle(on *bool, label string, options ...ButtonOptions) ui.Element + func (k *UI) Token(label string, onRemove func()) ui.Element + func (k *UI) Tokenizer(values *[]string, suggestions []string, options ...InputOptions) ui.Element + func (k *UI) Tokens() theme.Theme + func (k *UI) Toolbar(label string, build func()) ui.Element + func (k *UI) Tooltip(anchor ui.Element, description string) ui.Element + func (k *UI) TopNav(selected *string, items []NavItem, options ...NavOptions) ui.Element + func (k *UI) TopNavMegaMenu(label string, items, featured func(), options ...HoverCardOptions) ui.Element + func (k *UI) TopNavMegaMenuItem(label string, options ...ItemOptions) ui.Element + func (k *UI) Tree(build func()) ui.Element + func (k *UI) TreeItem(label string, open *bool, build func()) ui.Element + func (k *UI) TreeList(state *ui.OutlineState[string], roots []string, children func(string) []string, ...) ui.Element + func (k *UI) Typeahead(state *TypeaheadState, items []Suggestion, options ...TypeaheadOptions) ui.Element + func (k *UI) VisuallyHidden(text string) ui.Element + type UploadFile struct + MIME string + Name string + Path string + Size int64 + type Variant uint8 + const Default + const Destructive + const Ghost + const Outline + const Primary