Skip to main content

Overview

Super Capacitor is a Capacitor plugin designed to allow Capacitor apps to utilize the capabilities of Ionic Portals.

Install

npm install @ionic-enterprise/super-capacitor
npx cap sync

Types

MicroappOptions

The options for configuring your microapp when using presentMicroapp.

interface MicroappOptions {
name: string;
type: 'push' | 'modal';
modalStyle?: 'fullScreen' | 'pageSheet';
startDir?: string;
initialContext?: InitialContext;
liveUpdateConfig?: LiveUpdateConfig;
}

Methods

presentMicroapp

presentMicroapp(options: MicroappOptions) => Promise<void>

Usage

import { presentMicroapp } from '@ionic-enterprise/super-capacitor/superapp';

presentMicroapp({
name: 'checkoutApp',
startDir: 'microapps/checkout',
type: 'push',
});

NOTE: A TypeScript module resolution Node16, NodeNext, or Bundler is required to recognize Super Capacitor's use of subpath exports.

Parameters

NameTypeDescription
optionsMicroappOptionsThe MicroappOptions object to configure the microapp.

dismissMicroapp

dismissMicroapp() => Promise<void>

Usage

import { dismissMicroapp } from '@ionic-enterprise/super-capacitor/microapp';

dismissMicroapp();

NOTE: A TypeScript module resolution Node16, NodeNext, or Bundler is required to recognize Super Capacitor's use of subpath exports.

Plugins

A microapp can only use plugins installed in its superapp. All superapp plugins are automatically available to its microapps. If a microapp requires a plugin not used by its superapp, that plugin must still be installed in the superapp.