swiftui

package module
v0.0.0-...-ebd8699 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: MIT Imports: 12 Imported by: 0

README

swiftui

Go Reference

Go bindings for Apple's SwiftUI framework on macOS. The root package exposes core SwiftUI views, modifiers, and app lifecycle APIs, and subpackages such as avkit, quicklook, and spritekit expose framework overlays that return view pointers compatible with swiftui.ViewFromPointer.

Auto-generated from Apple developer documentation via applegen.

Requirements

  • macOS 26 or later with the Swift toolchain available in PATH
  • Xcode or Command Line Tools if the vendored bridge needs to be built

The vendored Swift bridge is loaded at runtime. If no prebuilt dylib is available, the package runs swift build in internal/swift/ automatically.

Quick start

package main

import (
	"runtime"

	"github.com/tmc/swiftui"
)

func init() { runtime.LockOSThread() }

func main() {
	swiftui.Run(swiftui.AppConfig{
		Title:  "Hello World",
		Width:  400,
		Height: 300,
	}, swiftui.Text("Hello from Go!").Padding(20).AsView())
}

Try the bundled example with:

go run ./examples/hello-world

Disclaimer

This is not an official Apple product. Apple, macOS, and all related frameworks are trademarks of Apple Inc. This project is an independent, community-driven effort and is not affiliated with, endorsed by, or sponsored by Apple Inc.

License

MIT

Documentation

Overview

Package swiftui provides Go bindings for Apple's SwiftUI framework, enabling declarative UI construction from pure Go on macOS 26 or later.

SwiftUI is a Swift-only framework. This package includes a vendored Swift bridge (under internal/swift/) that is automatically built on first use. No external dependencies or manual setup required — just go run.

Threading

All View construction and modifier calls must happen on the main thread. Call runtime.LockOSThread() in init() or TestMain to pin the main goroutine. State.Set() is safe from any goroutine — the Swift bridge dispatches updates to the MainActor automatically. For view operations from background goroutines, use dispatch.MainQueue().Async().

Environment

By default, the package loads the embedded bridge from a per-user cache under $HOME/Library/Caches/swiftui/bridge-cache.

To override the dylib path, set $LIBSWIFTUI_BRIDGE_PATH.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PlaySystemSound

func PlaySystemSound(name string)

PlaySystemSound plays a macOS system sound by name. Common names: "Basso", "Blow", "Bottle", "Frog", "Funk", "Glass", "Hero", "Morse", "Ping", "Pop", "Purr", "Sosumi", "Submarine", "Tink".

func RenderPNG

func RenderPNG(path string, root View, width, height, scale float64) error

RenderPNG renders a SwiftUI view hierarchy to a PNG file without opening a window.

func Run

func Run(config AppConfig, root View)

Run starts the application event loop with the given root view. This blocks until the application exits.

func RunMenuBar

func RunMenuBar(config MenuBarConfig, content View)

RunMenuBar starts a menu-bar-only app with no dock icon. The content View is shown in a popover when the status item is clicked. This blocks until the application exits.

func RunWithMenuBar

func RunWithMenuBar(appConfig AppConfig, content View, menuConfig MenuBarConfig, menuContent View)

RunWithMenuBar starts a windowed app that also has a menu bar item. The menuContent View is shown in a popover when the status item is clicked. This blocks until the application exits.

func UpdateMenuBarLabel

func UpdateMenuBarLabel(label string)

UpdateMenuBarLabel changes the status item text at runtime.

func UpdateMenuBarLabelStyled

func UpdateMenuBarLabelStyled(label string, style MenuBarLabelStyle)

UpdateMenuBarLabelStyled updates the status item text with optional styling. If the styled bridge symbol is unavailable, this falls back to UpdateMenuBarLabel.

Types

type AccessibilityTrait

type AccessibilityTrait int32

AccessibilityTrait identifies accessibility trait flags.

const (
	AccessibilityTraitNone        AccessibilityTrait = 0
	AccessibilityTraitHeader      AccessibilityTrait = 2
	AccessibilityTraitButton      AccessibilityTrait = 4
	AccessibilityTraitSearchField AccessibilityTrait = 8
	AccessibilityTraitStaticText  AccessibilityTrait = 16
)

type AnimationKind

type AnimationKind int32

AnimationKind identifies animation curve presets.

const (
	AnimationEaseInOut AnimationKind = 0
	AnimationEaseIn    AnimationKind = 1
	AnimationEaseOut   AnimationKind = 2
	AnimationSpring    AnimationKind = 3
	AnimationBouncy    AnimationKind = 4
)

type AppConfig

type AppConfig struct {
	Title  string
	Width  float64
	Height float64
}

AppConfig configures the application window.

type Axis

type Axis int32

Axis identifies layout axes.

const (
	AxisHorizontal Axis = 0
	AxisVertical   Axis = 1
)

type BoolState

type BoolState struct {
	// contains filtered or unexported fields
}

BoolState is an observable boolean state value.

func NewBoolState

func NewBoolState(initial bool) *BoolState

NewBoolState creates a new observable boolean state.

func (*BoolState) Get

func (s *BoolState) Get() bool

Get returns the current boolean value.

func (*BoolState) Release

func (s *BoolState) Release()

Release decrements the underlying Swift retain count.

func (*BoolState) Set

func (s *BoolState) Set(v bool)

Set updates the boolean value.

func (*BoolState) SetAnimated

func (s *BoolState) SetAnimated(v bool)

SetAnimated updates the boolean value with the default ease-in-out animation.

func (*BoolState) SetAnimatedWith

func (s *BoolState) SetAnimatedWith(v bool, kind AnimationKind)

SetAnimatedWith updates the boolean value using the provided animation curve.

type ButtonStyleKind

type ButtonStyleKind int32

ButtonStyleKind identifies button display styles.

const (
	ButtonStyleAutomatic         ButtonStyleKind = 0
	ButtonStyleBordered          ButtonStyleKind = 1
	ButtonStyleBorderedProminent ButtonStyleKind = 2
	ButtonStyleBorderless        ButtonStyleKind = 3
	ButtonStylePlain             ButtonStyleKind = 4
)

type Color

type Color struct {
	R, G, B, A float64
}

Color represents an RGBA color value.

func RGB

func RGB(r, g, b float64) Color

RGB creates an opaque Color from red, green, and blue components (0.0-1.0).

func RGBA

func RGBA(r, g, b, a float64) Color

RGBA creates a Color from red, green, blue, and alpha components (0.0-1.0).

type ColorState

type ColorState struct {
	// contains filtered or unexported fields
}

ColorState is a reactive RGBA color state that bridges Go and SwiftUI.

func NewColorState

func NewColorState(r, g, b, a float64) *ColorState

NewColorState creates a new reactive color state from RGBA values (0.0-1.0).

func (*ColorState) A

func (s *ColorState) A() float64

A returns the alpha component (0.0-1.0).

func (*ColorState) B

func (s *ColorState) B() float64

