Modals

Modals are a UI element from Bootstrap and are pop-up messages that can tell your user more about what the application is doing. They can be useful to give a user warnings, or to allow the user to request more information about an output if they wish to know more. You can write a modal very simply, using two functions in the server.R file. The modalDialog function produces the modal, and the showModal function shows it. You can use them together just like this:

showModal(modalDialog( title = "Warning", "This is a warning"))

This will give us a simple dialog with a title and a main section:

But we can do more interesting things than ...

Get Web Application Development with R Using Shiny - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.