Gravity
Search…
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.
1
context.modal.show({
2
title: 'Add User',
3
form: addUserForm,
4
buttonText: 'Send Invite',
5
text: 'To invite more than one user, seperate the emails with a comma',
6
url: '/api/user/invite',
7
method: 'POST'
8
});
9
10
// close modal
11
context.modal.hide();
Copied!

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 1yr ago
Copy link
Contents
Parameters