wvbridge:core

ArtifactLatest version
core
platform-windows
platform-linux
platform-macos

wvbridge is a Compose Multiplatform library that embeds the host platform WebView and exposes a small, Kotlin-friendly common API for loading pages, observing URL and loading state changes, and driving basic browser navigation.

Documentation site: wvbridge.kagg886.top

Note: This project is under active development. APIs and platform coverage may change.

Installation

Add the common API to your shared source set:

repositories {
mavenCentral()
}

kotlin {
sourceSets {
commonMain.dependencies {
implementation("top.kagg886.wvbridge:core:<version>")
}
}
}

On JVM, wvbridge also needs a platform-specific native runtime library. The recommended approach is to use Google's os-detector Gradle plugin and choose the runtime artifact from osdetector.classifier.

plugins {
id("com.google.osdetector") version "1.7.3"
}

repositories {
mavenCentral()
}

kotlin {
jvm()

sourceSets {
jvmMain.dependencies {
val platform = when (osdetector.classifier) {
"windows-x86_64" -> "platform-windows"
"linux-x86_64" -> "platform-linux"
"osx-aarch_64" -> "platform-macos"
else -> error(
"Unsupported JVM runtime for wvbridge: ${osdetector.classifier}. " +
"Supported classifiers are windows-x86_64, linux-x86_64, and osx-aarch_64."
)
}

runtimeOnly("top.kagg886.wvbridge:$platform:<version>")
}
}
}

Current JVM native runtime support is limited to:

  • Windows x64: windows-x86_64

  • Linux x64: linux-x86_64

  • macOS arm64: osx-aarch_64

Quick Start

Create a remembered controller and render WebView:

import androidx.compose.ui.Modifier
import top.kagg886.wvbridge.WebView
import top.kagg886.wvbridge.rememberWebViewController

val webViewController = rememberWebViewController("https://example.com")

WebView(
controller = webViewController,
modifier = Modifier,
)

Basic navigation uses webViewController.navigator:

webViewController.navigator.loadUrl("https://kotlinlang.org")
webViewController.navigator.goBack()
webViewController.navigator.goForward()
webViewController.navigator.refresh()
webViewController.navigator.stop()

More features are documented at wvbridge.kagg886.top.

Features

Legend: ✅ Supported; ⚠️ Supported with platform limits; ➖ Not applicable.

FeatureAndroidiOSWindows JVMLinux JVMmacOS JVM
Compose WebView component
rememberWebViewController state controller
URL state synchronization
Loading lifecycle and progress state
loadUrl / back / forward / refresh / stop
JavaScript evaluation
Document-start script injection
Custom URL scheme passthrough
Platform-native WebView backend✅ Android WebView✅ WebKit✅ WebView2✅ WebKitGTK✅ WebKit
Separate desktop runtime artifactplatform-windowsplatform-linuxplatform-macos
Compose/Swing overlay above WebView⚠️ Native on-screen view limit⚠️ Native on-screen view limit⚠️ Native on-screen view limit
ArtifactLatest version
core
platform-windows
platform-linux
platform-macos

wvbridge is a Compose Multiplatform library that embeds the host platform WebView and exposes a small, Kotlin-friendly common API for loading pages, observing URL and loading state changes, and driving basic browser navigation.

Documentation site: wvbridge.kagg886.top

Note: This project is under active development. APIs and platform coverage may change.

Installation

Add the common API to your shared source set:

repositories {
mavenCentral()
}

kotlin {
sourceSets {
commonMain.dependencies {
implementation("top.kagg886.wvbridge:core:<version>")
}
}
}

On JVM, wvbridge also needs a platform-specific native runtime library. The recommended approach is to use Google's os-detector Gradle plugin and choose the runtime artifact from osdetector.classifier.

plugins {
id("com.google.osdetector") version "1.7.3"
}

repositories {
mavenCentral()
}

