WebViewKit is a Swift SDK that adds a WebView & SafariWebView to SwiftUI.

What's New


This version adds support for visionOS.

WebViewKit Logo

Version Swift 5.9 Swift UI MIT License Twitter: @danielsaidi Mastodon: @danielsaidi@mastodon.social

About WebViewKit

WebViewKit is a Swift SDK that adds a WebView to SwiftUI.

The web view can be used to display web sites in your apps, for instance like this:

The WebView can load any url and be configured to fit your needs. There's also a SafariWebView for more basic needs.


WebViewKit can be installed with the Swift Package Manager:


Getting started

The library's main view is WebView, which can be used to display any URL:

import SwiftUI
import WebViewKit

struct MyView {

    var body: some View {
        WebView(urlString: "https://danielsaidi.com")

The URL can point to any regular web site, but also to local web pages in your app bundle. There's also an iOS only SafariWebView, which has less configuration support and standard toolbars surrounding the web browser.

For more information, please see the getting started guide.


The online documentation has more information, articles, code examples, etc.

Demo Application

The demo app lets you explore the library. To try it out, just open and run the Demo project.

Support my work

You can sponsor me on GitHub Sponsors or reach out for paid support, to help support my open-source projects.

Your support makes it possible for me to put more work into these projects and make them the best they can be.


Feel free to reach out if you have questions or if you want to contribute in any way:


WebViewKit is available under the MIT license. See the LICENSE file for more info.


  • Swift Tools 5.9.0
View More Packages from this Author


  • None
Last updated: Thu May 30 2024 01:25:33 GMT-0900 (Hawaii-Aleutian Daylight Time)