R: Add a loader that shows when an output is recalculating

withLoader {shinycustomloader} | R Documentation

## Add a loader that shows when an output is recalculating

### Description

Add a loader that shows when an output is recalculating

### Usage

    withLoader(ui_element, type = "html", loader = "dnaspin",
      proxy.height = if (grepl("height:\\s*\\d", ui_element)) NULL else
      "400px")

### Arguments

`ui_element` | A UI element that should be wrapped with a loader when the corresponding output is being calculated.
`type` | The type of loader to use. Possible values are image, html or text.
`loader` | The name of the loader. The built in options are dnaspin, dancingtree, pacman and walkingcow. For custom html option, the name of the css and html file have to be the same and input must be without the extension. For custom image option, the name must include the extension of the file. For custom text option, loader must be a list of marquee objects.
`proxy.height` | If the output doesn't specify the output height, you can set a proxy height. It defaults to 400px for outputs with undefined height.

### References

'shinycssloaders' https://github.com/andrewsali/shinycssloaders

'dnaspin' https://codepen.io/jsnanigans/pen/ORNJNp

'pacman' https://codepen.io/wifi/pen/olKxE

'loaders' https://codepen.io/Manoz/pen/pydxK

### Examples

    ## Not run: withLoader(plotOutput("my_plot"))
    ## Not run: marquee_list <- list(marquee("Your custom text here"))
    ## Not run: withLoader(plotOutput("distPlot"), type="text", loader=marquee_list)

[Package shinycustomloader version 0.9.0 Index]