Fuzio in Compose Desktop
This page describes how to configure a Gradle project to use Fuzio with the Compose GUI toolkit.
Prerequisites
- Git.
- Java 17 or higher.
- Fuzio license key, or a free trial key.
Getting the project
The sample project described below in this guide can be found as the standalone repository on Gitee.
Configuring the Gradle project
Repository
Fuzio is distributed via the maven repository hosted by Jiku. Please add the following repository reference to your build.gradle.kts:
repositories {
// The repository with Fuzio binaries.
maven("https://jiku.mycloudrepo.io/public/repositories/releases")
}
Version variable
We recommend to define a variable for the version of Fuzio used in the project. The following sections reference such a variable.
val fuzioVersion = "2026.1.0"
Platform
To add Fuzio library that works on Windows, macOS, and Linux, please add the following code:
dependencies {
implementation("tech.fuzio:fuzio-cross-platform:$fuzioVersion")
}
Compose
To use Fuzio in the Compose GUI of your app, please add the corresponding Fuzio dependencies as well:
dependencies {
implementation("tech.fuzio:fuzio-compose:$fuzioVersion")
}
For seamless Compose integration, we recommend using the Compose gradle plugins:
plugins {
id("org.jetbrains.compose") version "1.7.3"
id("org.jetbrains.kotlin.plugin.compose") version "2.0.0"
}
Kotlin DSL
If you develop using Kotlin, then we recommend that you to add Fuzio Kotlin DSL for the best experience.
dependencies {
implementation("tech.fuzio:fuzio-kotlin:$fuzioVersion")
}
Summary
plugins {
java
application
kotlin("jvm") version "2.0.0"
// Adds the Compose plugins for easy configuration.
id("org.jetbrains.compose") version "1.7.3"
id("org.jetbrains.kotlin.plugin.compose") version "2.0.0"
}
val fuzioVersion = "2026.1.0"
repositories {
google()
mavenCentral()
maven("https://jiku.mycloudrepo.io/public/repositories/releases")
}
dependencies {
implementation("tech.fuzio:fuzio-cross-platform:${fuzioVersion}")
implementation("tech.fuzio:fuzio-compose:${fuzioVersion}")
implementation(kotlin("stdlib-jdk8"))
implementation("tech.fuzio:fuzio-kotlin:${fuzioVersion}")
implementation(compose.desktop.currentOs)
}
kotlin {
jvmToolchain(17)
}
application {
// Define the main class for the application.
mainClass.set("ComposeAppKt")
}
tasks.withType<JavaExec> {
// Assign all Java system properties from
// the command line to the JavaExec task.
systemProperties(System.getProperties().mapKeys { it.key as String })
}
Embedding Fuzio into Compose
The Compose Desktop application is written in Kotlin and uses the Compose Desktop UI toolkit to create a window with a BrowserView component that displays the content of the loaded web page:
// ComposeApp.kt
import androidx.compose.runtime.DisposableEffect
import androidx.compose.ui.unit.dp
import androidx.compose.ui.window.WindowState
import androidx.compose.ui.window.singleWindowApplication
import tech.fuzio.dsl.Engine
import tech.fuzio.dsl.browser.navigation
import tech.fuzio.engine.RenderingMode.OFF_SCREEN
import tech.fuzio.view.compose.BrowserView
fun main() {
// Initialize Chromium.
val engine = Engine(OFF_SCREEN)
// Create a Browser instance.
val browser = engine.newBrowser()
singleWindowApplication(
title = "Compose Desktop BrowserView",
state = WindowState(width = 700.dp, height = 500.dp),
) {
// Add a BrowserView composable to display web content.
BrowserView(browser)
DisposableEffect(Unit) {
browser.navigation.loadUrl("https://html5test.jiku.co")
onDispose {
// Shutdown Chromium and release allocated resources.
engine.close()
}
}
}
}
Run the Compose application
Use the following command to build and run Compose application:
./gradlew run -Dfuzio.license.key=<your_license_key>
Once launched, you will see a Compose application with a BrowserView component displaying https://html5test.jiku.co:

What’s next
- Learn more how to add Fuzio to a Gradle project.
- Read about how to embed Fuzio into a Compose app.
- Discover all Fuzio features by checking out our guides.

