
Capacitor
Turn a web app into native iOS, Android, and web apps from one JavaScript codebase.
- Stars
- 17k
- Forks
- 1.3k
- Licence
- MIT
- Language
- TypeScript
- Last update
- 7 days ago
- Type
- Dev tool
What it is
Capacitor is a runtime and toolkit that lets a web app (built with JavaScript or similar frameworks) run inside native iOS and Android app shells. It provides a cross-platform API for calling native device features from web code, and a Plugin API for writing custom native code in Swift or Kotlin/Java. The README says it can also deploy the same app as a Progressive Web App for the mobile web.
- Wrap an existing web app with npm and add it as an iOS or Android project
- Call native device SDKs from JavaScript through a cross-platform API
- Write a custom native plugin in Swift or Kotlin and call it from web code
- Ship one app to the app stores and to the mobile web as a PWA
Great for
- Web developers who already have a modern web app and want it in the app stores
- Teams that want one codebase across iOS, Android, and the web
- Developers who need access to native SDKs and are comfortable writing small native plugins when needed
- Projects migrating from Apache Cordova who want a more modern tooling approach
Not ideal for
- Projects that need fully native interfaces with no web view; the README describes running web apps natively, so it is a poor fit if you want SwiftUI or Jetpack Compose only
- Beginners with no web development background, since setup requires npm and familiarity with native build tools (Xcode, Android Studio), which the README does not walk through in detail
How to get it
- 1
Install with a package manager
You'll need: Node.js and npm · An existing web app or a new one to wrap
Add Capacitor to an existing app
npm install @capacitor/core @capacitor/cliInitialize Capacitor in your app
npx cap initAdd the Android platform
npm install @capacitor/android && npx cap add androidAdd the iOS platform
npm install @capacitor/ios && npx cap add ios - 2
Run it
- Build or prepare your web app so it has a web output folder
- Run npx cap init to set the app name and web directory
- Add the iOS or Android platform with npx cap add
- Open the generated native project and run it from Xcode or Android Studio
- 3
Get the most out of it
- Use the Ionic Framework and Ionic CLI for a fuller starter experience, as the README recommends for new apps
- Read the docs at capacitorjs.com/docs for the Cordova migration guide
- Write custom plugins in Swift for iOS and Kotlin or Java for Android, as the README suggests
- Publish plugins as npm packages so others can reuse them
Downloads
Strengths
- Drops into existing modern web apps, according to the README
- Backward compatible with a large share of existing Cordova plugins
- Native project folders are treated as source you can edit, not generated build output
Trade-offs
- Native UI is not provided by Capacitor itself; the README says you may need to build it yourself without Ionic Framework
- Some setup and debugging will involve native tooling, which the README only briefly covers
- README is truncated, so detailed platform requirements and version support were not verifiable here
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| capacitor (this) | 17k | Dev tool | intermediate | 7 days ago | Web developers who already have a modern web app and want it in the app stores |
| react-native | 127k | Framework | intermediate | 4 days ago | Web developers who already know React and want to build mobile apps |
| NativeScript | 25.7k | Framework | intermediate | 4 days ago | JavaScript or TypeScript developers who want to build native iOS or Android apps |
| ionic-framework | 52.7k | Library | intermediate | 4 days ago | Web developers who want to build mobile apps using existing web skills |
| react-native-elements | 25.9k | Library | intermediate | 6 months ago | React Native developers who want ready-made UI components |
| framework7 | 18.8k | Framework | intermediate | 6 days ago | Developers who already know HTML, CSS and JavaScript and want to build mobile-style apps |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.