Dialog
JointJS+ provides a Dialog plugin that enables the ability to display both modal and non-modal dialog boxes.
Installation​
Access Dialog
via the ui
namespace, create an instance, and call the open()
method on it.
import { ui } from '@joint/plus';
const dialog = new ui.Dialog({
width: 300,
title: 'My title',
content: 'This is my dialog box.'
});
dialog.open();
There is also a UMD version available
Include joint.ui.dialog.js
and joint.ui.dialog.css
in your HTML:
index.html
<link rel="stylesheet" type="text/css" href="joint.ui.dialog.css">
<script src="joint.js"></script>
<script src="joint.ui.dialog.js"></script>
Access Dialog
through the joint.ui
namespace:
index.js
const dialog = new joint.ui.Dialog({
width: 300,
title: 'My title',
content: 'This is my dialog box.'
});
dialog.open();