B returns the blue component (0.0-1.0).

func (*ColorState) G

func (s *ColorState) G() float64

G returns the green component (0.0-1.0).

func (*ColorState) R

func (s *ColorState) R() float64

R returns the red component (0.0-1.0).

func (*ColorState) Release

func (s *ColorState) Release()

Release decrements the underlying Swift retain count.

func (*ColorState) Set

func (s *ColorState) Set(r, g, b, a float64)

Set updates the RGBA color values.

type ContentMode

type ContentMode int32

ContentMode identifies aspect ratio content modes.

const (
	ContentModeFit  ContentMode = 0
	ContentModeFill ContentMode = 1
)

type ControlSize

type ControlSize int32

ControlSize identifies control sizing presets.

const (
	ControlSizeMini       ControlSize = 0
	ControlSizeSmall      ControlSize = 1
	ControlSizeRegular    ControlSize = 2
	ControlSizeLarge      ControlSize = 3
	ControlSizeExtraLarge ControlSize = 4
)

type DateState

type DateState struct {
	// contains filtered or unexported fields
}

DateState is a reactive date state that bridges Go and SwiftUI. Dates are represented as Unix epoch seconds (float64).

func NewDateState

func NewDateState(epochSeconds float64) *DateState

NewDateState creates a new reactive date state from Unix epoch seconds.

func (*DateState) Get

func (s *DateState) Get() float64

Get returns the current date as Unix epoch seconds.

func (*DateState) Release

func (s *DateState) Release()

Release decrements the underlying Swift retain count.

func (*DateState) Set

func (s *DateState) Set(epochSeconds float64)

Set updates the date from Unix epoch seconds.

type Design

type Design int32

Design identifies font design presets.

const (
	DesignDefault    Design = 0
	DesignRounded    Design = 1
	DesignMonospaced Design = 2
	DesignSerif      Design = 3
)

type Edge

type Edge int32

Edge identifies edges for padding and layout.

const (
	EdgeTop        Edge = 1
	EdgeLeading    Edge = 2
	EdgeBottom     Edge = 4
	EdgeTrailing   Edge = 8
	EdgeAll        Edge = 15
	EdgeHorizontal Edge = 10
	EdgeVertical   Edge = 5
)

type FloatState

type FloatState struct {
	// contains filtered or unexported fields
}

FloatState is a reactive float64 state that bridges Go and SwiftUI.

func NewFloatState

func NewFloatState(initial float64) *FloatState

NewFloatState creates a new reactive float64 state with the given initial value.

func (*FloatState) Get

func (s *FloatState) Get() float64

Get returns the current float64 value.

func (*FloatState) Release

func (s *FloatState) Release()

Release decrements the underlying Swift retain count.

func (*FloatState) Set

func (s *FloatState) Set(v float64)

Set updates the float64 value, triggering SwiftUI view updates.

func (*FloatState) SetAnimated

func (s *FloatState) SetAnimated(v float64)

SetAnimated updates the float64 value inside withAnimation.

func (*FloatState) SetAnimatedWith

func (s *FloatState) SetAnimatedWith(v float64, kind AnimationKind)

SetAnimatedWith updates the float64 value using the provided animation curve.

type Font

type Font struct {
	// contains filtered or unexported fields
}

Font is an opaque handle to a SwiftUI font in the Swift bridge.

var (
	FontLargeTitle  Font
	FontTitle       Font
	FontTitle2      Font
	FontTitle3      Font
	FontHeadline    Font
	FontSubheadline Font
	FontBody        Font
	FontCallout     Font
	FontFootnote    Font
	FontCaption     Font
	FontCaption2    Font
)

Preset font variables, initialized after the dylib loads.

func FontNamed

func FontNamed(name string) Font

FontNamed returns a named preset font (e.g. "largeTitle", "body").

func FontSystem

func FontSystem(size float64) Font

FontSystem returns a system font at the given point size.

func FontSystemDesign

func FontSystemDesign(size float64, weight Weight, design Design) Font

FontSystemDesign returns a system font with explicit weight and design. Use Weight* and Design* constants for the weight and design parameters.

func (*Font) Release

func (f *Font) Release()

Release decrements the underlying Swift retain count.

type GlassButtonStyleKind

type GlassButtonStyleKind int32

GlassButtonStyleKind identifies glass button styles.

const (
	GlassButtonStyleRegular   GlassButtonStyleKind = 0
	GlassButtonStyleProminent GlassButtonStyleKind = 1
)

type GlassShape

type GlassShape int32

GlassShape identifies glass effect shapes.

const (
	GlassShapeRoundedRectangle GlassShape = 0
	GlassShapeCapsule          GlassShape = 1
	GlassShapeCircle           GlassShape = 2
)

type GlassStyle

type GlassStyle int32

GlassStyle identifies glass effect styles.

const (
	GlassStyleRegular   GlassStyle = 0
	GlassStyleProminent GlassStyle = 1
	GlassStyleThin      GlassStyle = 2
	GlassStyleThick     GlassStyle = 3
	GlassStyleUltraThin GlassStyle = 4
)

type HorizontalAlignment

type HorizontalAlignment int32

HorizontalAlignment identifies horizontal alignment options.

const (
	HorizontalAlignmentLeading  HorizontalAlignment = 0
	HorizontalAlignmentCenter   HorizontalAlignment = 1
	HorizontalAlignmentTrailing HorizontalAlignment = 2
)

type HoverEffectKind

type HoverEffectKind int32

HoverEffectKind identifies hover effect styles.

const (
	HoverEffectAutomatic HoverEffectKind = 0
	HoverEffectHighlight HoverEffectKind = 1
)

type ImageScale

type ImageScale int32

ImageScale identifies SF Symbol image scales.

const (
	ImageScaleSmall  ImageScale = 0
	ImageScaleMedium ImageScale = 1
	ImageScaleLarge  ImageScale = 2
)

type IntState

type IntState struct {
	// contains filtered or unexported fields
}

IntState is a reactive integer state that bridges Go and SwiftUI. When the value changes via Set, any SwiftUI views observing this state update automatically.

func NewIntState

func NewIntState(initial int) *IntState

NewIntState creates a new reactive integer state with the given initial value.

func (*IntState) Get

func (s *IntState) Get() int

Get returns the current value.

func (*IntState) Release

func (s *IntState) Release()

Release decrements the underlying Swift retain count.

func (*IntState) Set

func (s *IntState) Set(v int)

Set updates the value, triggering SwiftUI view updates.

func (*IntState) SetAnimated

func (s *IntState) SetAnimated(v int)

SetAnimated updates the value inside withAnimation, triggering animated SwiftUI transitions.

func (*IntState) SetAnimatedWith

func (s *IntState) SetAnimatedWith(v int, kind AnimationKind)

SetAnimatedWith updates the value using the provided animation curve.

type LabelStyleKind

type LabelStyleKind int32

LabelStyleKind identifies label display styles.

