Skip to content

@capawesome/capacitor-screenshot

Capacitor plugin for taking screenshots.

Features

We are proud to offer one of the most complete and feature-rich Capacitor plugins for capturing screenshots. Here are some of the key features:

  • 🖥️ Cross-platform: Supports Android, iOS, and Web.
  • 📸 Easy screenshots: Simple one-method API for taking screenshots.
  • 🌐 Web support: Uses html2canvas for web platform screenshot capture.
  • 📱 Native capture: High-quality native screenshot capture on mobile.
  • 🔁 Up-to-date: Always supports the latest Capacitor version.

Missing a feature? Just open an issue and we'll take a look!

Newsletter

Stay up to date with the latest news and updates about the Capawesome, Capacitor, and Ionic ecosystem by subscribing to our Capawesome Newsletter.

Compatibility

Plugin Version Capacitor Version Status
8.x.x >=8.x.x Active support

Installation

You can use our AI-Assisted Setup to install the plugin. Add the Capawesome Skills to your AI tool using the following command:

npx skills add capawesome-team/skills

Then use the following prompt:

 Use the `capacitor-plugins` skill from `capawesome-team/skills` to install the `@capawesome/capacitor-screenshot` plugin in my project.

If you prefer Manual Setup, install the plugin by running the following commands:

npm install @capawesome/capacitor-screenshot
npx cap sync

If you are using the Web platform, you must also install the html2canvas package:

npm i html2canvas

Usage

import { Screenshot } from '@capawesome/capacitor-screenshot';

const take = async () => {
  const { uri } = await Screenshot.take();
  console.log('Screenshot saved at:', uri);
};

API

take()

take() => Promise<TakeResult>

Take a screenshot.

Returns: Promise<TakeResult>

Since: 6.0.0


Interfaces

TakeResult

Prop Type Description Since
uri string The file path (Android and iOS) or data URI (Web) of the screenshot. 6.0.0

Changelog

See CHANGELOG.md.

License

See LICENSE.