These docs are for v0.1.0. Click to read the latest docs for v1.0.0.

Front.prompt(options, callback)

Display a dialog with an optional message prompting the user to input some text.

The callback will receive a val with the text entered by the user (or null if the user canceled).

options: object

Field NameTypeDescription
titleStringTitle of the alert.
messageStringBody of the alert.
okTitle (optional)StringLabel of the OK button.
cancelTitle (optional)StringLabel of the cancel button

callback: function

A callback function.

Front.prompt({
    title: 'Title of the confirm dialog',
    message: 'Body of the dialog.',
    okTitle: 'Label of the OK button (optional)',
    cancelTitle: 'Label of the cancel button (optional)'
}, function (val) {
    console.log('User entered:', val);
});