Skip to main content

showNotification

Show a toast notification inside Spotify.

function showNotification(text: string, isError?: boolean, msTimeout?: number): void;
ParameterTypeDescription
textstringMessage to display. Can use inline HTML for styling.
isErrorbooleanIf true, toast will be red. Defaults to false.
msTimeoutnumberTime in milliseconds to display the toast. Defaults to Spotify's value.

Example

// Display a notification
Spicetify.showNotification("My Menu Item clicked!");

// Display a notification with a custom timeout
Spicetify.showNotification("My Menu Item clicked!", false, 1000);

// Display an error notification
Spicetify.showNotification("Something wrong happened", true);

// Display a bolded error notification
Spicetify.showNotification("<b>Something wrong happened</b>", true);