App development
Create an app
Create a support ticket
Search…
Overview
Quick start
Changelog
Platform concepts
Apps
Extensions
Regions
Authentication
Deprecation policy
Extensions
Content extensions
Editing extensions
Publish extensions
Frontend development
Assets
Development URL
Error handling
Localization
Notifications
Rich controls
JSX
WebGL
Backend development
Base URL
Continuation
Signature verification
SDKs
Distribution
UX guidelines
Submission checklist
Creating the App Directory listing
Client API
EditingExtensionClient.API
create
onReady
onControlsEvent
onLayoutChange
onPresetsRequest
onPresetSelected
onImageUpdate
onSaveRequest
onTouchModeExit
onViewportResize
updateControlPanel
updateLayout
remoteProcess
reportError
showNotification
toggleSpinner
toggleTouchMode
exit
CanvaDataType
CanvaElement
CanvaElementLayout
CanvaImageBlob
CanvaImageHelpers
CanvaImageUrl
CanvaMedia
init
Server API
Overview
GET /apps/configured
POST /configuration
POST /configuration/delete
POST /content/resources/find
POST /editing/image/process
POST /editing/image/process/get
POST /publish/resources/find
POST /publish/resources/get
POST /publish/resources/upload
Redirect URL
Reference
Locales
Powered By
GitBook
showNotification
API reference for the "showNotification" method.
Displays a notification.
Usage
1
const
canva
=
window
.
canva
.
init
();
2
​
3
canva
.
onReady
(
async
(
opts
)
=>
{
4
// Show an "info" notification
5
canva
.
showNotification
(
"greeting"
,
"info"
);
6
​
7
// Show an "error" notification
8
// canva.showNotification("errorMessage", "error");
9
});
Copied!
This example assumes that a
localized label
exists with a
key
of
"greeting"
. For more information, refer to
Notifications
.
Parameters
Name
Type
Required
Description
key
string
Yes
The key of a localized label.
level
"info"
|
"error"
Yes
The type of notification.
Returns
void
Previous
reportError
Next
toggleSpinner
Last modified
7mo ago
Copy link
Contents
Usage
Parameters
Returns