const (
	LabelStyleAutomatic    LabelStyleKind = 0
	LabelStyleIconOnly     LabelStyleKind = 1
	LabelStyleTitleOnly    LabelStyleKind = 2
	LabelStyleTitleAndIcon LabelStyleKind = 3
)

type ListStyleKind

type ListStyleKind int32

ListStyleKind identifies list display styles.

const (
	ListStyleAutomatic ListStyleKind = 0
	ListStyleSidebar   ListStyleKind = 1
	ListStyleInset     ListStyleKind = 2
	ListStylePlain     ListStyleKind = 3
)
type MenuBarConfig struct {
	Label        string  // Text shown next to the icon
	SystemImage  string  // SF Symbol name for the icon
	Width        float64 // Popover width
	Height       float64 // Popover height
	OpenOnLaunch bool    // Show the popover immediately after app launch.
}

MenuBarConfig configures a menu bar status item.

type MenuBarLabelStyle struct {
	MonospacedDigits bool
	Animate          bool
}

MenuBarLabelStyle controls visual behavior when updating the status label.

type MenuOrderKind int32

MenuOrderKind identifies menu ordering behavior.

const (
	MenuOrderAutomatic MenuOrderKind = 0
	MenuOrderFixed     MenuOrderKind = 1
)
type NavigationSplitViewStyleKind int32

NavigationSplitViewStyleKind identifies navigation split view styles.

const (
	NavigationSplitViewStyleAutomatic       NavigationSplitViewStyleKind = 0
	NavigationSplitViewStyleBalanced        NavigationSplitViewStyleKind = 1
	NavigationSplitViewStyleProminentDetail NavigationSplitViewStyleKind = 2
)
type NavigationSplitViewVisibilityKind int32

NavigationSplitViewVisibilityKind identifies column visibility.

const (
	NavigationSplitViewVisibilityAutomatic    NavigationSplitViewVisibilityKind = 0
	NavigationSplitViewVisibilityAll          NavigationSplitViewVisibilityKind = 1
	NavigationSplitViewVisibilityDoubleColumn NavigationSplitViewVisibilityKind = 2
	NavigationSplitViewVisibilityDetailOnly   NavigationSplitViewVisibilityKind = 3
)

type PickerStyleKind

type PickerStyleKind int32

PickerStyleKind identifies picker display styles.

const (
	PickerStyleAutomatic      PickerStyleKind = 0
	PickerStyleInline         PickerStyleKind = 1
	PickerStyleMenu           PickerStyleKind = 2
	PickerStyleSegmented      PickerStyleKind = 3
	PickerStyleWheel          PickerStyleKind = 4
	PickerStyleNavigationLink PickerStyleKind = 5
	PickerStylePalette        PickerStyleKind = 6
)

type PointerStyleKind

type PointerStyleKind int32

PointerStyleKind identifies pointer cursor styles.

const (
	PointerStyleAutomatic PointerStyleKind = 0
	PointerStyleLink      PointerStyleKind = 1
	PointerStyleCrosshair PointerStyleKind = 2
)

type PresentationDragIndicatorKind

type PresentationDragIndicatorKind int32

PresentationDragIndicatorKind identifies drag indicator visibility.

const (
	PresentationDragIndicatorAutomatic PresentationDragIndicatorKind = 0
	PresentationDragIndicatorVisible   PresentationDragIndicatorKind = 1
	PresentationDragIndicatorHidden    PresentationDragIndicatorKind = 2
)

type ScrollAnchor

type ScrollAnchor int32

ScrollAnchor identifies scroll anchor positions.

const (
	ScrollAnchorTop      ScrollAnchor = 0
	ScrollAnchorCenter   ScrollAnchor = 1
	ScrollAnchorBottom   ScrollAnchor = 2
	ScrollAnchorLeading  ScrollAnchor = 3
	ScrollAnchorTrailing ScrollAnchor = 4
)

type ScrollBounce

type ScrollBounce int32

ScrollBounce identifies scroll bounce behavior.

const (
	ScrollBounceBasedOnSize ScrollBounce = 0
	ScrollBounceAlways      ScrollBounce = 1
)

type ScrollTargetBehaviorKind

type ScrollTargetBehaviorKind int32

ScrollTargetBehaviorKind identifies scroll target snapping behavior.

const (
	ScrollTargetBehaviorPaging      ScrollTargetBehaviorKind = 0
	ScrollTargetBehaviorViewAligned ScrollTargetBehaviorKind = 1
)

type ShapeView

type ShapeView struct {
	View
}

ShapeView is a View created from a shape constructor (Circle, Rectangle, etc.). It provides shape-specific modifiers like Fill and Stroke in addition to all universal View modifiers.

func Capsule

func Capsule() ShapeView

Capsule creates a capsule shape.

func Circle

func Circle() ShapeView

Circle creates a circle shape filling available space.

func Rectangle

func Rectangle() ShapeView

Rectangle creates a rectangle shape filling available space.

func RoundedRectangle

func RoundedRectangle(cornerRadius float64) ShapeView

RoundedRectangle creates a rounded rectangle shape.

func (ShapeView) AsView

func (v ShapeView) AsView() View

AsView returns the underlying View, discarding the shape type.

func (ShapeView) Background

func (v ShapeView) Background(r float64, g float64, b float64, a float64) ShapeView

Background sets a background color using RGBA values.

func (ShapeView) Fill

func (v ShapeView) Fill(r float64, g float64, b float64, a float64) ShapeView

Fill sets the fill color for shape views.

func (ShapeView) Font

func (v ShapeView) Font(f Font) ShapeView

Font sets the font for the view.

func (ShapeView) FontDesign

func (v ShapeView) FontDesign(design Design) ShapeView

FontDesign sets the font design for text in the view.

func (ShapeView) FontWeight

func (v ShapeView) FontWeight(weight Weight) ShapeView

FontWeight sets the font weight for text in the view.

func (ShapeView) ForegroundStyle

func (v ShapeView) ForegroundStyle(r float64, g float64, b float64, a float64) ShapeView

ForegroundStyle sets the foreground color using RGBA values.

func (ShapeView) ForegroundStyleNamed

func (v ShapeView) ForegroundStyleNamed(name string) ShapeView

ForegroundStyleNamed sets a named foreground style (primary, secondary, tertiary, quaternary).

func (ShapeView) Frame

func (v ShapeView) Frame(width float64, height float64) ShapeView

Frame sets an explicit width and height for the view.

func (ShapeView) Offset

func (v ShapeView) Offset(x float64, y float64) ShapeView

Offset moves the view by the given x and y distances.

func (ShapeView) Opacity

func (v ShapeView) Opacity(opacity float64) ShapeView

Opacity sets the opacity of the view (0.0 to 1.0).

func (ShapeView) Padding

func (v ShapeView) Padding(amount float64) ShapeView

Padding applies uniform padding around the view.

func (ShapeView) Stroke

