Skip to content

Capacitor

Capacitor is Ionic’s cross-platform native runtime: wrap your web app (React, Vue, Angular, etc.) in a native shell and call device APIs via plugins.

Source

Requirements

  • package.json and a built web assets directory (dist, www, build, …)
  • index.html with a <head> tag (required for plugin injection)

Add to an existing web app

bash
npm i @capacitor/core
npm i -D @capacitor/cli
npx cap init
npm i @capacitor/android @capacitor/ios
npx cap add android
npx cap add ios
npm run build
npx cap sync

Open native projects with npx cap open android / npx cap open ios.

vs Cordova

Capacitor is the modern Ionic stack — first-class TypeScript, maintained native tooling, and a simpler plugin model. See Cordova for legacy hybrid apps.

Curated technical notes — open source on GitHub