Send notification to user

notify(opts)

Send an in-Designer notification to the user. The notification can be styled as either a success, error, or general information message. Error messages provide users with the opportunity to close the Designer Extension.

Syntax

1webflow.notify(opts: {type: 'Error' | 'Info' | 'Success'; message: string;}): Promise<void>

Parameters

opts : {message: string, type: 'Error' | 'Info' | 'Success'

The options for the notification.

  • message: string
  • type: “Error” | “Info” | “Success”

Returns

Promise<Void>

A Promise that returns a value of undefined.

Example

1webflow.notify({ type: 'Info', message: 'Great work!' }); // General notification
2webflow.notify({ type: 'Error', message: 'Something went wrong, try again!' }); // Error notification
3webflow.notify({ type: 'Success', message: 'Successfully did something!' }); // Success notification