func (v ShapeView) Stroke(r float64, g float64, b float64, a float64, lineWidth float64) ShapeView

Stroke sets the stroke color and width for shape views.

type ShortcutModifier

type ShortcutModifier int32

ShortcutModifier identifies keyboard shortcut modifier keys.

const (
	ShortcutModifierCommand ShortcutModifier = 1
	ShortcutModifierShift   ShortcutModifier = 2
	ShortcutModifierOption  ShortcutModifier = 4
	ShortcutModifierControl ShortcutModifier = 8
)

type StringState

type StringState struct {
	// contains filtered or unexported fields
}

StringState is a reactive string state that bridges Go and SwiftUI.

func NewStringState

func NewStringState(initial string) *StringState

NewStringState creates a new reactive string state with the given initial value.

func (*StringState) Get

func (s *StringState) Get() string

Get returns the current string value.

func (*StringState) Release

func (s *StringState) Release()

Release decrements the underlying Swift retain count.

func (*StringState) Set

func (s *StringState) Set(v string)

Set updates the string value, triggering SwiftUI view updates.

type SubmitLabelKind

type SubmitLabelKind int32

SubmitLabelKind identifies submit label presets.

const (
	SubmitLabelReturn   SubmitLabelKind = 0
	SubmitLabelDone     SubmitLabelKind = 1
	SubmitLabelGo       SubmitLabelKind = 2
	SubmitLabelSend     SubmitLabelKind = 3
	SubmitLabelJoin     SubmitLabelKind = 4
	SubmitLabelContinue SubmitLabelKind = 5
	SubmitLabelNext     SubmitLabelKind = 6
	SubmitLabelSearch   SubmitLabelKind = 7
	SubmitLabelRoute    SubmitLabelKind = 8
)

type SymbolRenderingMode

type SymbolRenderingMode int32

SymbolRenderingMode identifies SF Symbol rendering modes.

const (
	SymbolRenderingModeMonochrome   SymbolRenderingMode = 0
	SymbolRenderingModeHierarchical SymbolRenderingMode = 1
	SymbolRenderingModePalette      SymbolRenderingMode = 2
	SymbolRenderingModeMulticolor   SymbolRenderingMode = 3
)

type TextAlignment

type TextAlignment int32

TextAlignment identifies multiline text alignment.

const (
	TextAlignmentLeading  TextAlignment = 0
	TextAlignmentCenter   TextAlignment = 1
	TextAlignmentTrailing TextAlignment = 2
)

type TextFieldStyleKind

type TextFieldStyleKind int32

TextFieldStyleKind identifies text field display styles.

const (
	TextFieldStyleAutomatic     TextFieldStyleKind = 0
	TextFieldStyleRoundedBorder TextFieldStyleKind = 1
	TextFieldStylePlain         TextFieldStyleKind = 2
)

type TextView

type TextView struct {
	View
}

TextView is a View created from a text constructor (Text, Label, etc.). It provides text-specific modifiers like Bold, Italic, and Font in addition to all universal View modifiers.

func Label

func Label(text string, systemImage string) TextView

Label creates a label with text and an SF Symbol icon.

func Text

func Text(s string) TextView

Text creates a text view displaying the given string.

func TextFrom

func TextFrom(state *IntState) TextView

TextFrom creates a text view that reactively displays an IntState value.

func TextFromString

func TextFromString(state *StringState) TextView

TextFromString creates a text view that reactively displays a StringState value.

func (TextView) AsView

func (v TextView) AsView() View

AsView returns the underlying View, discarding the text type.

func (TextView) Background

func (v TextView) Background(r float64, g float64, b float64, a float64) TextView

Background sets a background color using RGBA values.

func (TextView) Bold

func (v TextView) Bold() TextView

Bold applies bold font weight to text in the view.

func (TextView) Font

func (v TextView) Font(f Font) TextView

Font sets the font for the view.

func (TextView) FontDesign

func (v TextView) FontDesign(design Design) TextView

FontDesign sets the font design for text in the view.

func (TextView) FontWeight

func (v TextView) FontWeight(weight Weight) TextView

FontWeight sets the font weight for text in the view.

func (TextView) ForegroundStyle

func (v TextView) ForegroundStyle(r float64, g float64, b float64, a float64) TextView

ForegroundStyle sets the foreground color using RGBA values.

func (TextView) ForegroundStyleNamed

func (v TextView) ForegroundStyleNamed(name string) TextView

ForegroundStyleNamed sets a named foreground style (primary, secondary, tertiary, quaternary).

func (TextView) Frame

func (v TextView) Frame(width float64, height float64) TextView

Frame sets an explicit width and height for the view.

func (TextView) Italic

func (v TextView) Italic() TextView

Italic applies italic style to text in the view.

func (TextView) LineLimit

func (v TextView) LineLimit(n int) TextView

LineLimit sets the maximum number of lines for text views. Pass 0 for unlimited.

func (TextView) MonospacedDigit

func (v TextView) MonospacedDigit() TextView

MonospacedDigit applies monospaced digit formatting.

func (TextView) MultilineTextAlignment

func (v TextView) MultilineTextAlignment(alignment TextAlignment) TextView

MultilineTextAlignment sets the alignment for multiline text.

func (TextView) Offset

func (v TextView) Offset(x float64, y float64) TextView

Offset moves the view by the given x and y distances.

func (TextView) Opacity

func (v TextView) Opacity(opacity float64) TextView

Opacity sets the opacity of the view (0.0 to 1.0).

func (TextView) Padding

func (v TextView) Padding(amount float64) TextView

Padding applies uniform padding around the view.

func (TextView) Strikethrough

func (v TextView) Strikethrough() TextView

Strikethrough adds a strikethrough to text in the view.

func (TextView) SymbolRenderingMode

func (v TextView) SymbolRenderingMode(mode SymbolRenderingMode) TextView

SymbolRenderingMode sets the rendering mode for SF Symbols.

func (TextView) TruncationMode

func (v TextView) TruncationMode(mode TruncationMode) TextView

TruncationMode sets how text is truncated when it overflows.

func (TextView) Underline

func (v TextView) Underline() TextView

Underline adds an underline to text in the view.

type ToggleStyleKind

type ToggleStyleKind int32

ToggleStyleKind identifies toggle display styles.

const (
	ToggleStyleAutomatic ToggleStyleKind = 0
	ToggleStyleButton    ToggleStyleKind = 1
	ToggleStyleCheckbox  ToggleStyleKind = 2
	ToggleStyleSwitch    ToggleStyleKind = 3
)

type ToolbarItemPlacement

type ToolbarItemPlacement int32

ToolbarItemPlacement identifies toolbar item positions.

