An example how to do a simple modal dialog by using CSS and a bit of structure of dashboard, just to avoid maybe hard work to create everything from scratch.
[{"id":"c6677371.1c906","type":"ui_template","z":"c0ddb509.b04f48","group":"93fae10c.09faa","name":"open modal","order":10,"width":0,"height":0,"format":"<style>\n.modalcontainer {\n position: absolute;\n display: block;\n top: 2em;\n left: 2em;\n right: 2em;\n bottom: 2em;\n background: var(--nr-dashboard-groupBackgroundColor);\n color:var(--nr-dashboard-widgetTextColor);\n box-shadow: 0px 0px 14px black;\n z-index: 100;\n</style>\n<button class=\"md-raised md-button md-ink-ripple\" id=\"modal-opener\">OPEN MODAL</button>\n\n<script>\n\n$(\"#modal-opener\").closest(\"md-card\").addClass('nr-dashboard-button')\n$(\"#modal-opener\").click(function(){\n $(\"<div></div>\", {\"class\": \"modalcontainer\",\"id\":new Date().getTime(),\n on: { click: function( event ) {\n $('#nr-dashboard-footer').empty()\n }\n }\n }).appendTo( \"#nr-dashboard-footer\" );\n \n $(\"<ui-card-panel></ui-card-panel>\",{\"id\":\"modalcardpanel\"}).appendTo(\".modalcontainer\")\n $(\"<div></div>\",{\"class\":\"nr-dashboard-cardpanel\",\"id\":\"nrpanel\"}).appendTo(\"#modalcardpanel\")\n $(\"<p></p>\",{\"class\":\"nr-dashboard-cardtitle\"})\n .text(\"Simple Modal Dialog\").appendTo(\"#nrpanel\")\n \n $(\"<md-card></md-card>\",\n {\"class\":\"nr-dashboard-text _md layout-row layout-align-space-between-center visible\",\n \"id\":\"modalcard\"}).appendTo(\"#nrpanel\")\n \n \n $(\"<p></p>\",{\"class\":\"nr-dashboard-text\", \"id\":\"textcontent\"})\n .text(\"Hello World\").appendTo(\"#modalcard\") \n \n})\n\n</script>\n<script>\n(function(scope) {\n scope.$watch('msg', function(msg) {\n if (msg) {\n $(\"#textcontent\").text(msg.payload);\n }\n });\n})(scope); \n</script>\n","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","x":230,"y":1500,"wires":[[]]},{"id":"93fae10c.09faa","type":"ui_group","name":"Default","tab":"6ff5405c.a8e6","order":1,"disp":true,"width":"6","collapse":false},{"id":"6ff5405c.a8e6","type":"ui_tab","name":"TEST","icon":"dashboard","order":3,"disabled":false,"hidden":false}]