KWebView
1.61.0indexedEnables embedding web views with customizable URL handling and loading status updates, offering flexibility for desktop environments and seamless integration into applications.
30
Stars
—
Used by
dependents
—
Health
/ 100
Enables embedding web views with customizable URL handling and loading status updates, offering flexibility for desktop environments and seamless integration into applications.
commonMain.dependencies
implementation("io.github.shadmanadman:kwebview:1.61.0")
KWebView(
modifier: Modifier? = null,
url: String? = null,
htmlContent: String? = null,
enableJavaScript: Boolean = false,
allowCookies: Boolean = false,
enableDomStorageForAndroid: Boolean=false,
isLoading: ((isLoading: Boolean) -> Unit)? = ,
onUrlClicked: ((url: String) -> Unit)? =
)
isLoading: Current loading status of the web viewCreate a list of Cookies and pass it to the KWebView:
val mCookies = listOf(
Cookies(
val name: String,
val value: String,
val domain: String,
val path: String = "/",
val expires: String? = null,
maxAge: ? = ,
secure: = ,
httpOnly: = ,
sameSite: String? =
)
)
KWebView(allowCookies= , injectCookies = mCookies, url = example.com, ...)
If you are loading html content you can change some font options and rearrange the content to be shown better on smaller devices:
KWebView(
htmlContent: content.formatHtmlContent(
fontSize: Int = 12,
textAlign: TextAlign = TextAlign.JUSTIFY,
fontColor: String = "#000000"
),
//... other params
)
onUrlClicked: If user click's on a link inside your web view you can handel it here.
enableJavaScript: Enable javascript contentallowCookies: allow the webview to use cookiesenableDomStorageForAndroid: enable DOM storage for Android DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2025 Shadman Adman <adman.shadman@gmail.com>
Everyone is permitted to copy and distribute Kmp-WebView or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.
Surfaced from shared tags and platforms — no rankings paid for.