const (
	ToolbarItemPlacementAutomatic          ToolbarItemPlacement = 0
	ToolbarItemPlacementPrincipal          ToolbarItemPlacement = 1
	ToolbarItemPlacementNavigation         ToolbarItemPlacement = 2
	ToolbarItemPlacementPrimaryAction      ToolbarItemPlacement = 3
	ToolbarItemPlacementSecondaryAction    ToolbarItemPlacement = 4
	ToolbarItemPlacementCancellationAction ToolbarItemPlacement = 5
	ToolbarItemPlacementConfirmationAction ToolbarItemPlacement = 6
	ToolbarItemPlacementDestructiveAction  ToolbarItemPlacement = 7
	ToolbarItemPlacementStatus             ToolbarItemPlacement = 8
)

type ToolbarRole

type ToolbarRole int32

ToolbarRole identifies toolbar roles.

const (
	ToolbarRoleAutomatic       ToolbarRole = 0
	ToolbarRoleEditor          ToolbarRole = 1
	ToolbarRoleNavigationStack ToolbarRole = 2
)

type Transition

type Transition int32

Transition identifies view transition animations.

const (
	TransitionSlide   Transition = 0
	TransitionOpacity Transition = 1
	TransitionMove    Transition = 2
	TransitionScale   Transition = 3
	TransitionPush    Transition = 4
)

type TruncationMode

type TruncationMode int32

TruncationMode identifies text truncation behavior.

const (
	TruncationModeHead   TruncationMode = 0
	TruncationModeMiddle TruncationMode = 1
	TruncationModeTail   TruncationMode = 2
)

type VerticalAlignment

type VerticalAlignment int32

VerticalAlignment identifies vertical alignment options.

const (
	VerticalAlignmentTop               VerticalAlignment = 0
	VerticalAlignmentCenter            VerticalAlignment = 1
	VerticalAlignmentBottom            VerticalAlignment = 2
	VerticalAlignmentFirstTextBaseline VerticalAlignment = 3
	VerticalAlignmentLastTextBaseline  VerticalAlignment = 4
)

type View

type View struct {
	// contains filtered or unexported fields
}

View is an opaque handle to a SwiftUI view in the Swift bridge.

func AnimatedDynamicBoolView

func AnimatedDynamicBoolView(state *BoolState, transition Transition, builder func(value bool) View) View

AnimatedDynamicBoolView creates a BoolState-driven view with animated transitions.

func AnimatedDynamicFloatView

func AnimatedDynamicFloatView(state *FloatState, transition Transition, builder func(value float64) View) View

AnimatedDynamicFloatView creates a FloatState-driven view with animated transitions.

func AnimatedDynamicView

func AnimatedDynamicView(state *IntState, transition Transition, builder func(value int) View) View

AnimatedDynamicView creates a view with animated transitions between states.

func Button

func Button(label string, action func()) View

Button creates a clickable button with a text label.

func ButtonWithImage

func ButtonWithImage(systemName string, action func()) View

ButtonWithImage creates a clickable button with an SF Symbol icon.

func ButtonWithLabel

func ButtonWithLabel(text string, systemImage string, action func()) View

ButtonWithLabel creates a clickable button with both text and an SF Symbol icon.

func ColorPicker

func ColorPicker(label string, state *ColorState, onChange func()) View

ColorPicker creates a color picker bound to a ColorState.

func ColorView

func ColorView(r float64, g float64, b float64, a float64) View

ColorView creates a color view filling available space.

func DatePicker

func DatePicker(label string, state *DateState, onChange func()) View

DatePicker creates a date picker bound to a DateState.

func Divider

func Divider() View

Divider creates a visual divider line.

func DynamicBoolView

func DynamicBoolView(state *BoolState, builder func(value bool) View) View

DynamicBoolView creates a view whose content is rebuilt by a Go callback whenever the observed BoolState changes.

func DynamicFloatView

func DynamicFloatView(state *FloatState, builder func(value float64) View) View

DynamicFloatView creates a view whose content is rebuilt by a Go callback whenever the observed FloatState changes.

func DynamicView

func DynamicView(state *IntState, builder func(value int) View) View

DynamicView creates a view whose content is rebuilt by a Go callback whenever the observed IntState changes.

func EmptyView

func EmptyView() View

EmptyView creates an invisible empty view.

func FloatGauge

func FloatGauge(label string, state *FloatState, min float64, max float64) View

FloatGauge displays a gauge bound to a FloatState.

func FloatProgressView

func FloatProgressView(state *FloatState, total float64) View

FloatProgressView displays a progress bar bound to a FloatState.

func FloatSlider

func FloatSlider(label string, state *FloatState, min float64, max float64, onChange func()) View

FloatSlider creates a slider bound to a FloatState within a range.

func Form

func Form(children ...Viewable) View

Form groups controls for data entry.

func Gauge

func Gauge(value float64, label string) View

Gauge displays a value within a range.

func GeometryReader

func GeometryReader(builder func(width, height float64) View) View

GeometryReader creates a view whose content is built with the available width and height.

func GroupBox

func GroupBox(label string, content View) View

GroupBox creates a titled group box containing the given content.

func HStack

func HStack(children ...Viewable) View

HStack arranges child views in a horizontal stack.

func HStackSpaced

func HStackSpaced(spacing float64, children ...Viewable) View

HStackSpaced arranges child views in a horizontal stack with explicit spacing.

func Image

func Image(systemName string) View

Image creates an image view from an SF Symbol name.

func LazyHStack

func LazyHStack(children ...Viewable) View

LazyHStack arranges child views in a horizontal stack with lazy rendering.

func LazyVStack

func LazyVStack(children ...Viewable) View

LazyVStack arranges child views in a vertical stack with lazy rendering.

func Link(title string, url string) View

Link creates a navigation link that opens a URL.

func List

func List(children ...Viewable) View

List displays rows of data with platform-appropriate styling.

func Menu(label string, content View) View

Menu creates a dropdown menu with the given label and content.

func NavigationLink(label string, destination View) View

NavigationLink creates a link to a destination view within a NavigationStack.

func NavigationStack(content View) View

NavigationStack wraps content in a navigation container.

func PickerMenu

func PickerMenu(label string, state *IntState, options View, onChange func()) View

PickerMenu creates a dropdown menu picker bound to an IntState.

func PickerSegmented

func PickerSegmented(label string, state *IntState, options View, onChange func()) View

PickerSegmented creates a segmented picker bound to an IntState.

func ProgressLinear

func ProgressLinear(value float64, total float64) View

ProgressLinear creates a determinate linear progress indicator.

func ProgressSpinning

func ProgressSpinning() View

ProgressSpinning creates an indeterminate spinning progress indicator.

func ScrollView

func ScrollView(content View) View

ScrollView wraps content in a vertically scrollable container.

func Section

func Section(header string, content View) View

Section groups content with a header label.

func SecureField

func SecureField(placeholder string, state *StringState, onSubmit func()) View

SecureField creates a password input field bound to a StringState.

func Slider

func Slider(label string, state *IntState, min float64, max float64, onChange func()) View

Slider creates a slider bound to an IntState within a range.

func Spacer

func Spacer() View

Spacer creates a flexible space that expands along the major axis.

func Stepper

