Files
penpot/plugins/libs/plugin-types
Andrey Antukh 33c5f82c43 🐛 Fix penpot.openPage() to navigate in same tab by default
- Change the default for the newWindow param from true to false, so
  openPage() navigates in the same tab instead of opening a new one
- Accept a UUID string as the page argument in addition to a Page object,
  avoiding the need to call penpot.getPage(uuid) first
- Add validation error when an invalid page argument is passed

Signed-off-by: Andrey Antukh <niwi@niwi.nz>
2026-03-13 09:19:50 +01:00
..

Penpot plugin-types

The @penpot/plugin-types package provides TypeScript type definitions for the Penpot Plugin API, making it easier to develop plugins for the Penpot design platform with full type safety and IDE support. It streamlines the development process by ensuring that your code is well-typed and less prone to errors.

Getting started

Installation

To add penpot's plugin-types to your project, use the following command:

npm install @penpot/plugin-types

Configuration

To ensure the typings work correctly in your project, update your tsconfig.json as follows:

"typeRoots": [
  "./node_modules/@types",
  "./node_modules/@penpot"
],
"types": ["plugin-types"],

Learn more

For more information on how to build plugins using the Penpot PLugin API, refer to the official documentation. You can also explore practical examples in the samples repository to see real-world implementations.