
Enables integration of native WebViews in Compose Multiplatform applications, offering web navigation, configuration options, JavaScript evaluation, and a unified JavaScript API.
Kowe is a Kotlin Multiplatform library which enables you to include native WebViews in your Compose Mulitplatform Application on Android, iOS and Desktop.
To start using Kowe you need to include its dependency in your build.gradle.kts:
commonMain.dependencies {
implementation("dev.anthonyhfm:kowe:<current-version>")
}Take a look at the example repository
Building WebViews with the Kowe library is very easy. All you need is a WebViewState and the WebView-Composable. You can also do further configuration for your webview using the WebViewState.
Example Code:
@Composable
fun App() {
val state = rememberWebViewState(url = "https://www.jetbrains.com/compose-multiplatform/")
WebView(
state = state,
modifier = Modifier
.fillMaxSize()
)
}For using Kowe in Compose for Desktop you will need to do some extra configuration:
WebViewCore before starting your Application:fun main() = application {
WebViewCore.init() // <-- Initializing the Chromium Engine (runs blocking)
Window(
onCloseRequest = ::exitApplication,
title = "kowe-example",
) {
App() // <-- Your App
DisposableEffect(Unit) { // Needed for closing the Chromium Engine
onDispose {
WebViewCore.close() // <-- Properly closing the Chromium Engine
}
}
}
}This is a list of all the features the Kowe library currently supports. This library is currently under heavy development and the feature list will most likely grow by a lot over time.
android.webkitx)WkWebView)KCEF/JCEF, Jetbrains Runtime JCEF edition)window.kowe.postMessage for sending string messages to the webviewFeel free to test the Kowe library and submit issues and feature requests here
Kowe is a Kotlin Multiplatform library which enables you to include native WebViews in your Compose Mulitplatform Application on Android, iOS and Desktop.
To start using Kowe you need to include its dependency in your build.gradle.kts:
commonMain.dependencies {
implementation("dev.anthonyhfm:kowe:<current-version>")
}Take a look at the example repository
Building WebViews with the Kowe library is very easy. All you need is a WebViewState and the WebView-Composable. You can also do further configuration for your webview using the WebViewState.
Example Code:
@Composable
fun App() {
val state = rememberWebViewState(url = "https://www.jetbrains.com/compose-multiplatform/")
WebView(
state = state,
modifier = Modifier
.fillMaxSize()
)
}For using Kowe in Compose for Desktop you will need to do some extra configuration:
WebViewCore before starting your Application:fun main() = application {
WebViewCore.init() // <-- Initializing the Chromium Engine (runs blocking)
Window(
onCloseRequest = ::exitApplication,
title = "kowe-example",
) {
App() // <-- Your App
DisposableEffect(Unit) { // Needed for closing the Chromium Engine
onDispose {
WebViewCore.close() // <-- Properly closing the Chromium Engine
}
}
}
}This is a list of all the features the Kowe library currently supports. This library is currently under heavy development and the feature list will most likely grow by a lot over time.
android.webkitx)WkWebView)KCEF/JCEF, Jetbrains Runtime JCEF edition)window.kowe.postMessage for sending string messages to the webviewFeel free to test the Kowe library and submit issues and feature requests here