Gravity
Search
⌃K

Modal

A modal blocks all user interaction and displays a message to the user or asks for feedback using a form.
You can generate a modal anywhere in your application using the ViewContext - you don't need to import a modal component.
context.modal.show({
title: 'Add User',
form: addUserForm,
buttonText: 'Send Invite',
text: 'To invite more than one user, seperate the emails with a comma',
url: '/api/user/invite',
method: 'POST'
});
// close modal
context.modal.hide();

Parameters

parameter
description
value
title
modal title
string
text
modal text
string
form
a form object (optional)
object
url
destination to send the form (optional)
string
method
HTTP post type (optional)
string
buttonText
text for the confirm button (optional)
string
Last modified 2yr ago