func Stepper(label string, state *IntState, min int32, max int32, onChange func()) View

Stepper creates an increment/decrement control bound to an IntState.

func TabView

func TabView(children ...Viewable) View

TabView presents multiple child views as tabs.

func TextEditor

func TextEditor(state *StringState) View

TextEditor creates a multiline text editor bound to a StringState.

func TextField

func TextField(placeholder string, state *StringState, onSubmit func()) View

TextField creates a text input field bound to a StringState.

func Toggle

func Toggle(label string, state *IntState, onChange func()) View

Toggle creates a toggle switch bound to an IntState (0=off, nonzero=on).

func VStack

func VStack(children ...Viewable) View

VStack arranges child views in a vertical stack.

func VStackSpaced

func VStackSpaced(spacing float64, children ...Viewable) View

VStackSpaced arranges child views in a vertical stack with explicit spacing.

func ViewFromPointer

func ViewFromPointer(ptr uintptr) View

ViewFromPointer creates a View from a raw pointer. This is used by companion packages (e.g. charts) that construct views via their own Swift bridge functions.

func ZStack

func ZStack(children ...Viewable) View

ZStack overlays child views back to front.

func (View) AccessibilityHidden

func (v View) AccessibilityHidden(hidden bool) View

AccessibilityHidden hides the view from accessibility features.

func (View) AccessibilityHint

func (v View) AccessibilityHint(hint string) View

AccessibilityHint sets the accessibility hint for the view.

func (View) AccessibilityLabel

func (v View) AccessibilityLabel(label string) View

AccessibilityLabel sets the accessibility label for the view.

func (View) Alert

func (v View) Alert(title string, message string, state *IntState) View

Alert presents an alert dialog when the IntState is nonzero.

func (View) AllowsHitTesting

func (v View) AllowsHitTesting(enabled bool) View

AllowsHitTesting controls whether the view receives hit-test events.

func (View) Animation

func (v View) Animation(kind AnimationKind) View

Animation applies an animation curve to the view.

func (View) AspectRatio

func (v View) AspectRatio(ratio float64, contentMode ContentMode) View

AspectRatio constrains the view to the given aspect ratio. ContentMode: 0=fit, 1=fill.

func (View) Background

func (v View) Background(r float64, g float64, b float64, a float64) View

Background sets a background color using RGBA values.

func (View) BackgroundRoundedRect

func (v View) BackgroundRoundedRect(r float64, g float64, b float64, a float64, cornerRadius float64) View

BackgroundRoundedRect sets a rounded rectangle background.

func (View) BackgroundStyle

func (v View) BackgroundStyle(name string) View

BackgroundStyle sets a named background style (e.g. "regularMaterial", "windowBackground").

func (View) Blur

func (v View) Blur(radius float64) View

Blur applies a Gaussian blur effect.

func (View) Border

func (v View) Border(r float64, g float64, b float64, a float64, width float64) View

Border adds a border to the view.

func (View) ButtonStyle

func (v View) ButtonStyle(style ButtonStyleKind) View

ButtonStyle sets the button style for the view hierarchy.

func (View) ClipRoundedRect

func (v View) ClipRoundedRect(cornerRadius float64) View

ClipRoundedRect clips the view to a rounded rectangle.

func (View) Clipped

func (v View) Clipped() View

Clipped clips the view to its bounding frame.

func (View) ConfirmationDialog

func (v View) ConfirmationDialog(title string, state *IntState, actions View) View

ConfirmationDialog presents a confirmation dialog with custom actions when the IntState is nonzero.

func (View) ContextMenu

func (v View) ContextMenu(content View) View

ContextMenu adds a right-click context menu to the view.

func (View) ControlSize

func (v View) ControlSize(size ControlSize) View

ControlSize sets the control size for the view hierarchy.

func (View) CornerRadius

func (v View) CornerRadius(radius float64) View

CornerRadius clips the view to a rounded rectangle.

func (View) Disabled

func (v View) Disabled(disabled bool) View

Disabled disables user interaction for the view.

func (View) FixedSize

func (v View) FixedSize() View

FixedSize prevents the view from expanding beyond its ideal size.

func (View) FixedSizeAxis

func (v View) FixedSizeAxis(horizontal bool, vertical bool) View

FixedSizeAxis prevents expansion along specific axes.

func (View) Focusable

func (v View) Focusable(focusable bool) View

Focusable controls whether the view can receive keyboard focus.

func (View) Font

func (v View) Font(f Font) View

Font sets the font for the view.

func (View) FontDesign

func (v View) FontDesign(design Design) View

FontDesign sets the font design for text in the view.

func (View) FontWeight

func (v View) FontWeight(weight Weight) View

FontWeight sets the font weight for text in the view.

func (View) ForegroundStyle

func (v View) ForegroundStyle(r float64, g float64, b float64, a float64) View

ForegroundStyle sets the foreground color using RGBA values.

func (View) ForegroundStyleNamed

func (v View) ForegroundStyleNamed(name string) View

ForegroundStyleNamed sets a named foreground style (primary, secondary, tertiary, quaternary).

func (View) Frame

func (v View) Frame(width float64, height float64) View

Frame sets an explicit width and height for the view.

func (View) FullScreenCover

func (v View) FullScreenCover(state *IntState, content View) View

FullScreenCover presents a full-screen modal when the IntState is nonzero.

func (View) Help

func (v View) Help(text string) View

Help adds a tooltip to the view.

func (View) ImageScale

func (v View) ImageScale(scale ImageScale) View

ImageScale sets the scale for SF Symbol images.

func (View) LayoutPriority

func (v View) LayoutPriority(priority float64) View

LayoutPriority sets the layout priority for this view.

func (View) ListRowBackground

func (v View) ListRowBackground(background View) View

ListRowBackground sets a custom background for a list row.

func (View) ListStyle

func (v View) ListStyle(style ListStyleKind) View

ListStyle sets the list display style.

func (View) Mask

func (v View) Mask(mask View) View

Mask clips the view using the given view as a mask.

func (View) MaxFrame

func (v View) MaxFrame(maxWidth float64, maxHeight float64) View

MaxFrame sets maximum width/height constraints. Use -1 for .infinity, 0 for nil.

func (View) NavigationTitle

func (v View) NavigationTitle(title string) View

NavigationTitle sets the navigation title for the view.

func (View) Offset

func (v View) Offset(x float64, y float64) View

Offset moves the view by the given x and y distances.

func (View) OnAppear

func (v View) OnAppear(action func()) View

OnAppear adds an action to perform when the view appears.

func (View) OnDisappear

func (v View) OnDisappear(action func()) View

OnDisappear adds an action to perform when the view disappears.

func (View) OnHover

func (v View) OnHover(action func()) View

OnHover adds a hover callback. The callback fires when hover state changes.

func (View) OnTapGesture

func (v View) OnTapGesture(action func()) View

OnTapGesture adds a tap gesture handler to the view.

func (View) Opacity

func (v View) Opacity(opacity float64) View

