spsDepend: Add commonly used HTML dependencies

Description Usage Arguments Details Value Examples

View source: R/depend.R

Description

Add dependencies for some server end functions. For most UI functions, the dependency has been automatically attached for you when you call the function. Most server functions will also attach the dependency for you automatically too. However, a few server functions have to append the dependency before app start like addLoader. So you would need to call in this function somewhere in your UI. Read help of each function for details.

Usage

1
spsDepend(dep = "", js = TRUE, css = TRUE, listing = TRUE)

Arguments

dep

dependency names, see details

js

bool, use only javascript from this resource if there are both js and css files?

css

bool, use only CSS from this resource if there are both js and css files?

listing

bool, if your dep is invalid, list all options? FALSE will mute it.

Details

For dep, current options are:

Value

htmltools::htmlDependency object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
# list all options
spsDepend("")
# try some options
spsDepend("basic")
spsDepend("font-awesome")
# Then add it to your shiny app
if(interactive()){
    library(shiny)

    ui <- fluidPage(
      tags$i(class = "fa fa-home"),
      spsDepend("font-awesome")
    )

    server <- function(input, output, session) {

    }

    shinyApp(ui, server)
}

spsComps documentation built on Feb. 3, 2022, 1:07 a.m.