Penpot plugins API
    Preparing search index...

    Interface EventsMap

    Represents a mapping of events to their corresponding types in Penpot. This interface provides information about various events that can be triggered in the application.

    penpot.on('pagechange', (event) => {
    console.log(event);
    });
    interface EventsMap {
        pagechange: Page;
        filechange: File;
        selectionchange: string[];
        themechange: Theme;
        finish: string;
        shapechange: Shape;
        contentsave: void;
    }
    Index

    Properties

    pagechange: Page

    The pagechange event is triggered when the active page in the project is changed.

    filechange: File

    The filechange event is triggered when a different file is opened. The callback will receive the new file.

    selectionchange: string[]

    The selectionchange event is triggered when the selection of elements changes. This event passes a list of identifiers of the selected elements.

    themechange: Theme

    The themechange event is triggered when the application theme is changed.

    finish: string

    The finish event is triggered when the current file is closed. The callback will receive the id of the closed file.

    shapechange: Shape

    This event will trigger whenever the shape in the props change. It's mandatory to send with the props an object like { shapeId: '<id>' }

    contentsave: void

    The contentsave event will trigger after the file content is saved in the backend.