f7Toast | R Documentation |
f7Toast
creates a small toast notification from the server side.
f7Toast( text, position = c("bottom", "top", "center"), closeButton = TRUE, closeButtonText = "close", closeButtonColor = "red", closeTimeout = 3000, icon = NULL, ..., session = shiny::getDefaultReactiveDomain() )
text |
Toast content. |
position |
Toast position |
closeButton |
Whether to close the toast with a button. TRUE by default. |
closeButtonText |
Close button text. |
closeButtonColor |
Close button color. |
closeTimeout |
Time before toast closes. |
icon |
Optional. Expect f7Icon. Warning: Adding icon will hide the close button. |
... |
Other options. See https://framework7.io/docs/toast.html#toast-parameters. |
session |
Shiny session. |
if (interactive()) { library(shiny) library(shinyMobile) shinyApp( ui = f7Page( title = "Toast", f7SingleLayout( navbar = f7Navbar(title = "f7Toast"), f7Button(inputId = "toast", label = "Open Toast") ) ), server = function(input, output, session) { observeEvent(input$toast, { f7Toast( position = "top", text = "I am a toast. Eat me!" ) }) } ) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.