EVOLUTION-MANAGER
Edit File: material_spinner_show.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Create a material preloader (spinner)</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for material_spinner_show {shinymaterial}"><tr><td>material_spinner_show {shinymaterial}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Create a material preloader (spinner)</h2> <h3>Description</h3> <p>Display a preloader (spinner) while server is busy. </p> <h3>Usage</h3> <pre> material_spinner_show(session, output_id) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>session</code></td> <td> <p>The session object passed to function given to shinyServer.</p> </td></tr> <tr valign="top"><td><code>output_id</code></td> <td> <p>The output id for which the spinner will be a placeholder for.</p> </td></tr> </table> <h3>Examples</h3> <pre> if(interactive()){ library(shiny) library(shinymaterial) ui <- material_page( title = "Spinner Example", numericInput(inputId = "n", label = "", value = 10), plotOutput("n_plot") ) server <- function(input, output, session) { output$n_plot <- renderPlot({ #--- Show the spinner ---# material_spinner_show(session, "n_plot") #--- Simulate calculation step ---# Sys.sleep(time = 5) #--- Hide the spinner ---# material_spinner_hide(session, "n_plot") plot(1:input$n) }) } shinyApp(ui = ui, server = server) } </pre> <hr /><div style="text-align: center;">[Package <em>shinymaterial</em> version 1.2.0 <a href="00Index.html">Index</a>]</div> </body></html>