tree: a4cf43770b35c3e0e33d1bddf387ece7490f403e [path history] [tgz]
  1. api/
  2. src/
  3. .gitignore
  4. build.gradle.kts
  5. consumer-rules.pro
  6. gradle.properties
  7. proguard-rules.pro
  8. README.md
web/README.md

WebView wrapper for Jetpack Compose

Maven Central

For more information, visit the documentation: https://google.github.io/accompanist/web/

Basic Usage

To implement this wrapper there are two key APIs which are needed: WebView, which provides the layout, and rememberWebViewState(url) which provides some remembered state including the URL to display.

The basic usage is as follows:

val state = rememberWebViewState("https://example.com")

WebView(state)

This will display a WebView in your Compose layout that shows the URL provided.

Download

repositories {
    mavenCentral()
}

dependencies {
    implementation "com.google.accompanist:accompanist-webview:<version>"
}

Snapshots of the development version are available in Sonatype's snapshots repository. These are updated on every commit.