Skip to main content

PopupModal

Spicetify provides a set of methods to create and control popup modals. This will display a modal on top of the client, which can be used to display information or ask for user input.

namespace PopupModal {
interface Content {
title: string;
content: string | Element;
isLarge?: boolean;
}

function display(content: Content): void;
function hide(): void;
};

Interface

Content

Content is an object that contains information about the modal needs to be displayed.

PropertyTypeDescription
titlestringTitle of the modal.
contentstringContent of the modal. You can specify a string for simple text display or an HTML element for interactive config/setting menu.
isLargeboolean | undefinedBigger modal.

Methods

display

Displays a modal on top of the client.

note

This method will replace the current modal if there is one.

ParameterTypeDescription
contentContentInformation about the modal.
Spicetify.PopupModal.display({
title: 'Hello World',
content: 'This is a simple text',
});

hide

Hides the current modal.

note

This method will hide any modal currently displayed via Spicetify.PopupModal.display.

Spicetify.PopupModal.hide();