Opacity sets the opacity of the view (0.0 to 1.0).

func (View) Overlay

func (v View) Overlay(overlay View) View

Overlay places another view on top of this view.

func (View) Padding

func (v View) Padding(amount float64) View

Padding applies uniform padding around the view.

func (View) PaddingEdge

func (v View) PaddingEdge(edges Edge, amount float64) View

PaddingEdge applies padding to specific edges.

func (View) Pointer

func (v View) Pointer() uintptr

Pointer returns the underlying opaque pointer. This is used by companion packages that need to pass views to bridge functions.

func (View) Popover

func (v View) Popover(state *IntState, content View) View

Popover presents a popover when the IntState is nonzero.

func (*View) Release

func (v *View) Release()

Release decrements the underlying Swift retain count.

func (View) RotationEffect

func (v View) RotationEffect(degrees float64) View

RotationEffect rotates the view by the given angle in degrees.

func (View) ScaleEffect

func (v View) ScaleEffect(scale float64) View

ScaleEffect scales the view uniformly.

func (View) Shadow

func (v View) Shadow(r float64, g float64, b float64, a float64, radius float64, x float64, y float64) View

Shadow adds a shadow effect to the view.

func (View) Sheet

func (v View) Sheet(state *IntState, content View) View

Sheet presents a modal sheet when the IntState is nonzero.

func (View) TabItem

func (v View) TabItem(label string, systemImage string) View

TabItem sets the tab label and icon for use inside a TabView.

func (View) Tag

func (v View) Tag(tag int32) View

Tag assigns an integer tag for selection tracking.

func (View) TextFieldStyle

func (v View) TextFieldStyle(style TextFieldStyleKind) View

TextFieldStyle sets the style for text fields.

func (View) Tint

func (v View) Tint(r float64, g float64, b float64, a float64) View

Tint applies a tint color to the view.

func (View) WebViewBackForwardNavigationGestures

func (v View) WebViewBackForwardNavigationGestures(behavior WebViewBehavior) View

WebViewBackForwardNavigationGestures controls web view back/forward gesture behavior.

func (View) WebViewContentBackground

func (v View) WebViewContentBackground(visibility WebViewContentBackgroundVisibility) View

WebViewContentBackground controls visibility of the web view content background.

func (View) WebViewElementFullscreenBehavior

func (v View) WebViewElementFullscreenBehavior(behavior WebViewBehavior) View

WebViewElementFullscreenBehavior controls full-screen behavior for web page elements.

func (View) WebViewLinkPreviews

func (v View) WebViewLinkPreviews(behavior WebViewBehavior) View

WebViewLinkPreviews controls whether link previews are shown.

func (View) WebViewMagnificationGestures

func (v View) WebViewMagnificationGestures(behavior WebViewBehavior) View

WebViewMagnificationGestures controls magnification gesture behavior.

func (View) WebViewTextSelection

func (v View) WebViewTextSelection(enabled bool) View

WebViewTextSelection enables or disables text selection in the web view.

func (View) ZIndex

func (v View) ZIndex(index float64) View

ZIndex sets the front-to-back ordering of the view within a ZStack.

type Viewable

type Viewable interface {
	// contains filtered or unexported methods
}

Viewable is satisfied by View, ShapeView, and TextView. Container functions accept Viewable so any view type can be passed directly.

type WebPage deprecated

type WebPage struct {
	// contains filtered or unexported fields
}

WebPage is a retained handle to a Swift WebPage object.

Deprecated: Use webkit.NewWebPage from swift-bridge/webkit instead. This type provides only basic navigation; the webkit package exposes the full WebPage API (Title, URL, EstimatedProgress, JavaScript, PDF export, and more). To embed a web page in SwiftUI, use swiftui.ViewFromPointer(webkit.NewWebView(page)).

func NewWebPage deprecated

func NewWebPage() *WebPage

NewWebPage creates a new WebPage handle.

Deprecated: Use webkit.NewWebPage from swift-bridge/webkit instead.

func NewWebPageURL deprecated

func NewWebPageURL(url string) *WebPage

NewWebPageURL creates a WebPage and starts loading the given URL.

Deprecated: Use webkit.NewWebPageWithURL from swift-bridge/webkit instead.

func (*WebPage) LoadURL deprecated

func (p *WebPage) LoadURL(url string)

LoadURL loads a URL string on the page.

Deprecated: Use webkit.WebPage.LoadURL from swift-bridge/webkit instead.

func (*WebPage) Pointer

func (p *WebPage) Pointer() uintptr

Pointer returns the underlying Swift WebPage object pointer.

func (*WebPage) Release

func (p *WebPage) Release()

Release decrements the underlying Swift retain count for this page.

func (*WebPage) Reload deprecated

func (p *WebPage) Reload()

Reload reloads the current page.

Deprecated: Use webkit.WebPage.Reload from swift-bridge/webkit instead.

type WebViewBehavior

type WebViewBehavior int32

WebViewBehavior identifies web view feature behavior.

const (
	WebViewBehaviorAutomatic WebViewBehavior = 0
	WebViewBehaviorEnabled   WebViewBehavior = 1
	WebViewBehaviorDisabled  WebViewBehavior = 2
)

type WebViewContentBackgroundVisibility

type WebViewContentBackgroundVisibility int32

WebViewContentBackgroundVisibility identifies web view content background visibility.

const (
	WebViewContentBackgroundAutomatic WebViewContentBackgroundVisibility = 0
	WebViewContentBackgroundVisible   WebViewContentBackgroundVisibility = 1
	WebViewContentBackgroundHidden    WebViewContentBackgroundVisibility = 2
)

type Weight

type Weight int32

Weight identifies font weight presets.

const (
	WeightUltraLight Weight = 0
	WeightThin       Weight = 1
	WeightLight      Weight = 2
	WeightRegular    Weight = 3
	WeightMedium     Weight = 4
	WeightSemibold   Weight = 5
	WeightBold       Weight = 6
	WeightHeavy      Weight = 7
	WeightBlack      Weight = 8
)

Directories

