Notifications

The ability to create notifications is part of a larger amount of functionality within shinydashboard, which allows you to create messages, tasks, and notifications in the header of your dashboard. For more details, visit rstudio.github.io/shinydashboard/structure.html.

In this example, we'll just add notifications. The code is very similar to the other two types of content. Static notifications can be produced with the notificationItem() function as follows (with the optional status and color arguments not used here):

notificationItem(text = "3 users today", icon("users")) 

In order to produce content dynamically, we need to do a bit more work. On the server.R side, the code is as follows. It allows the notification content ...

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.