@capgo/capacitor-textinteraction

January 31, 2026 · View on GitHub

Capgo - Instant updates for capacitor

➡️ Get Instant updates for your App with Capgo

Missing a feature? We’ll build the plugin for you 💪

Toggle text interaction in Capacitor based iOS apps.

Documentation

The most complete doc is available here: https://capgo.app/docs/plugins/textinteraction/

Compatibility

Plugin versionCapacitor compatibilityMaintained
v8.*.*v8.*.*
v7.*.*v7.*.*On demand
v6.*.*v6.*.*
v5.*.*v5.*.*

Note: The major version of this plugin follows the major version of Capacitor. Use the version that matches your Capacitor installation (e.g., plugin v8 for Capacitor 8). Only the latest major version is actively maintained.

Install

npm install @capgo/capacitor-textinteraction
npx cap sync

Usage

import { TextInteraction } from '@capgo/capacitor-textinteraction';

// Disable the iOS magnifier lens while the WebView is visible
await TextInteraction.toggle({ enabled: false });

// Remember to re-enable before presenting any text inputs
await TextInteraction.toggle({ enabled: true });

API

toggle(...)

toggle(options: TextInteractionOptions) => Promise<TextInteractionResult>

Toggle text interaction (selection) on the Capacitor WebView.

⚠️ Disabling text interaction prevents all text input controls from working while disabled. Use it sparingly and re-enable when text entry is required.

iOS only.

ParamType
optionsTextInteractionOptions

Returns: Promise<TextInteractionResult>


getPluginVersion()

getPluginVersion() => Promise<{ version: string; }>

Get the native Capacitor plugin version

Returns: Promise<{ version: string; }>


Interfaces

TextInteractionResult

PropTypeDescription
successbooleantrue when the platform supports toggling text interaction (iOS >= 14.5), otherwise false.
MethodSignatureDescription
getPluginVersion() => Promise<{ version: string; }>Get the native Capacitor plugin version

TextInteractionOptions

PropTypeDescription
enabledbooleanWhether text interaction should be enabled or disabled. Disabling hides the magnifier lens reintroduced with iOS 15.

Credits

This plugin was inspired by the work of https://github.com/astrocreep/capacitor-plugins/tree/main/packages/textinteraction