kotlin {
jvm()

sourceSets {
jvmMain.dependencies {
val platform = when (osdetector.classifier) {
"windows-x86_64" -> "platform-windows"
"linux-x86_64" -> "platform-linux"
"osx-aarch_64" -> "platform-macos"
else -> error(
"Unsupported JVM runtime for wvbridge: ${osdetector.classifier}. " +
"Supported classifiers are windows-x86_64, linux-x86_64, and osx-aarch_64."
)
}

runtimeOnly("top.kagg886.wvbridge:$platform:<version>")
}
}
}

Current JVM native runtime support is limited to:

  • Windows x64: windows-x86_64

  • Linux x64: linux-x86_64

  • macOS arm64: osx-aarch_64

Quick Start

Create a remembered controller and render WebView:

import androidx.compose.ui.Modifier
import top.kagg886.wvbridge.WebView
import top.kagg886.wvbridge.rememberWebViewController

val webViewController = rememberWebViewController("https://example.com")

WebView(
controller = webViewController,
modifier = Modifier,
)

Basic navigation uses webViewController.navigator:

webViewController.navigator.loadUrl("https://kotlinlang.org")
webViewController.navigator.goBack()
webViewController.navigator.goForward()
webViewController.navigator.refresh()
webViewController.navigator.stop()

More features are documented at wvbridge.kagg886.top.

Features

Legend: ✅ Supported; ⚠️ Supported with platform limits; ➖ Not applicable.

FeatureAndroidiOSWindows JVMLinux JVMmacOS JVM
Compose WebView component
rememberWebViewController state controller
URL state synchronization
Loading lifecycle and progress state
loadUrl / back / forward / refresh / stop
JavaScript evaluation
Document-start script injection
Custom URL scheme passthrough
Platform-native WebView backend✅ Android WebView✅ WebKit✅ WebView2✅ WebKitGTK✅ WebKit
Separate desktop runtime artifactplatform-windowsplatform-linuxplatform-macos
Compose/Swing overlay above WebView⚠️ Native on-screen view limit⚠️ Native on-screen view limit⚠️ Native on-screen view limit
ArtifactLatest version
core
platform-windows
platform-linux
platform-macos

wvbridge is a Compose Multiplatform library that embeds the host platform WebView and exposes a small, Kotlin-friendly common API for loading pages, observing URL and loading state changes, and driving basic browser navigation.

Documentation site: wvbridge.kagg886.top

Note: This project is under active development. APIs and platform coverage may change.

Installation

Add the common API to your shared source set:

repositories {
mavenCentral()
}

kotlin {
sourceSets {
commonMain.dependencies {
implementation("top.kagg886.wvbridge:core:<version>")
}
}
}

On JVM, wvbridge also needs a platform-specific native runtime library. The recommended approach is to use Google's os-detector Gradle plugin and choose the runtime artifact from osdetector.classifier.

plugins {
id("com.google.osdetector") version "1.7.3"
}

repositories {
mavenCentral()
}

kotlin {
jvm()

sourceSets {
jvmMain.dependencies {
val platform = when (osdetector.classifier) {
"windows-x86_64" -> "platform-windows"
"linux-x86_64" -> "platform-linux"
"osx-aarch_64" -> "platform-macos"
else -> error(
"Unsupported JVM runtime for wvbridge: ${osdetector.classifier}. " +
"Supported classifiers are windows-x86_64, linux-x86_64, and osx-aarch_64."
)
}

runtimeOnly("top.kagg886.wvbridge:$platform:<version>")
}
}
}

Current JVM native runtime support is limited to:

  • Windows x64: windows-x86_64

  • Linux x64: linux-x86_64

  • macOS arm64: osx-aarch_64

Quick Start

Create a remembered controller and render WebView:

import androidx.compose.ui.Modifier
import top.kagg886.wvbridge.WebView
import top.kagg886.wvbridge.rememberWebViewController

val webViewController = rememberWebViewController("https://example.com")

WebView(
controller = webViewController,
modifier = Modifier,
)

Basic navigation uses webViewController.navigator:

webViewController.navigator.loadUrl("https://kotlinlang.org")
webViewController.navigator.goBack()
webViewController.navigator.goForward()
webViewController.navigator.refresh()
webViewController.navigator.stop()

