APIsChangelog
Log In

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

webflow.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

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