No description
  • Go 96.6%
  • C 0.9%
  • Objective-C 0.8%
  • JavaScript 0.7%
  • GLSL 0.6%
  • Other 0.3%
Find a file
Stu Leak 5110757b69 painter: add FontCacheDebugCallback and ClearFontCache for font diagnostics
Expose a debug hook that fires on first face-list build per style so callers
can log which font resource actually becomes faces[0]. Also expose ClearFontCache
via fontutil so the app can flush stale NotoSans entries after SetTheme.
2026-03-25 03:34:40 -04:00
.github ci: remove workflows - local dev on Windows only 2026-03-20 13:51:41 -04:00
app Fix theme watch not being set up if custom theme is specified before app run 2025-12-31 17:43:19 +00:00
canvas Add TexSubImage2D to GL context and UpdatePixels to Raster 2026-03-20 11:06:11 -04:00
cmd Prepping for a v2.7.2 2025-12-31 17:46:53 +00:00
container Fix truncation of navigation title 2025-12-31 17:35:54 +00:00
data Use the type safe methods in map binding 2025-09-06 13:12:18 +02:00
dialog Print out all components 2025-11-10 20:33:49 +00:00
driver driver/desktop: add MouseButton4 and MouseButton5 2026-03-20 12:23:24 -04:00
fontutil painter: add FontCacheDebugCallback and ClearFontCache for font diagnostics 2026-03-25 03:34:40 -04:00
img Up to date screenshots 2024-02-01 17:21:51 +00:00
internal painter: add FontCacheDebugCallback and ClearFontCache for font diagnostics 2026-03-25 03:34:40 -04:00
lang Translated using Weblate (Japanese) 2025-12-31 17:19:12 +00:00
layout Include InnerPadding for canvas.Text in MinSize and row height 2025-10-03 15:35:41 +01:00
storage Fix too many slashes in Windows paths 2025-11-11 09:00:08 +00:00
test Merge pull request #5821 from andydotxyz/feature/tamago 2025-09-28 20:47:16 +01:00
theme Merge remote-tracking branch 'fyne/develop' into remove-implements-comments 2025-09-30 20:26:26 +02:00
tools/playground Test suite: code linting 2025-01-05 22:54:23 +01:00
widget Add document to clarify OnSubmitted 2026-02-18 11:41:35 +00:00
.gitignore Make the .gitignore file more robust 2023-09-14 10:37:51 +02:00
.godocdown.import Add doc metadata 2021-01-22 20:32:53 +00:00
animation.go Backing out InfiniteAnimation as discussed because it has different speeds depending on the display frame rate. 2025-02-10 14:38:32 +00:00
animation_test.go Add missing tests 2020-11-13 23:10:43 +00:00
app.go Merge branch 'master' into develop 2025-02-01 18:58:20 +00:00
app_test.go Add fyne.App.Clipboard method, fixes #4418 2024-09-09 17:34:34 +02:00
AUTHORS Somehow Simon was not added 2025-02-06 15:50:27 +00:00
canvas.go Update root package GoDoc to include internal links 2024-10-01 15:07:34 +02:00
canvasobject.go Update root package GoDoc to include internal links 2024-10-01 15:07:34 +02:00
CHANGELOG.md Preparing v2.7.3 2026-02-17 12:37:56 +00:00
clipboard.go Add paste support to entry widget (#89) 2019-02-28 10:10:39 +00:00
cloud.go Update root package GoDoc to include internal links 2024-10-01 15:07:34 +02:00
CODE_OF_CONDUCT.md Added full version of the code of conduct 2019-02-10 20:00:20 +00:00
container.go Revert "container: remove unnecessary slice copy from Container.Remove" 2025-01-27 13:02:33 +00:00
container_test.go all: Run gofumpt 2025-06-06 19:13:46 +02:00
CONTRIBUTING.md Add missing changelog and fix old info in contribution notes 2025-10-11 16:48:39 +01:00
device.go Make Locale available from device interface 2024-01-22 15:39:26 +00:00
driver.go Creating a version of that does not wait 2025-01-21 21:45:12 +00:00
event.go Update root package GoDoc to include internal links 2024-10-01 15:07:34 +02:00
fyne.go all: Reformat for Go 1.19 (more strict with godoc markdown support) 2022-11-29 21:22:58 +01:00
geometry.go Update root package GoDoc to include internal links 2024-10-01 15:07:34 +02:00
geometry_benchmark_test.go Remove flaky tests that made sure benchmarks were fast enough 2023-06-26 17:57:48 +02:00
geometry_test.go Switch naming to fyne.NewSquareOffsetPos 2023-06-22 17:12:56 +02:00
go.mod [text] bump go-text/typesetting to v0.3.3 and fix deprecated fields. 2026-02-17 12:16:48 +00:00
go.sum [text] bump go-text/typesetting to v0.3.3 and fix deprecated fields. 2026-02-17 12:16:48 +00:00
key.go move modifier key rune constants into widget package 2022-01-24 08:28:23 +01:00
key_darwin.go move modifier key rune constants into widget package 2022-01-24 08:28:23 +01:00
key_other.go Switch from +build to go:build 2024-01-02 12:18:41 +01:00
layout.go Update root package GoDoc to include internal links 2024-10-01 15:07:34 +02:00
LICENSE Clarify license type, should make GitHub happy 2020-06-21 22:26:18 +01:00
locale.go Add missed translation and documentation 2024-02-26 21:35:22 +00:00
log.go Improve error handling (#152) 2019-03-16 22:13:14 +00:00
log_test.go Test suite: code linting 2025-01-05 22:54:23 +01:00
math.go Move to float32 coordinates (#1661) 2020-12-19 22:03:59 +00:00
math_test.go Move to float32 coordinates (#1661) 2020-12-19 22:03:59 +00:00
menu.go Add NewMenuItemWithIcon constructor 2025-08-22 07:46:30 -07:00
menu_test.go all: Run gofumpt 2025-06-06 19:13:46 +02:00
notification.go Update root package GoDoc to include internal links 2024-10-01 15:07:34 +02:00
overlay_stack.go Update root package GoDoc to include internal links 2024-10-01 15:07:34 +02:00
preferences.go Add int float and bool lists too 2023-05-31 22:20:23 +01:00
README.md Fix demo location 2026-03-09 14:54:12 +00:00
resource.go Update root package GoDoc to include internal links 2024-10-01 15:07:34 +02:00
resource_test.go Remove the now not needed Resource.CachePath 2019-02-20 11:26:20 +00:00
scroll.go Fix version attach 2025-02-01 10:24:30 +00:00
SECURITY.md Update SECURITY.md for 2.6 2025-02-08 11:01:52 +01:00
serialise.go Optimize the StaticResource.GoString() method to be 20% faster 2022-09-15 16:03:30 +02:00
serialise_test.go Fix an incorrectly placed constant 2022-09-15 16:05:03 +02:00
settings.go add new callback-based settings listener API, and use it in glfw main loop 2025-01-18 18:49:39 -06:00
shortcut.go Remove "Implements: " comments and vet uses 2025-09-30 17:18:40 +02:00
shortcut_test.go Fix issues from new gofumpt release 2025-09-02 23:23:38 +02:00
staticcheck.conf Fix usage of deprecated theme APIs 2024-01-08 21:51:52 +01:00
storage.go Add missing docs 2021-08-18 13:43:40 +01:00
text.go Update root package GoDoc to include internal links 2024-10-01 15:07:34 +02:00
theme.go Tidying up since lines to follow documented naming 2021-01-18 14:27:03 +00:00
thread.go Flip Fyne.Do and Fyne.DoAsync with Fyne.DoAndWay and Fyne.Do 2025-01-23 21:47:02 +00:00
uri.go Update NewFileURI to support relative paths (#5243) 2024-11-23 13:45:26 +00:00
validation.go Add new Since: docs to the APIs added in 1.4 2020-11-18 16:23:56 +00:00
widget.go Update root package GoDoc to include internal links 2024-10-01 15:07:34 +02:00
window.go Update root package GoDoc to include internal links 2024-10-01 15:07:34 +02:00

Go API Reference Latest Release Join us on Slack
Code Status Build Status Coverage Status

About

Fyne is an easy-to-use UI toolkit and app API written in Go. It is designed to build applications that run on desktop and mobile devices with a single codebase.

Prerequisites

To develop apps using Fyne you will need Go version 1.17 or later, a C compiler and your system's development tools. If you're not sure if that's all installed or you don't know how then check out our Getting Started document.

Using the standard go tools you can install Fyne's core library using:

go get fyne.io/fyne/v2@latest

After importing a new module, run the following command before compiling the code for the first time. Avoid running it before writing code that uses the module to prevent accidental removal of dependencies:

go mod tidy

Widget demo

To run a showcase of the features of Fyne execute the following:

go install fyne.io/demo@latest
demo

And you should see something like this (after you click a few buttons):

Fyne Demo Dark Theme

Or if you are using the light theme:

Fyne Demo Light Theme

And even running on a mobile device:

Fyne Demo Mobile Light Theme

Getting Started

Fyne is designed to be really easy to code with. If you have followed the prerequisite steps above then all you need is a Go IDE (or a text editor).

Open a new file and you're ready to write your first app!

package main

import (
	"fyne.io/fyne/v2/app"
	"fyne.io/fyne/v2/container"
	"fyne.io/fyne/v2/widget"
)

func main() {
	a := app.New()
	w := a.NewWindow("Hello")

	hello := widget.NewLabel("Hello Fyne!")
	w.SetContent(container.NewVBox(
		hello,
		widget.NewButton("Hi!", func() {
			hello.SetText("Welcome :)")
		}),
	))

	w.ShowAndRun()
}

And you can run that simply as:

go run main.go

Note

The first compilation of Fyne on Windows can take up to 10 minutes, depending on your hardware. Subsequent builds will be fast.

It should look like this:

Fyne Hello Dark Theme Fyne Hello Dark Theme

Run in mobile simulation

There is a helpful mobile simulation mode that gives a hint of how your app would work on a mobile device:

go run -tags mobile main.go

Another option is to use fyne command, see Packaging for mobile.

Installing

Using go install will copy the executable into your go bin dir. To install the application with icons etc into your operating system's standard application location you can use the fyne utility and the "install" subcommand.

go install fyne.io/tools/cmd/fyne@latest
fyne install

Packaging for mobile

To run on a mobile device it is necessary to package up the application. To do this we can use the fyne utility "package" subcommand. You will need to add appropriate parameters as prompted, but the basic command is shown below. Once packaged you can install using the platform development tools or the fyne "install" subcommand.

fyne package -os android -appID my.domain.appname
fyne install -os android

The built Android application can run either in a real device or an Android emulator. However, building for iOS is slightly different. If the "-os" argument is "ios", it is build only for a real iOS device. Specify "-os" to "iossimulator" allows the application be able to run in an iOS simulator:

fyne package -os ios -appID my.domain.appname
fyne package -os iossimulator -appID my.domain.appname

Preparing a release

Using the fyne utility "release" subcommand you can package up your app for release to app stores and market places. Make sure you have the standard build tools installed and have followed the platform documentation for setting up accounts and signing. Then you can execute something like the following, notice the -os ios parameter allows building an iOS app from macOS computer. Other combinations work as well :)

$ fyne release -os ios -certificate "Apple Distribution" -profile "My App Distribution" -appID "com.example.myapp"

The above command will create a '.ipa' file that can then be uploaded to the iOS App Store.

Documentation

More documentation is available at the Fyne developer website or on pkg.go.dev.

Examples

You can find many example applications in the examples repository. Alternatively a list of applications using fyne can be found at our website.

Shipping the Fyne Toolkit

All Fyne apps will work without pre-installed libraries, this is one reason the apps are so portable. However, if looking to support Fyne in a bigger way on your operating system then you can install some utilities that help to make a more complete experience.

Additional apps

It is recommended that you install the following additional apps:

app go install description
fyne_settings fyne.io/fyne/v2/cmd/fyne_settings A GUI for managing your global Fyne settings like theme and scaling
apps github.com/fyne-io/apps A graphical installer for the Fyne apps listed at https://apps.fyne.io

These are optional applications but can help to create a more complete desktop experience.

FyneDesk (Linux / BSD)

To go all the way with Fyne on your desktop / laptop computer you could install FyneDesk as well :)

FyneDesk screenshopt in dark mode