Path Synopsis
Package arkit provides Go bindings for Apple's ARKit SwiftUI cross-import overlay (_ARKit_SwiftUI).
Package arkit provides Go bindings for Apple's ARKit SwiftUI cross-import overlay (_ARKit_SwiftUI).
Package avkit provides Go bindings for Apple's AVKit SwiftUI cross-import overlay (_AVKit_SwiftUI).
Package avkit provides Go bindings for Apple's AVKit SwiftUI cross-import overlay (_AVKit_SwiftUI).
Package charts provides Go bindings for Apple's Charts framework.
Package charts provides Go bindings for Apple's Charts framework.
Package charts3d provides Go bindings for the 3D portion of Apple's Charts framework.
Package charts3d provides Go bindings for the 3D portion of Apple's Charts framework.
cmd
swiftgovet command
Command swiftgovet provides project-specific vet checks for SwiftUI Go code.
Command swiftgovet provides project-specific vet checks for SwiftUI Go code.
dist
examples
accessibility command
Command accessibility demonstrates SwiftUI accessibility modifiers from Go.
Command accessibility demonstrates SwiftUI accessibility modifiers from Go.
animation command
Command animation demonstrates SwiftUI animations and transitions from Go.
Command animation demonstrates SwiftUI animations and transitions from Go.
benchview command
calculator command
Command calculator demonstrates a working calculator app built with SwiftUI from Go.
Command calculator demonstrates a working calculator app built with SwiftUI from Go.
charts command
Command charts showcases native Swift Charts bindings generated for Go.
Command charts showcases native Swift Charts bindings generated for Go.
color-lab command
Command color-lab is an interactive color mixing and exploration tool.
Command color-lab is an interactive color mixing and exploration tool.
counter command
Command counter demonstrates reactive state management with SwiftUI from Go.
Command counter demonstrates reactive state management with SwiftUI from Go.
dark-light command
Command dark-light showcases semantic foreground and background styles.
Command dark-light showcases semantic foreground and background styles.
dashboard command
Command dashboard demonstrates a multi-tab live dashboard with real-time Go runtime metrics, navigation, and interactive controls.
Command dashboard demonstrates a multi-tab live dashboard with real-time Go runtime metrics, navigation, and interactive controls.
dynamic-list command
Command dynamic-list demonstrates reactive list updates with SwiftUI from Go.
Command dynamic-list demonstrates reactive list updates with SwiftUI from Go.
form command
Command form demonstrates SwiftUI form controls from Go.
Command form demonstrates SwiftUI form controls from Go.
glass command
Command glass demonstrates material and translucency effects in SwiftUI from Go, showcasing the liquid glass aesthetic on macOS 26+.
Command glass demonstrates material and translucency effects in SwiftUI from Go, showcasing the liquid glass aesthetic on macOS 26+.
hello-world command
Command hello-world is a minimal but polished SwiftUI app from Go.
Command hello-world is a minimal but polished SwiftUI app from Go.
kanban command
Command kanban demonstrates a three-column Kanban board with card management.
Command kanban demonstrates a three-column Kanban board with card management.
layout command
Command layout demonstrates SwiftUI layout composition and visual styling from Go.
Command layout demonstrates SwiftUI layout composition and visual styling from Go.
markdown-editor command
Command markdown-editor demonstrates a split-pane text editor with live preview.
Command markdown-editor demonstrates a split-pane text editor with live preview.
menu-bar command
Command menu-bar demonstrates modal presentations in SwiftUI from Go.
Command menu-bar demonstrates modal presentations in SwiftUI from Go.
music-player command
Command music-player demonstrates a rich music player UI with playlist navigation, now-playing view, and audio visualizer using SwiftUI from Go.
Command music-player demonstrates a rich music player UI with playlist navigation, now-playing view, and audio visualizer using SwiftUI from Go.
password-generator command
Command password-generator demonstrates a password generator and strength analyzer built with SwiftUI from Go.
Command password-generator demonstrates a password generator and strength analyzer built with SwiftUI from Go.
pomodoro command
Command pomodoro demonstrates a Pomodoro technique timer built with SwiftUI from Go.
Command pomodoro demonstrates a Pomodoro technique timer built with SwiftUI from Go.
quicklook-preview command
Command quicklook-preview demonstrates the QuickLook SwiftUI overlay bridge.
Command quicklook-preview demonstrates the QuickLook SwiftUI overlay bridge.
quiz command
Command quiz demonstrates an interactive Go trivia game with animated transitions, scoring, and results using SwiftUI from Go.
Command quiz demonstrates an interactive Go trivia game with animated transitions, scoring, and results using SwiftUI from Go.
settings command
Command settings demonstrates a comprehensive macOS settings panel built with SwiftUI from Go.
Command settings demonstrates a comprehensive macOS settings panel built with SwiftUI from Go.
system-monitor command
Command system-monitor displays live Go runtime metrics using SwiftUI gauges and progress bars, updated every two seconds from a background goroutine.
Command system-monitor displays live Go runtime metrics using SwiftUI gauges and progress bars, updated every two seconds from a background goroutine.
tabs command
Command tabs demonstrates a polished tabbed workspace built with SwiftUI from Go.
Command tabs demonstrates a polished tabbed workspace built with SwiftUI from Go.
timer command
Command timer demonstrates Go goroutines driving reactive SwiftUI updates.
Command timer demonstrates Go goroutines driving reactive SwiftUI updates.
video-player command
Command video-player demonstrates the AVKit SwiftUI overlay bridge.
Command video-player demonstrates the AVKit SwiftUI overlay bridge.
web-browser command
Command web-browser demonstrates WebView embedding in SwiftUI from Go.
Command web-browser demonstrates WebView embedding in SwiftUI from Go.
internal
swiftgovet/browseraction
Package browseraction reports browser controls wired to no-op callbacks.
Package browseraction reports browser controls wired to no-op callbacks.
swiftgovet/settingsaction
Package settingsaction reports misleading Save and Revert button handlers.
Package settingsaction reports misleading Save and Revert button handlers.
swiftgovet/swiftuiast
Package swiftuiast provides small helpers for SwiftUI-specific analyzers.
Package swiftuiast provides small helpers for SwiftUI-specific analyzers.
Package localauth provides Go bindings for Apple's LocalAuthentication SwiftUI cross-import overlay (_LocalAuthentication_SwiftUI).
Package localauth provides Go bindings for Apple's LocalAuthentication SwiftUI cross-import overlay (_LocalAuthentication_SwiftUI).
Package quicklook provides Go bindings for Apple's QuickLook SwiftUI cross-import overlay (_QuickLook_SwiftUI).
Package quicklook provides Go bindings for Apple's QuickLook SwiftUI cross-import overlay (_QuickLook_SwiftUI).
Package scenekit provides Go bindings for Apple's SceneKit SwiftUI cross-import overlay (_SceneKit_SwiftUI).
Package scenekit provides Go bindings for Apple's SceneKit SwiftUI cross-import overlay (_SceneKit_SwiftUI).
Package spritekit provides Go bindings for Apple's SpriteKit SwiftUI cross-import overlay (_SpriteKit_SwiftUI).
Package spritekit provides Go bindings for Apple's SpriteKit SwiftUI cross-import overlay (_SpriteKit_SwiftUI).
Package translation provides Go bindings for Apple's Translation SwiftUI cross-import overlay (_Translation_SwiftUI).
Package translation provides Go bindings for Apple's Translation SwiftUI cross-import overlay (_Translation_SwiftUI).
Package workoutkit provides Go bindings for Apple's WorkoutKit SwiftUI cross-import overlay (_WorkoutKit_SwiftUI).
Package workoutkit provides Go bindings for Apple's WorkoutKit SwiftUI cross-import overlay (_WorkoutKit_SwiftUI).

Jump to

Keyboard shortcuts

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