@capawesome/capacitor-screenshot
TypeScript icon, indicating that this package has built-in type declarations

6.0.0 • Public • Published

@capawesome/capacitor-screenshot

Capacitor plugin for taking screenshots.

Installation

Install the plugin:

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.

Package Sidebar

Install

npm i @capawesome/capacitor-screenshot

Weekly Downloads

60

Version

6.0.0

License

MIT

Unpacked Size

27.5 kB

Total Files

36

Last publish

Collaborators

  • robingenz