knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of shinynotyf is to wrap Notyf in R to provide notifications in shiny, you can demo the package here.
knitr::include_graphics("inst/extdata/notyf.gif")
Install the development version from GitHub with:
# install.packages("devtools") devtools::install_github("tylurp/shinynotyf")
You can use shinynotyf
in a shiny app like so:
library(shiny) library(shinynotyf) ui <- fluidPage( use_shinynotyf(), actionButton("preview", "Preview") ) server <- function(input, output, session) { observeEvent(input$preview, { shinynotyf( message = "Hi there!", type = "success" ) }) } shinyApp(ui, server)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.