Phials developer documentation
User guide
AI Notice: Most documentation right now was auto-generated by an LLM. Handwritten documentation will be implemented over time on the road to 1.0

ModalAPI

Modal dialog API

Signature

interface ModalAPI {
    confirm(opts: {
        title: string;
        message: string;
        confirmLabel?: string;
        cancelLabel?: string;
        danger?: boolean;
    }): Promise<boolean>;
    prompt(opts: {
        title: string;
        message: string;
        defaultValue?: string;
        placeholder?: string;
    }): Promise<string | null>;
    alert(opts: {
        title: string;
        message: string;
    }): Promise<void>;
}

Members

NameTypeRequiredDescription
confirm(opts: { … }) => Promise<boolean>yes
prompt(opts: { … }) => Promise<string | null>yes
alert(opts: { … }) => Promise<void>yes