ReadonlypagechangeThe pagechange event is triggered when the active page in the project is changed.
ReadonlyfilechangeThe filechange event is triggered when a different file is opened.
The callback will receive the new file.
ReadonlyselectionchangeThe selectionchange event is triggered when the selection of elements changes.
This event passes a list of identifiers of the selected elements.
ReadonlythemechangeThe themechange event is triggered when the application theme is changed.
ReadonlyfinishThe finish event is triggered when the current file is closed.
The callback will receive the id of the closed file.
ReadonlyshapechangeThis event will trigger whenever the shape in the props change. It's mandatory to send
with the props an object like { shapeId: '<id>' }
ReadonlycontentsaveThe contentsave event will trigger after the file content is saved in the backend.
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.
Example