
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)? = null,
onUrlClicked: ((url: String) -> Unit)? = null
)
isLoading: Current loading status of the web viewonUrlClicked: 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 AndroidCreate 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,
val maxAge: Long? = null,
val secure: Boolean = false,
val httpOnly: Boolean = false,
val sameSite: String? = null
)
)
KWebView(allowCookies= true, 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
)
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.
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)? = null,
onUrlClicked: ((url: String) -> Unit)? = null
)
isLoading: Current loading status of the web viewonUrlClicked: 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 AndroidCreate 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,
val maxAge: Long? = null,
val secure: Boolean = false,
val httpOnly: Boolean = false,
val sameSite: String? = null
)
)
KWebView(allowCookies= true, 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
)
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.