More features are documented at wvbridge.kagg886.top.

Features

Legend: ✅ Supported; ⚠️ Supported with platform limits; ➖ Not applicable.

FeatureAndroidiOSWindows JVMLinux JVMmacOS JVM
Compose WebView component
rememberWebViewController state controller
URL state synchronization
Loading lifecycle and progress state
loadUrl / back / forward / refresh / stop
JavaScript evaluation
Document-start script injection
Custom URL scheme passthrough
Platform-native WebView backend✅ Android WebView✅ WebKit✅ WebView2✅ WebKitGTK✅ WebKit
Separate desktop runtime artifactplatform-windowsplatform-linuxplatform-macos
Compose/Swing overlay above WebView⚠️ Native on-screen view limit⚠️ Native on-screen view limit⚠️ Native on-screen view limit
ArtifactLatest version
core
platform-windows
platform-linux
platform-macos

wvbridge is a Compose Multiplatform library that embeds the host platform WebView and exposes a small, Kotlin-friendly common API for loading pages, observing URL and loading state changes, and driving basic browser navigation.

Documentation site: wvbridge.kagg886.top

Note: This project is under active development. APIs and platform coverage may change.

Installation

Add the common API to your shared source set:

repositories {
mavenCentral()
}

kotlin {
sourceSets {
commonMain.dependencies {
implementation("top.kagg886.wvbridge:core:<version>")
}
}
}

On JVM, wvbridge also needs a platform-specific native runtime library. The recommended approach is to use Google's os-detector Gradle plugin and choose the runtime artifact from osdetector.classifier.

plugins {
id("com.google.osdetector") version "1.7.3"
}

repositories {
mavenCentral()
}

kotlin {
jvm()

sourceSets {
jvmMain.dependencies {
val platform = when (osdetector.classifier) {
"windows-x86_64" -> "platform-windows"
"linux-x86_64" -> "platform-linux"
"osx-aarch_64" -> "platform-macos"
else -> error(
"Unsupported JVM runtime for wvbridge: ${osdetector.classifier}. " +
"Supported classifiers are windows-x86_64, linux-x86_64, and osx-aarch_64."
)
}

runtimeOnly("top.kagg886.wvbridge:$platform:<version>")
}
}
}

Current JVM native runtime support is limited to:

  • Windows x64: windows-x86_64

  • Linux x64: linux-x86_64

  • macOS arm64: osx-aarch_64

Quick Start

Create a remembered controller and render WebView:

import androidx.compose.ui.Modifier
import top.kagg886.wvbridge.WebView
import top.kagg886.wvbridge.rememberWebViewController

val webViewController = rememberWebViewController("https://example.com")

WebView(
controller = webViewController,
modifier = Modifier,
)

Basic navigation uses webViewController.navigator:

webViewController.navigator.loadUrl("https://kotlinlang.org")
webViewController.navigator.goBack()
webViewController.navigator.goForward()
webViewController.navigator.refresh()
webViewController.navigator.stop()

More features are documented at wvbridge.kagg886.top.

Features

Legend: ✅ Supported; ⚠️ Supported with platform limits; ➖ Not applicable.

FeatureAndroidiOSWindows JVMLinux JVMmacOS JVM
Compose WebView component
rememberWebViewController state controller
URL state synchronization
Loading lifecycle and progress state
loadUrl / back / forward / refresh / stop
JavaScript evaluation
Document-start script injection
Custom URL scheme passthrough
Platform-native WebView backend✅ Android WebView✅ WebKit✅ WebView2✅ WebKitGTK✅ WebKit
Separate desktop runtime artifactplatform-windowsplatform-linuxplatform-macos
Compose/Swing overlay above WebView⚠️ Native on-screen view limit⚠️ Native on-screen view limit⚠️ Native on-screen view limit

Packages

Link copied to clipboard
common
ios
Link copied to clipboard
common
Link copied to clipboard
common
ios
Link copied to clipboard
common
Link copied to clipboard
common