explaingit

ionic-team/capacitor

Analysis updated 2026-06-24

15,661TypeScriptAudience · developerComplexity · 3/5LicenseSetup · moderate

TLDR

Wraps a web app into a native iOS and Android shell with JavaScript APIs for camera, GPS, notifications, and file system access.

Mindmap

mindmap
  root((capacitor))
    Inputs
      Web app
      Native plugins
      Build config
    Outputs
      iOS app
      Android app
      Progressive Web App
    Use Cases
      Ship cross-platform apps
      Wrap a web app
      Add device features
    Tech Stack
      TypeScript
      Swift
      Kotlin
      npm
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Wrap an existing React or Vue web app as an iOS and Android app on the stores.

USE CASE 2

Add camera, geolocation, and push notifications to a web app with one JS API.

USE CASE 3

Write a custom Swift or Kotlin plugin to access a device feature not built in.

USE CASE 4

Ship a Progressive Web App and a native app from the same codebase.

What is it built with?

TypeScriptSwiftKotlinnpm

How does it compare?

ionic-team/capacitorhydralauncher/hydraahmedkhaleel2004/gitdiagram
Stars15,66115,64515,590
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderatemoderatemoderate
Complexity3/53/53/5
Audiencedevelopergeneralvibe coder

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

iOS builds need Xcode on macOS and Android builds need Android Studio with a working SDK.

MIT license lets you use, modify, and ship Capacitor freely in any project, including commercial apps, as long as you keep the notice.

In plain English

Capacitor is a tool made by the Ionic team that lets you build mobile apps for iOS and Android using the same web technologies (HTML, CSS, JavaScript) you would use to build a website. You write your app once as a web app, and Capacitor wraps it in a native container that runs on iOS and Android, giving it access to device features like the camera, GPS, notifications, and file system. The key idea is that you get a single codebase that can be published to the Apple App Store, Google Play Store, and the mobile web as a Progressive Web App (a website that can be installed on a phone's home screen and work offline). Capacitor provides a set of cross-platform APIs, functions you call in JavaScript that work the same way on all platforms, while internally translating those calls to the native code each platform requires. You can also write custom native plugins (small pieces of platform-specific code that bridge to device capabilities Capacitor doesn't cover out of the box), with iOS plugins written in Swift and Android plugins in Kotlin or Java. Many existing Cordova plugins (from an older similar tool) are also compatible. You would use Capacitor if you are a web developer who wants to ship a mobile app without learning native iOS or Android development, or if you already have a web app that you want to package as a native app. It installs via npm and integrates into any modern web project. It works well on its own, though it also pairs with the Ionic Framework for pre-built mobile UI components.

Copy-paste prompts

Prompt 1
Walk me through adding Capacitor to an existing Vite React app and running it on an iOS simulator.
Prompt 2
Show me how to use the Capacitor Camera plugin from JavaScript and save the photo to the device file system.
Prompt 3
Help me write a custom Capacitor plugin in Swift that exposes HealthKit step counts to my web app.
Prompt 4
Give me the right capacitor.config.ts and AndroidManifest changes to enable push notifications on Android.
Prompt 5
Compare Capacitor and React Native for a small team shipping one app to iOS, Android, and the web.

Frequently asked questions

What is capacitor?

Wraps a web app into a native iOS and Android shell with JavaScript APIs for camera, GPS, notifications, and file system access.

What language is capacitor written in?

Mainly TypeScript. The stack also includes TypeScript, Swift, Kotlin.

What license does capacitor use?

MIT license lets you use, modify, and ship Capacitor freely in any project, including commercial apps, as long as you keep the notice.

How hard is capacitor to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is capacitor for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.